Byte compiler: correct output warning message positions (part 2)

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.
This commit is contained in:
Alan Mackenzie 2022-04-22 17:16:21 +00:00
parent 2d71fd3b04
commit 5b23c9942a
2 changed files with 3 additions and 4 deletions

View 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)))