diff options
| author | João Távora | 2024-02-03 08:27:27 -0600 |
|---|---|---|
| committer | João Távora | 2024-02-03 08:40:03 -0600 |
| commit | 9a51fbb69fc9dc4aa415308889ae667ee65660d7 (patch) | |
| tree | c8f67ec41daf53c6f20156917afd9c696ac01203 | |
| parent | 817140a852e79c5ef3cf7dc5e4c50aa710e8c4a2 (diff) | |
| download | emacs-9a51fbb69fc9dc4aa415308889ae667ee65660d7.tar.gz 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)." | |||
| 85 | (let (alist) | 85 | (let (alist) |
| 86 | (with-temp-buffer | 86 | (with-temp-buffer |
| 87 | (insert-file-contents file) | 87 | (insert-file-contents file) |
| 88 | ;; Ensure shorthands available, as we will be `read'ing Elisp | ||
| 89 | ;; (bug#67523) | ||
| 90 | (let (enable-local-variables) (hack-local-variables)) | ||
| 88 | ;; FIXME we could theoretically be inside a string. | 91 | ;; FIXME we could theoretically be inside a string. |
| 89 | (while (re-search-forward "^[ \t]*\\((declare-function\\)[ \t\n]" nil t) | 92 | (while (re-search-forward "^[ \t]*\\((declare-function\\)[ \t\n]" nil t) |
| 90 | (let ((pos (match-beginning 1))) | 93 | (let ((pos (match-beginning 1))) |
| @@ -147,6 +150,7 @@ is a string giving details of the error." | |||
| 147 | (insert-file-contents fnfile) | 150 | (insert-file-contents fnfile) |
| 148 | (unless cflag | 151 | (unless cflag |
| 149 | ;; If in Elisp, ensure syntax and shorthands available | 152 | ;; If in Elisp, ensure syntax and shorthands available |
| 153 | ;; (bug#67523) | ||
| 150 | (set-syntax-table emacs-lisp-mode-syntax-table) | 154 | (set-syntax-table emacs-lisp-mode-syntax-table) |
| 151 | (let (enable-local-variables) (hack-local-variables))) | 155 | (let (enable-local-variables) (hack-local-variables))) |
| 152 | ;; defsubst's don't _have_ to be known at compile time. | 156 | ;; defsubst's don't _have_ to be known at compile time. |