]> git.eshelyaron.com Git - emacs.git/commit
Fix symbols with position appearing in the output of `compile-defun'
authorAlan Mackenzie <acm@muc.de>
Sat, 19 Feb 2022 10:38:19 +0000 (10:38 +0000)
committerAlan Mackenzie <acm@muc.de>
Sat, 19 Feb 2022 10:38:19 +0000 (10:38 +0000)
commitf687e62ac5dff18a81354e2a29f523c16e3446c3
tree151d260a01208c6025d8a250261e12be71f5e88c
parent767619595cf0fd7169ae682aaea24ab04ad44915
Fix symbols with position appearing in the output of `compile-defun'

This happened with the tags of a condition-case.  Also fix the detection of
circular lists while stripping the positions from symbols with position.

* lisp/emacs-lisp/byte-run.el (byte-run--circular-list-p): Remove.
(byte-run--strip-s-p-1): Write a value of t into a hash table for each cons or
vector/record encountered.  (This is to prevent loops with circular
structures.)  This is now done for all arguments, not just those detected as
circular lists.

* lisp/emacs-lisp/bytecomp.el (byte-compile-file-form-defvar)
(byte-compile-form, byte-compile-dynamic-variable-op)
(byte-compile-constant, byte-compile-push-constant): Remove redundant calls to
`bare-symbol'.
(byte-compile-lambda): call `byte-run-strip-symbol-positions' on the arglist.
(byte-compile-out): call `byte-run-strip-symbol-positions' on the operand.
This is the main call to this function in bytecomp.el.

* src/fns.c (hashfn_eq): Strip the position from an argument which is a symbol
with position.
(hash_lookup): No longer strip a position from a symbol with position.
(sxhash_obj): Add handling for symbols with position, substituting their bare
symbols when symbols with position are enabled.
lisp/emacs-lisp/byte-run.el
lisp/emacs-lisp/bytecomp.el
src/fns.c