]> git.eshelyaron.com Git - emacs.git/commitdiff
; Also consider shorthands in check-declare-scan (bug#67523)
authorJoão Távora <joaotavora@gmail.com>
Sat, 3 Feb 2024 14:27:27 +0000 (08:27 -0600)
committerEshel Yaron <me@eshelyaron.com>
Sun, 4 Feb 2024 11:05:26 +0000 (12:05 +0100)
* lisp/emacs-lisp/check-declare.el (check-declare-scan): Also
consider shorthands here.

(cherry picked from commit 9a51fbb69fc9dc4aa415308889ae667ee65660d7)

lisp/emacs-lisp/check-declare.el

index b4a7b4b33e68b17405d9ff7c145d43164a89f845..a6d1a330d90363cea84a5e2084306c1f92121f09 100644 (file)
@@ -85,6 +85,9 @@ don't know how to recognize (e.g. some macros)."
   (let (alist)
     (with-temp-buffer
       (insert-file-contents file)
+      ;; Ensure shorthands available, as we will be `read'ing Elisp
+      ;; (bug#67523)
+      (let (enable-local-variables) (hack-local-variables))
       ;; FIXME we could theoretically be inside a string.
       (while (re-search-forward "^[ \t]*\\((declare-function\\)[ \t\n]" nil t)
         (let ((pos (match-beginning 1)))
@@ -147,6 +150,7 @@ is a string giving details of the error."
           (insert-file-contents fnfile)
           (unless cflag
             ;; If in Elisp, ensure syntax and shorthands available
+            ;; (bug#67523)
             (set-syntax-table emacs-lisp-mode-syntax-table)
             (let (enable-local-variables) (hack-local-variables)))
           ;; defsubst's don't _have_ to be known at compile time.