]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix major-mode setting regression when there's a mode: cookie
authorLars Ingebrigtsen <larsi@gnus.org>
Mon, 18 Apr 2022 08:37:14 +0000 (10:37 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Mon, 18 Apr 2022 08:37:29 +0000 (10:37 +0200)
* lisp/files.el (hack-local-variables): Fix regression in setting
the major mode when there are mode: cookies in the file (bug#54993).

Do not merge to master.

lisp/files.el

index d8e7989672ad17209cd114ff28cbb17e07812b83..30e8da4da37c3d5bff60c153303c1d9877b06cf8 100644 (file)
@@ -3887,7 +3887,7 @@ inhibited."
       (with-demoted-errors "Directory-local variables error: %s"
        ;; Note this is a no-op if enable-local-variables is nil.
        (hack-dir-local-variables))
-      (let ((result (append (hack-local-variables--find-variables)
+      (let ((result (append (hack-local-variables--find-variables handle-mode)
                             (hack-local-variables-prop-line))))
         (if (and enable-local-variables
                  (not (inhibit-local-variables-p)))