]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix prefix discovery for files with read-symbol-shorthands (bug#67325)
authorJoão Távora <joaotavora@gmail.com>
Thu, 30 Nov 2023 13:32:50 +0000 (07:32 -0600)
committerEshel Yaron <me@eshelyaron.com>
Sun, 4 Feb 2024 11:05:23 +0000 (12:05 +0100)
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):

(cherry picked from commit 817140a852e79c5ef3cf7dc5e4c50aa710e8c4a2)

lisp/emacs-lisp/loaddefs-gen.el

index bf5cd24f161a4c2799a0f1222ef19b683a60fac5..8aacbf406b62152f720038f3603af12d17cebd00 100644 (file)
@@ -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)