[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 68cdb95019: Restore call to byte-run-strip-symbol-positions in by
From: |
Alan Mackenzie |
Subject: |
master 68cdb95019: Restore call to byte-run-strip-symbol-positions in byte-compile-out |
Date: |
Sun, 6 Mar 2022 08:38:32 -0500 (EST) |
branch: master
commit 68cdb95019a24024e6000ae75de6aa974d9b4a23
Author: Alan Mackenzie <acm@muc.de>
Commit: Alan Mackenzie <acm@muc.de>
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.
---
lisp/emacs-lisp/byte-run.el | 3 ++-
lisp/emacs-lisp/bytecomp.el | 5 +++++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el
index d7a2d8ceca..384e8cba88 100644
--- a/lisp/emacs-lisp/byte-run.el
+++ b/lisp/emacs-lisp/byte-run.el
@@ -80,7 +80,8 @@ This is done by destructively modifying ARG. Return ARG."
((consp elt)
(byte-run--strip-list elt))
((or (vectorp elt) (recordp elt))
- (byte-run--strip-vector/record elt))))))
+ (byte-run--strip-vector/record elt)))
+ (setq i (1+ i)))))
arg))
(defalias 'byte-run-strip-symbol-positions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 432fd2ad9c..9be44a8d5a 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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 68cdb95019: Restore call to byte-run-strip-symbol-positions in byte-compile-out,
Alan Mackenzie <=