diff options
author | Alan Mackenzie <acm@muc.de> | 2023-11-27 15:36:36 +0000 |
---|---|---|
committer | Alan Mackenzie <acm@muc.de> | 2023-11-27 15:36:36 +0000 |
commit | 1dab381c823b8bca23a1ed6335dd24ee50af7fc9 (patch) | |
tree | 7690c2427696c102e6331bfeddb78abc5ae14693 /lisp/emacs-lisp/byte-opt.el | |
parent | 76cf700ecb78cb465bcd05ae2b2fb0d28e4d0aed (diff) | |
download | emacs-1dab381c823b8bca23a1ed6335dd24ee50af7fc9.tar.gz emacs-1dab381c823b8bca23a1ed6335dd24ee50af7fc9.tar.bz2 emacs-1dab381c823b8bca23a1ed6335dd24ee50af7fc9.zip |
Compiler optimizer: push forms onto byte-compile-form-stack
This fixes bug#67483.
* lisp/emacs-lisp/byte-opt.el (byte-optimize-form): Push and
pop FORM onto/off byte-compile-form-stack so that warning
messages get a position near to the erroneous source.
Diffstat (limited to 'lisp/emacs-lisp/byte-opt.el')
-rw-r--r-- | lisp/emacs-lisp/byte-opt.el | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index 2caaadc9f9e..06257a9a2da 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el @@ -514,6 +514,7 @@ There can be multiple entries for the same NAME if it has several aliases.") (byte-optimize-form form for-effect))) (defun byte-optimize-form (form &optional for-effect) + (push form byte-compile-form-stack) (while (progn ;; First, optimize all sub-forms of this one. @@ -530,6 +531,7 @@ There can be multiple entries for the same NAME if it has several aliases.") (byte-compile-log " %s\t==>\t%s" old new) (setq form new) (not (eq new old)))))))) + (pop byte-compile-form-stack) form) (defun byte-optimize--rename-var-body (var new-var body) |