aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Mackenzie2016-11-24 20:34:42 +0000
committerAlan Mackenzie2016-11-24 20:34:42 +0000
commitb0e79741aa66bd76ee1d69d524d5a661bf7a9f9b (patch)
treeefaba783b3eda721ece40857ca4b79ed558f43ad
parentdfc5b0f65531ef71cbd2c0cc956c246ea4239612 (diff)
downloademacs-b0e79741aa66bd76ee1d69d524d5a661bf7a9f9b.tar.gz
emacs-b0e79741aa66bd76ee1d69d524d5a661bf7a9f9b.zip
Handle correctly an (undocumented) bare mode in hack-local-variables.
lisp/files.el (hack-local-variables-prop-line): When a file's first line contains only a mode specification without the string "mode:", return the mode symbol only when `handle-mode' is t.
-rw-r--r--lisp/files.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/files.el b/lisp/files.el
index 7c56f54a463..c56ff1df561 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -3250,7 +3250,7 @@ return as the symbol specifying the mode."
3250 nil) 3250 nil)
3251 ((looking-at "[ \t]*\\([^ \t\n\r:;]+\\)\\([ \t]*-\\*-\\)") 3251 ((looking-at "[ \t]*\\([^ \t\n\r:;]+\\)\\([ \t]*-\\*-\\)")
3252 ;; Simple form: "-*- MODENAME -*-". 3252 ;; Simple form: "-*- MODENAME -*-".
3253 (if (memq handle-mode '(nil t)) 3253 (if (eq handle-mode t)
3254 (intern (concat (match-string 1) "-mode")))) 3254 (intern (concat (match-string 1) "-mode"))))
3255 (t 3255 (t
3256 ;; Hairy form: '-*-' [ <variable> ':' <value> ';' ]* '-*-' 3256 ;; Hairy form: '-*-' [ <variable> ':' <value> ';' ]* '-*-'