emacs-diffs
[Top][All Lists]
Advanced

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

master c2026cf 1/2: Fix infinite recursion of conf-mode


From: Lars Ingebrigtsen
Subject: master c2026cf 1/2: Fix infinite recursion of conf-mode
Date: Fri, 20 Aug 2021 09:57:15 -0400 (EDT)

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

    Fix infinite recursion of conf-mode
    
    * lisp/textmodes/conf-mode.el (conf-mode): Inhibit recursion when
    called from file-local variables (bug#50126).
---
 lisp/textmodes/conf-mode.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lisp/textmodes/conf-mode.el b/lisp/textmodes/conf-mode.el
index 5f34ae1..949d8cb 100644
--- a/lisp/textmodes/conf-mode.el
+++ b/lisp/textmodes/conf-mode.el
@@ -420,7 +420,11 @@ See also `conf-space-mode', `conf-colon-mode', 
`conf-javaprop-mode',
 (advice-add 'conf-mode :around
             (lambda (orig-fun)
               "Redirect to one of the submodes when called directly."
-              (funcall (if delay-mode-hooks orig-fun (conf--guess-mode)))))
+              ;; The file may have "mode: conf" in the local variable
+              ;; block, in which case we'll be called recursively
+              ;; infinitely.  Inhibit that.
+              (let ((enable-local-variables nil))
+                (funcall (if delay-mode-hooks orig-fun (conf--guess-mode))))))
 
 
 



reply via email to

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