* lisp/files.el (hack-one-local-variable): Use set-auto-mode-0

This fixes bug#69373.
This commit is contained in:
Stefan Monnier 2024-02-25 11:35:44 -05:00
parent 0530800175
commit b7cef701cb

View file

@ -4238,10 +4238,8 @@ already the major mode."
(pcase var
('mode
(let ((mode (intern (concat (downcase (symbol-name val))
"-mode"))))
(unless (eq (indirect-function mode)
(indirect-function major-mode))
(funcall mode))))
"-mode"))))
(set-auto-mode-0 mode t)))
('eval
(pcase val
(`(add-hook ',hook . ,_) (hack-one-local-variable--obsolete hook)))