aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2011-05-21 17:34:41 -0700
committerGlenn Morris2011-05-21 17:34:41 -0700
commit80614e570147005ed87f1f676c7d4926930eba6e (patch)
tree68f06e05b854d5c31c255343c7ecfabfd84b3cb9
parent88dfa7568ae64b931913412f9f85cb5c3749e3fa (diff)
downloademacs-80614e570147005ed87f1f676c7d4926930eba6e.tar.gz
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".
-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."
3049 ((looking-at "[ \t]*\\([^ \t\n\r:;]+\\)\\([ \t]*-\\*-\\)") 3049 ((looking-at "[ \t]*\\([^ \t\n\r:;]+\\)\\([ \t]*-\\*-\\)")
3050 ;; Simple form: "-*- MODENAME -*-". 3050 ;; Simple form: "-*- MODENAME -*-".
3051 (if mode-only 3051 (if mode-only
3052 (intern (match-string 1)))) 3052 (intern (concat (match-string 1) "-mode"))))
3053 (t 3053 (t
3054 ;; Hairy form: '-*-' [ <variable> ':' <value> ';' ]* '-*-' 3054 ;; Hairy form: '-*-' [ <variable> ':' <value> ';' ]* '-*-'
3055 ;; (last ";" is optional). 3055 ;; (last ";" is optional).
@@ -3077,7 +3077,8 @@ mode, if there is one, otherwise nil."
3077 (keyname (downcase (symbol-name key)))) 3077 (keyname (downcase (symbol-name key))))
3078 (if mode-only 3078 (if mode-only
3079 (and (equal keyname "mode") 3079 (and (equal keyname "mode")
3080 (setq result val)) 3080 (setq result
3081 (intern (concat (symbol-name val) "-mode"))))
3081 (or (equal keyname "coding") 3082 (or (equal keyname "coding")
3082 (condition-case nil 3083 (condition-case nil
3083 (push (cons (if (eq key 'eval) 3084 (push (cons (if (eq key 'eval)
@@ -3233,7 +3234,9 @@ is specified, and return the corresponding mode symbol, or nil."
3233 (setq val (read (current-buffer)))) 3234 (setq val (read (current-buffer))))
3234 (if mode-only 3235 (if mode-only
3235 (if (eq var 'mode) 3236 (if (eq var 'mode)
3236 (setq result val)) 3237 (setq result
3238 (intern (concat (symbol-name val)
3239 "-mode"))))
3237 (unless (eq var 'coding) 3240 (unless (eq var 'coding)
3238 (condition-case nil 3241 (condition-case nil
3239 (push (cons (if (eq var 'eval) 3242 (push (cons (if (eq var 'eval)