[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master d73a104dd3 1/2: Be more lax when picking up prefixes for loaddefs
From: |
Stefan Kangas |
Subject: |
master d73a104dd3 1/2: Be more lax when picking up prefixes for loaddefs |
Date: |
Thu, 4 Aug 2022 17:21:37 -0400 (EDT) |
branch: master
commit d73a104dd349fdf8de5ababa9ae53ea807b00bfb
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>
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".
---
lisp/emacs-lisp/loaddefs-gen.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/emacs-lisp/loaddefs-gen.el b/lisp/emacs-lisp/loaddefs-gen.el
index 52ec5ef680..afba9f8fbc 100644
--- a/lisp/emacs-lisp/loaddefs-gen.el
+++ b/lisp/emacs-lisp/loaddefs-gen.el
@@ -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