]> git.eshelyaron.com Git - emacs.git/commitdiff
Byte compiler: correct output warning message positions (part 2)
authorAlan Mackenzie <acm@muc.de>
Fri, 22 Apr 2022 17:16:21 +0000 (17:16 +0000)
committerAlan Mackenzie <acm@muc.de>
Fri, 22 Apr 2022 17:16:21 +0000 (17:16 +0000)
A supplementary commit to that on 2022-04-18:

* lisp/emacs-lisp/bytecomp.el (byte-compile--first-symbol-with-pos): Handle
vectors and records correctly.

* lisp/emacs-lisp/byte-run.el (byte-run--ssp-seen): Correct the doc string.

lisp/emacs-lisp/byte-run.el
lisp/emacs-lisp/bytecomp.el

index 384e8cba88f334133642268cc83c6f7b1f27d84e..0113051c8eb4388519bc108ba709990c08122b4e 100644 (file)
@@ -32,8 +32,7 @@
 
 (defvar byte-run--ssp-seen nil
   "Which conses/vectors/records have been processed in strip-symbol-positions?
-The value is a hash table, the key being the old element and the value being
-the corresponding new element of the same type.
+The value is a hash table, the keys being the elements and the values being t.
 
 The purpose of this is to detect circular structures.")
 
index 8128410916afdc53f633196ef30c21c57738c382..f97324f3a8ff485aa982b81b0484694da50f90d7 100644 (file)
@@ -1185,14 +1185,14 @@ Here, \"first\" is by a depth first search."
           (and (symbolp (setq sym (byte-compile--first-symbol-with-pos (cdr form))))
                sym)
           0))
-     ((and (vectorp form)
+     ((and (or (vectorp form) (recordp form))
            (> (length form) 0))
       (let ((i 0)
             (len (length form))
             elt)
         (catch 'sym
           (while (< i len)
-            (when (symbolp
+            (when (symbol-with-pos-p
                    (setq elt (byte-compile--first-symbol-with-pos (aref form i))))
               (throw 'sym elt))
             (setq i (1+ i)))