aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1995-04-16 03:20:40 +0000
committerRichard M. Stallman1995-04-16 03:20:40 +0000
commitfb69dfa50edca2c39b359a9cab2f129d550f4d3b (patch)
tree12ae7d2c56ac947e9a0ba4ba6daf77c1c6f94248
parente363091e2ca7dafea60c618efd59465693986a1d (diff)
downloademacs-fb69dfa50edca2c39b359a9cab2f129d550f4d3b.tar.gz
emacs-fb69dfa50edca2c39b359a9cab2f129d550f4d3b.zip
(set-auto-mode): If -*- spec doesn't set `mode:',
look for other ways of specifying major mode.
-rw-r--r--lisp/files.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/files.el b/lisp/files.el
index 5d9795aedda..6f85e79e4ac 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -991,10 +991,11 @@ If `enable-local-variables' is nil, this function does not check for a
991 (forward-char -1) 991 (forward-char -1)
992 (goto-char end)) 992 (goto-char end))
993 (skip-chars-backward " \t") 993 (skip-chars-backward " \t")
994 (funcall (intern (concat (downcase (buffer-substring beg (point))) "-mode")))) 994 (funcall (intern (concat (downcase (buffer-substring beg (point))) "-mode")))
995 (setq done t))
995 ;; Simple -*-MODE-*- case. 996 ;; Simple -*-MODE-*- case.
996 (funcall (intern (concat (downcase (buffer-substring beg end)) "-mode")))) 997 (funcall (intern (concat (downcase (buffer-substring beg end)) "-mode")))
997 (setq done t))) 998 (setq done t))))
998 ;; If we didn't find a mode from a -*- line, try using the file name. 999 ;; If we didn't find a mode from a -*- line, try using the file name.
999 (if (and (not done) buffer-file-name) 1000 (if (and (not done) buffer-file-name)
1000 (let ((name buffer-file-name) 1001 (let ((name buffer-file-name)