Move malformed-function warning from byte-opt to cconv (bug#67483)
We shouldn't be warning inside the optimiser in the first place. * lisp/emacs-lisp/byte-opt.el (byte-optimize-form): Remove byte-compile-form-stack manipulation. (byte-optimize-form-code-walker): Move malformed function warning from here... * lisp/emacs-lisp/cconv.el: ...to here.
This commit is contained in:
parent
e87644baa3
commit
8525be6d5e
2 changed files with 9 additions and 11 deletions
|
@ -485,10 +485,6 @@ There can be multiple entries for the same NAME if it has several aliases.")
|
|||
(`(,(pred byte-code-function-p) . ,exps)
|
||||
(cons fn (mapcar #'byte-optimize-form exps)))
|
||||
|
||||
(`(,(pred (not symbolp)) . ,_)
|
||||
(byte-compile-warn-x form "`%s' is a malformed function" fn)
|
||||
form)
|
||||
|
||||
((guard (when for-effect
|
||||
(if-let ((tmp (byte-opt--fget fn 'side-effect-free)))
|
||||
(or byte-compile-delete-errors
|
||||
|
@ -514,7 +510,6 @@ There can be multiple entries for the same NAME if it has several aliases.")
|
|||
(byte-optimize-form form for-effect)))
|
||||
|
||||
(defun byte-optimize-form (form &optional for-effect)
|
||||
(push form byte-compile-form-stack)
|
||||
(while
|
||||
(progn
|
||||
;; First, optimize all sub-forms of this one.
|
||||
|
@ -531,7 +526,6 @@ There can be multiple entries for the same NAME if it has several aliases.")
|
|||
(byte-compile-log " %s\t==>\t%s" old new)
|
||||
(setq form new)
|
||||
(not (eq new old))))))))
|
||||
(pop byte-compile-form-stack)
|
||||
form)
|
||||
|
||||
(defun byte-optimize--rename-var-body (var new-var body)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue