aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2022-03-18 16:07:42 -0400
committerStefan Monnier2022-03-18 16:07:42 -0400
commitab8a34ce8a54539cc9f66892145153312fa2a7fa (patch)
treec8335d2266e5b2f98adc01ab9e36ad91e94c2cc5
parentce28de5d3a1293ceaf4317520ec8c3d2095ab947 (diff)
downloademacs-ab8a34ce8a54539cc9f66892145153312fa2a7fa.tar.gz
emacs-ab8a34ce8a54539cc9f66892145153312fa2a7fa.zip
* lisp/emacs-lisp/bytecomp.el (byte-compile-make-closure): Minor optimization
-rw-r--r--lisp/emacs-lisp/bytecomp.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index c680437f324..c39d931517e 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -3924,7 +3924,7 @@ discarding."
3924 docstring-exp)) ;Otherwise, we don't need a closure. 3924 docstring-exp)) ;Otherwise, we don't need a closure.
3925 (cl-assert (byte-code-function-p fun)) 3925 (cl-assert (byte-code-function-p fun))
3926 (byte-compile-form 3926 (byte-compile-form
3927 (if (or (not docstring-exp) (stringp docstring-exp)) 3927 (if (macroexp-const-p docstring-exp)
3928 ;; Use symbols V0, V1 ... as placeholders for closure variables: 3928 ;; Use symbols V0, V1 ... as placeholders for closure variables:
3929 ;; they should be short (to save space in the .elc file), yet 3929 ;; they should be short (to save space in the .elc file), yet
3930 ;; distinct when disassembled. 3930 ;; distinct when disassembled.
@@ -3940,7 +3940,7 @@ discarding."
3940 (vconcat dummy-vars (aref fun 2)) 3940 (vconcat dummy-vars (aref fun 2))
3941 (aref fun 3) 3941 (aref fun 3)
3942 (if docstring-exp 3942 (if docstring-exp
3943 (cons docstring-exp (cdr opt-args)) 3943 (cons (eval docstring-exp t) (cdr opt-args))
3944 opt-args)))) 3944 opt-args))))
3945 `(make-closure ,proto-fun ,@env)) 3945 `(make-closure ,proto-fun ,@env))
3946 ;; Nontrivial doc string expression: create a bytecode object 3946 ;; Nontrivial doc string expression: create a bytecode object