]> code.delx.au - gnu-emacs/commitdiff
Tweak previous files.el change.
authorGlenn Morris <rgm@gnu.org>
Sun, 22 May 2011 00:34:41 +0000 (17:34 -0700)
committerGlenn Morris <rgm@gnu.org>
Sun, 22 May 2011 00:34:41 +0000 (17:34 -0700)
* lisp/files.el (hack-local-variables-prop-line)
(hack-local-variables): In the MODE-ONLY case, return the full mode
symbol, including "-mode".

lisp/files.el

index f4168c107b1a01206ce35b84730e8e7be5e8c0e7..1d560ace0656b8cc4ecebf1a94de47b30f866214 100644 (file)
@@ -3049,7 +3049,7 @@ mode, if there is one, otherwise nil."
            ((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 @@ mode, if there is one, otherwise nil."
                      (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 @@ is specified, and return the corresponding mode symbol, or nil."
                        (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)