>From f301d839031f78b303d698d7bca1f0b27264d2d8 Mon Sep 17 00:00:00 2001 From: Joseph Turner Date: Sat, 3 Feb 2024 11:56:31 -0800 Subject: [PATCH] ; Bind enable-local-variables to :safe for shorthands (bug#67523) * lisp/emacs-lisp/check-declare.el (check-declare-scan): (check-declare-verify): --- lisp/emacs-lisp/check-declare.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/emacs-lisp/check-declare.el b/lisp/emacs-lisp/check-declare.el index a6d1a330d90..eff37828f65 100644 --- a/lisp/emacs-lisp/check-declare.el +++ b/lisp/emacs-lisp/check-declare.el @@ -87,7 +87,7 @@ don't know how to recognize (e.g. some macros)." (insert-file-contents file) ;; Ensure shorthands available, as we will be `read'ing Elisp ;; (bug#67523) - (let (enable-local-variables) (hack-local-variables)) + (let ((enable-local-variables :safe)) (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))) @@ -152,7 +152,7 @@ is a string giving details of the error." ;; 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))) + (let ((enable-local-variables :safe)) (hack-local-variables))) ;; defsubst's don't _have_ to be known at compile time. (setq re (if cflag (format "^[ \t]*\\(DEFUN\\)[ \t]*([ \t]*\"%s\"" -- 2.41.0