emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master b0e7974: Handle correctly an (undocumented) bare mo


From: Alan Mackenzie
Subject: [Emacs-diffs] master b0e7974: Handle correctly an (undocumented) bare mode in hack-local-variables.
Date: Thu, 24 Nov 2016 20:37:31 +0000 (UTC)

branch: master
commit b0e79741aa66bd76ee1d69d524d5a661bf7a9f9b
Author: Alan Mackenzie <address@hidden>
Commit: Alan Mackenzie <address@hidden>

    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 7c56f54..c56ff1d 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: '-*-' [ <variable> ':' <value> ';' ]* '-*-'



reply via email to

[Prev in Thread] Current Thread [Next in Thread]