From: Alan Mackenzie Date: Thu, 24 Nov 2016 20:34:42 +0000 (+0000) Subject: Handle correctly an (undocumented) bare mode in hack-local-variables. X-Git-Tag: emacs-26.0.90~1271 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b0e79741aa66bd76ee1d69d524d5a661bf7a9f9b;p=emacs.git 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. --- 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: '-*-' [ ':' ';' ]* '-*-'