mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-19 06:31:34 -08:00
(set-auto-mode): If -*- spec doesn't set `mode:',
look for other ways of specifying major mode.
This commit is contained in:
parent
e363091e2c
commit
fb69dfa50e
1 changed files with 4 additions and 3 deletions
|
|
@ -991,10 +991,11 @@ If `enable-local-variables' is nil, this function does not check for a
|
|||
(forward-char -1)
|
||||
(goto-char end))
|
||||
(skip-chars-backward " \t")
|
||||
(funcall (intern (concat (downcase (buffer-substring beg (point))) "-mode"))))
|
||||
(funcall (intern (concat (downcase (buffer-substring beg (point))) "-mode")))
|
||||
(setq done t))
|
||||
;; Simple -*-MODE-*- case.
|
||||
(funcall (intern (concat (downcase (buffer-substring beg end)) "-mode"))))
|
||||
(setq done t)))
|
||||
(funcall (intern (concat (downcase (buffer-substring beg end)) "-mode")))
|
||||
(setq done t))))
|
||||
;; If we didn't find a mode from a -*- line, try using the file name.
|
||||
(if (and (not done) buffer-file-name)
|
||||
(let ((name buffer-file-name)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue