diff options
author | João Távora <joaotavora@gmail.com> | 2024-02-03 08:27:27 -0600 |
---|---|---|
committer | João Távora <joaotavora@gmail.com> | 2024-02-03 08:40:03 -0600 |
commit | 9a51fbb69fc9dc4aa415308889ae667ee65660d7 (patch) | |
tree | c8f67ec41daf53c6f20156917afd9c696ac01203 | |
parent | 817140a852e79c5ef3cf7dc5e4c50aa710e8c4a2 (diff) | |
download | emacs-9a51fbb69fc9dc4aa415308889ae667ee65660d7.tar.gz emacs-9a51fbb69fc9dc4aa415308889ae667ee65660d7.tar.bz2 emacs-9a51fbb69fc9dc4aa415308889ae667ee65660d7.zip |
; Also consider shorthands in check-declare-scan (bug#67523)
* lisp/emacs-lisp/check-declare.el (check-declare-scan): Also
consider shorthands here.
-rw-r--r-- | lisp/emacs-lisp/check-declare.el | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/check-declare.el b/lisp/emacs-lisp/check-declare.el index b4a7b4b33e6..a6d1a330d90 100644 --- a/lisp/emacs-lisp/check-declare.el +++ b/lisp/emacs-lisp/check-declare.el @@ -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. |