mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-16 10:50:49 -08:00
Fix infinite recursion of conf-mode
* lisp/textmodes/conf-mode.el (conf-mode): Inhibit recursion when called from file-local variables (bug#50126).
This commit is contained in:
parent
657fe8b9d8
commit
c2026cf366
1 changed files with 5 additions and 1 deletions
|
|
@ -420,7 +420,11 @@ See also `conf-space-mode', `conf-colon-mode', `conf-javaprop-mode',
|
||||||
(advice-add 'conf-mode :around
|
(advice-add 'conf-mode :around
|
||||||
(lambda (orig-fun)
|
(lambda (orig-fun)
|
||||||
"Redirect to one of the submodes when called directly."
|
"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))))))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue