[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/oclosure 04003b2167: * lisp/emacs-lisp/bytecomp.el (byte-compile
From: |
Stefan Monnier |
Subject: |
scratch/oclosure 04003b2167: * lisp/emacs-lisp/bytecomp.el (byte-compile-make-closure): Optimize OClosures |
Date: |
Sun, 2 Jan 2022 12:31:19 -0500 (EST) |
branch: scratch/oclosure
commit 04003b216743f3d1e2488905eb27c1c6002d44c9
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>
* lisp/emacs-lisp/bytecomp.el (byte-compile-make-closure): Optimize
OClosures
---
lisp/emacs-lisp/bytecomp.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 644d9f1a47..f52a673ab3 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -3913,7 +3913,7 @@ discarding."
docstring-exp)) ;Otherwise, we don't need a closure.
(cl-assert (byte-code-function-p fun))
(byte-compile-form
- (if (or (not docstring-exp) (stringp docstring-exp))
+ (if (macroexp-const-p docstring-exp)
;; Use symbols V0, V1 ... as placeholders for closure variables:
;; they should be short (to save space in the .elc file), yet
;; distinct when disassembled.
@@ -3929,7 +3929,7 @@ discarding."
(vconcat dummy-vars (aref fun 2))
(aref fun 3)
(if docstring-exp
- (cons docstring-exp (cdr opt-args))
+ (cons (eval docstring-exp t) (cdr opt-args))
opt-args))))
`(make-closure ,proto-fun ,@env))
;; Nontrivial doc string expression: create a bytecode object
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- scratch/oclosure 04003b2167: * lisp/emacs-lisp/bytecomp.el (byte-compile-make-closure): Optimize OClosures,
Stefan Monnier <=