aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
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)