]> git.eshelyaron.com Git - emacs.git/commitdiff
Constant-propagate (function SYMBOL)
authorMattias Engdegård <mattiase@acm.org>
Thu, 3 Jun 2021 19:20:57 +0000 (21:20 +0200)
committerMattias Engdegård <mattiase@acm.org>
Thu, 3 Jun 2021 19:28:10 +0000 (21:28 +0200)
* lisp/emacs-lisp/byte-opt.el (byte-optimize--substitutable-p):
Consider #'SYMBOL a constant for compile-time propagation purposes.

lisp/emacs-lisp/byte-opt.el

index 99e84e23ad8c5a4edc437bdb37097be0a978588f..2fff0bd4a5f517cb48056518299dfe2b49e395a3 100644 (file)
@@ -343,7 +343,7 @@ Same format as `byte-optimize--lexvars', with shared structure and contents.")
       (numberp expr)
       (stringp expr)
       (and (consp expr)
-           (eq (car expr) 'quote)
+           (memq (car expr) '(quote function))
            (symbolp (cadr expr)))
       (keywordp expr)))