From fb69dfa50edca2c39b359a9cab2f129d550f4d3b Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 16 Apr 1995 03:20:40 +0000 Subject: [PATCH] (set-auto-mode): If -*- spec doesn't set `mode:', look for other ways of specifying major mode. --- lisp/files.el | 7 ++++--- 1 file 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 (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) -- 2.39.5