aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Kangas2022-08-04 22:58:59 +0200
committerStefan Kangas2022-08-04 23:21:03 +0200
commitd73a104dd349fdf8de5ababa9ae53ea807b00bfb (patch)
tree8bc17466e8bae2b1219cfc62b7e2fa1e6d7e8251
parent0b5dccc8b2f36d6d012cf792113de4a3b7b15334 (diff)
downloademacs-d73a104dd349fdf8de5ababa9ae53ea807b00bfb.tar.gz
emacs-d73a104dd349fdf8de5ababa9ae53ea807b00bfb.zip
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".
-rw-r--r--lisp/emacs-lisp/loaddefs-gen.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/loaddefs-gen.el b/lisp/emacs-lisp/loaddefs-gen.el
index 52ec5ef6809..afba9f8fbc7 100644
--- a/lisp/emacs-lisp/loaddefs-gen.el
+++ b/lisp/emacs-lisp/loaddefs-gen.el
@@ -456,7 +456,7 @@ don't include."
456 (let ((prefs nil)) 456 (let ((prefs nil))
457 ;; Avoid (defvar <foo>) by requiring a trailing space. 457 ;; Avoid (defvar <foo>) by requiring a trailing space.
458 (while (re-search-forward 458 (while (re-search-forward
459 "^(\\(def[^ ]+\\) ['(]*\\([^' ()\"\n]+\\)[\n \t]" nil t) 459 "^(\\(def[^ \t]+\\)[ \t]+['(]*\\([^' ()\"\n]+\\)[\n \t]" nil t)
460 (unless (member (match-string 1) autoload-ignored-definitions) 460 (unless (member (match-string 1) autoload-ignored-definitions)
461 (let ((name (match-string-no-properties 2))) 461 (let ((name (match-string-no-properties 2)))
462 (when (save-excursion 462 (when (save-excursion