summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/bytecomp.el
diff options
context:
space:
mode:
authorAlan Mackenzie <acm@muc.de>2022-03-06 13:37:30 +0000
committerAlan Mackenzie <acm@muc.de>2022-03-06 13:37:30 +0000
commit68cdb95019a24024e6000ae75de6aa974d9b4a23 (patch)
tree86331a0d314b97588c87a162211c27130e2e9286 /lisp/emacs-lisp/bytecomp.el
parent6eeab90632506348a58d264eb3304625756c8659 (diff)
downloademacs-68cdb95019a24024e6000ae75de6aa974d9b4a23.tar.gz
emacs-68cdb95019a24024e6000ae75de6aa974d9b4a23.tar.bz2
emacs-68cdb95019a24024e6000ae75de6aa974d9b4a23.zip
Restore call to byte-run-strip-symbol-positions in byte-compile-out
Also increment a loop counter. This should fix bug #54248. * lisp/emacs-lisp/byte-run.el (byte-run--strip-vector/record): increment the loop counter 'i' in the main loop. * lisp/emacs-lisp/bytecomp.el (byte-compile-out): call byte-run-strip-symbol-positions on operands which are one-element lists.
Diffstat (limited to 'lisp/emacs-lisp/bytecomp.el')
-rw-r--r--lisp/emacs-lisp/bytecomp.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 432fd2ad9c5..9be44a8d5af 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -5108,6 +5108,11 @@ OP and OPERAND are as passed to `byte-compile-out'."
(- 1 operand))))
(defun byte-compile-out (op &optional operand)
+ "Push the operation onto `byte-compile-output'.
+OP is an opcode, a symbol. OPERAND is either nil or a number or
+a one-element list of a lisp form."
+ (when (and (consp operand) (null (cdr operand)))
+ (setq operand (byte-run-strip-symbol-positions operand)))
(push (cons op operand) byte-compile-output)
(if (eq op 'byte-return)
;; This is actually an unnecessary case, because there should be no