((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).
(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)
(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)