summaryrefslogtreecommitdiff
path: root/lisp/files.el
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2011-05-21 17:34:41 -0700
committerGlenn Morris <rgm@gnu.org>2011-05-21 17:34:41 -0700
commit80614e570147005ed87f1f676c7d4926930eba6e (patch)
tree68f06e05b854d5c31c255343c7ecfabfd84b3cb9 /lisp/files.el
parent88dfa7568ae64b931913412f9f85cb5c3749e3fa (diff)
downloademacs-80614e570147005ed87f1f676c7d4926930eba6e.tar.gz
emacs-80614e570147005ed87f1f676c7d4926930eba6e.tar.bz2
emacs-80614e570147005ed87f1f676c7d4926930eba6e.zip
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".
Diffstat (limited to 'lisp/files.el')
-rw-r--r--lisp/files.el9
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/files.el b/lisp/files.el
index f4168c107b1..1d560ace065 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -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)