aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLars Ingebrigtsen2022-04-19 18:06:31 +0200
committerLars Ingebrigtsen2022-04-19 18:06:31 +0200
commite45abc832db7d1a64a0761dcb51565b7c282999a (patch)
tree9672c3aa7c659336e5d91118168a5bc8c5f0bab1 /test
parent35592141cc8951c91a4bd6cc02f73d1ddd35aca4 (diff)
downloademacs-e45abc832db7d1a64a0761dcb51565b7c282999a.tar.gz
emacs-e45abc832db7d1a64a0761dcb51565b7c282999a.zip
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.
Diffstat (limited to 'test')
-rw-r--r--test/lisp/files-resources/file-mode-prop-line1
-rw-r--r--test/lisp/files-tests.el4
2 files changed, 5 insertions, 0 deletions
diff --git a/test/lisp/files-resources/file-mode-prop-line b/test/lisp/files-resources/file-mode-prop-line
new file mode 100644
index 00000000000..e0e7ad24d71
--- /dev/null
+++ b/test/lisp/files-resources/file-mode-prop-line
@@ -0,0 +1 @@
-*- mode: notexist; mode: text -*-
diff --git a/test/lisp/files-tests.el b/test/lisp/files-tests.el
index c886bd79851..c5b0fe0bbbc 100644
--- a/test/lisp/files-tests.el
+++ b/test/lisp/files-tests.el
@@ -1825,5 +1825,9 @@ Prompt users for any modified buffer with `buffer-offer-save' non-nil."
1825 (find-file (ert-resource-file "file-mode-multiple")) 1825 (find-file (ert-resource-file "file-mode-multiple"))
1826 (should (eq major-mode 'outline-mode))) 1826 (should (eq major-mode 'outline-mode)))
1827 1827
1828(ert-deftest files-test-set-mode-prop-line ()
1829 (find-file (ert-resource-file "file-mode-prop-line"))
1830 (should (eq major-mode 'text-mode)))
1831
1828(provide 'files-tests) 1832(provide 'files-tests)
1829;;; files-tests.el ends here 1833;;; files-tests.el ends here