emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r104312: Tweak previous files.el chan


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r104312: Tweak previous files.el change.
Date: Sat, 21 May 2011 17:34:41 -0700
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 104312
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Sat 2011-05-21 17:34:41 -0700
message:
  Tweak previous files.el change.
  
  * lisp/files.el (hack-local-variables-prop-line)
  (hack-local-variables): In the MODE-ONLY case, return the full mode
  symbol, including "-mode".
modified:
  lisp/files.el
=== modified file 'lisp/files.el'
--- a/lisp/files.el     2011-05-22 00:04:49 +0000
+++ b/lisp/files.el     2011-05-22 00:34:41 +0000
@@ -3049,7 +3049,7 @@
            ((looking-at "[ \t]*\\([^ \t\n\r:;]+\\)\\([ \t]*-\\*-\\)")
             ;; Simple form: "-*- MODENAME -*-".
             (if mode-only
-                (intern (match-string 1))))
+                (intern (concat (match-string 1) "-mode"))))
            (t
             ;; Hairy form: '-*-' [ <variable> ':' <value> ';' ]* '-*-'
             ;; (last ";" is optional).
@@ -3077,7 +3077,8 @@
                      (keyname (downcase (symbol-name key))))
                 (if mode-only
                     (and (equal keyname "mode")
-                         (setq result val))
+                         (setq result
+                               (intern (concat (symbol-name val) "-mode"))))
                   (or (equal keyname "coding")
                       (condition-case nil
                           (push (cons (if (eq key 'eval)
@@ -3233,7 +3234,9 @@
                        (setq val (read (current-buffer))))
                      (if mode-only
                          (if (eq var 'mode)
-                             (setq result val))
+                             (setq result
+                                   (intern (concat (symbol-name val)
+                                                   "-mode"))))
                        (unless (eq var 'coding)
                          (condition-case nil
                              (push (cons (if (eq var 'eval)


reply via email to

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