emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 454a55dbd96 1/5: (dir-locals-collect-variables): Avoid spurious s


From: Stefan Monnier
Subject: master 454a55dbd96 1/5: (dir-locals-collect-variables): Avoid spurious safety warnings
Date: Sat, 9 Mar 2024 10:38:50 -0500 (EST)

branch: master
commit 454a55dbd963d4b07c0dc0f6d540cc5fd4b4faa7
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>

    (dir-locals-collect-variables): Avoid spurious safety warnings
    
    * lisp/files.el (dir-locals-collect-variables): Silence warnings for
    extra parents' variables.
---
 lisp/files.el | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lisp/files.el b/lisp/files.el
index dd7580b6580..3ca4f047144 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -4446,6 +4446,12 @@ to see whether it should be considered."
                   (funcall predicate key)
                 (or (not key)
                     (derived-mode-p key)))
+              ;; If KEY is an extra parent it may remain not loaded
+              ;; (hence with some of its mode-specific vars missing their
+              ;; `safe-local-variable' property), leading to spurious
+              ;; prompts about unsafe vars (bug#68246).
+              (if (and (symbolp key) (autoloadp (indirect-function key)))
+                  (ignore-errors (autoload-do-load (indirect-function key))))
               (let* ((alist (cdr entry))
                      (subdirs (assq 'subdirs alist)))
                 (if (or (not subdirs)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]