]> git.eshelyaron.com Git - emacs.git/commitdiff
Handle correctly an (undocumented) bare mode in hack-local-variables.
authorAlan Mackenzie <acm@muc.de>
Thu, 24 Nov 2016 20:34:42 +0000 (20:34 +0000)
committerAlan Mackenzie <acm@muc.de>
Thu, 24 Nov 2016 20:34:42 +0000 (20:34 +0000)
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

index 7c56f54a463101f7a5b0d2a3cdeb27a64965bdc0..c56ff1df561315f52e14e53ba6111ef5c5f415c0 100644 (file)
@@ -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: '-*-' [ <variable> ':' <value> ';' ]* '-*-'