diff --git a/modules/lang/emacs-lisp/config.el b/modules/lang/emacs-lisp/config.el index 59b2fd241..c9126fba5 100644 --- a/modules/lang/emacs-lisp/config.el +++ b/modules/lang/emacs-lisp/config.el @@ -37,7 +37,11 @@ employed so that flycheck still does *some* helpful linting.") (pcase-dolist (`(,var . ,val) variables) (cond ((memq var ignored-local-variables)) ((memq var '(mode unibyte coding))) - ((eq var 'eval)) + ((eq var 'eval) + (and enable-local-eval + (not (or (hack-one-local-variable-eval-safep val) + (safe-local-variable-p var val))) + (message "Ignoring unsafe form in file local variable: %S" val))) ((not (safe-local-variable-p var val)) (message "Ignoring unsafe file local variable: %S" var)) ((risky-local-variable-p var val)