Remove useless handling of erroneous code in Lisp optimiser

* lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker):
((closure ...) ...) is a malformed function call; treat it as such.
Better malformed function warning location.
This commit is contained in:
Mattias Engdegård 2023-05-04 17:31:15 +02:00
parent 1438574dd7
commit 3b038d46e2

View file

@ -469,10 +469,6 @@ for speeding up processing.")
form
(byte-optimize-form newform for-effect))))
;; FIXME: Strictly speaking, I think this is a bug: (closure...)
;; is a *value* and shouldn't appear in the car.
(`((closure . ,_) . ,_) form)
(`(setq ,var ,expr)
(let ((lexvar (assq var byte-optimize--lexvars))
(value (byte-optimize-form expr nil)))
@ -500,7 +496,7 @@ for speeding up processing.")
(cons fn (mapcar #'byte-optimize-form exps)))
(`(,(pred (not symbolp)) . ,_)
(byte-compile-warn-x fn "`%s' is a malformed function" fn)
(byte-compile-warn-x form "`%s' is a malformed function" fn)
form)
((guard (when for-effect