From b0e79741aa66bd76ee1d69d524d5a661bf7a9f9b Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Thu, 24 Nov 2016 20:34:42 +0000 Subject: [PATCH] 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. --- lisp/files.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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." nil) ((looking-at "[ \t]*\\([^ \t\n\r:;]+\\)\\([ \t]*-\\*-\\)") ;; Simple form: "-*- MODENAME -*-". - (if (memq handle-mode '(nil t)) + (if (eq handle-mode t) (intern (concat (match-string 1) "-mode")))) (t ;; Hairy form: '-*-' [ ':' ';' ]* '-*-' -- 2.11.4.GIT