Fix regression with multiple mode: entries in the prop line
* lisp/files.el (hack-local-variables--find-variables): Use the final mode: line (which is the same as having several mode: bits in the header line.
This commit is contained in:
parent
35592141cc
commit
e45abc832d
3 changed files with 6 additions and 1 deletions
|
@ -3900,7 +3900,7 @@ inhibited."
|
|||
;; Note this is a no-op if enable-local-variables is nil.
|
||||
(hack-dir-local-variables))
|
||||
(let ((result (append (hack-local-variables--find-variables handle-mode)
|
||||
(hack-local-variables-prop-line))))
|
||||
(hack-local-variables-prop-line handle-mode))))
|
||||
(if (and enable-local-variables
|
||||
(not (inhibit-local-variables-p)))
|
||||
(progn
|
||||
|
|
1
test/lisp/files-resources/file-mode-prop-line
Normal file
1
test/lisp/files-resources/file-mode-prop-line
Normal file
|
@ -0,0 +1 @@
|
|||
-*- mode: notexist; mode: text -*-
|
|
@ -1825,5 +1825,9 @@ Prompt users for any modified buffer with `buffer-offer-save' non-nil."
|
|||
(find-file (ert-resource-file "file-mode-multiple"))
|
||||
(should (eq major-mode 'outline-mode)))
|
||||
|
||||
(ert-deftest files-test-set-mode-prop-line ()
|
||||
(find-file (ert-resource-file "file-mode-prop-line"))
|
||||
(should (eq major-mode 'text-mode)))
|
||||
|
||||
(provide 'files-tests)
|
||||
;;; files-tests.el ends here
|
||||
|
|
Loading…
Add table
Reference in a new issue