[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bugfix/shorthand-fixes 7e99ed2f539 6/6: Fix prefix discovery for files w
From: |
João Távora |
Subject: |
bugfix/shorthand-fixes 7e99ed2f539 6/6: Fix prefix discovery for files with read-symbol-shorthands (bug#67325) |
Date: |
Thu, 30 Nov 2023 09:05:50 -0500 (EST) |
branch: bugfix/shorthand-fixes
commit 7e99ed2f539a5734353aab551c690107e34ea27c
Author: João Távora <joaotavora@gmail.com>
Commit: João Távora <joaotavora@gmail.com>
Fix prefix discovery for files with read-symbol-shorthands (bug#67325)
In a previous commit, the local-variable read-symbol-shorthands is
already read into the temporary buffer used for the autoload parsing
aerobatics, so all we needed to do in 'l-g--compute-prefixes' is
use 'read' to give 'read-symbol-shorthands' a chance to kick in.
* lisp/emacs-lisp/loaddefs-gen.el
(loaddefs-generate--compute-prefixes):
---
lisp/emacs-lisp/loaddefs-gen.el | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/lisp/emacs-lisp/loaddefs-gen.el b/lisp/emacs-lisp/loaddefs-gen.el
index dccdbea9240..e8093200bec 100644
--- a/lisp/emacs-lisp/loaddefs-gen.el
+++ b/lisp/emacs-lisp/loaddefs-gen.el
@@ -499,7 +499,11 @@ don't include."
(while (re-search-forward
"^(\\(def[^ \t\n]+\\)[ \t\n]+['(]*\\([^' ()\"\n]+\\)[\n \t]" nil t)
(unless (member (match-string 1) autoload-ignored-definitions)
- (let ((name (match-string-no-properties 2)))
+ (let* ((name (match-string-no-properties 2))
+ ;; Consider `read-symbol-shorthands'.
+ (probe (let ((obarray (obarray-make)))
+ (car (read-from-string name)))))
+ (setq name (symbol-name probe))
(when (save-excursion
(goto-char (match-beginning 0))
(or (bobp)
- branch bugfix/shorthand-fixes created (now 7e99ed2f539), João Távora, 2023/11/30
- bugfix/shorthand-fixes 3c6719f55c1 1/6: Make sure read-symbol-shorthands is permanently local, João Távora, 2023/11/30
- bugfix/shorthand-fixes d1e8e9d4054 3/6: Consider read-symbol-shorthands in check-declare.el (bug#67523), João Távora, 2023/11/30
- bugfix/shorthand-fixes 7e99ed2f539 6/6: Fix prefix discovery for files with read-symbol-shorthands (bug#67325),
João Távora <=
- bugfix/shorthand-fixes ff48f1401d2 5/6: Also teach loaddefs-gen.el about shorthands (bug#63480), João Távora, 2023/11/30
- bugfix/shorthand-fixes 48f5bd5d744 4/6: Improve shorthands-font-lock-shorthands (bug#67390), João Távora, 2023/11/30
- bugfix/shorthand-fixes e184e15285b 2/6: Process read-symbol-shorthands from longest to shortest (bug#67390), João Távora, 2023/11/30