1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-03-06 14:02:07 -08:00

Be more lax when picking up prefixes for loaddefs

* lisp/emacs-lisp/loaddefs-gen.el
(loaddefs-generate--compute-prefixes): Allow tabs and spaces before
symbol name, so that "(defvar\tfoo-bar nil)" is properly picked up.
Before this change, such a definition would be wrongly picked up as
the symbol "nil".
This commit is contained in:
Stefan Kangas 2022-08-04 22:58:59 +02:00
parent 0b5dccc8b2
commit d73a104dd3

View file

@ -456,7 +456,7 @@ don't include."
(let ((prefs nil))
;; Avoid (defvar <foo>) by requiring a trailing space.
(while (re-search-forward
"^(\\(def[^ ]+\\) ['(]*\\([^' ()\"\n]+\\)[\n \t]" nil t)
"^(\\(def[^ \t]+\\)[ \t]+['(]*\\([^' ()\"\n]+\\)[\n \t]" nil t)
(unless (member (match-string 1) autoload-ignored-definitions)
(let ((name (match-string-no-properties 2)))
(when (save-excursion