emacs-diffs
[Top][All Lists]
Advanced

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

master df17725: Handle syntactically invalid .dir-locals.el files better


From: Lars Ingebrigtsen
Subject: master df17725: Handle syntactically invalid .dir-locals.el files better
Date: Tue, 25 May 2021 16:17:47 -0400 (EDT)

branch: master
commit df17725c80d60f1514488d40d2598ecb9e8382e9
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Handle syntactically invalid .dir-locals.el files better
    
    * lisp/files.el (dir-locals-read-from-dir): Handle syntactically
    invalid .dir-locals.el files more gently (bug#48568).  Give a
    message instead of bugging out later.
---
 lisp/files.el | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lisp/files.el b/lisp/files.el
index 62e1702..c694507 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -4359,6 +4359,9 @@ Return the new class name, which is a symbol named DIR."
                      (let ((read-circle nil))
                        (read (current-buffer)))
                    (end-of-file nil))))
+            (unless (listp newvars)
+              (message "Invalid data in %s: %s" file newvars)
+              (setq newvars nil))
             (setq variables
                   ;; Try and avoid loading `map' since that also loads cl-lib
                   ;; which then might hamper bytecomp warnings (bug#30635).



reply via email to

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