changeset 11463:7a4512fba8bc

(set-auto-mode): If -*- spec doesn't set `mode:', look for other ways of specifying major mode.
author Richard M. Stallman <rms@gnu.org>
date Sun, 16 Apr 1995 03:20:40 +0000
parents b3c30d040767
children 4921121fbdc0
files lisp/files.el
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/files.el	Sat Apr 15 18:34:01 1995 +0000
+++ b/lisp/files.el	Sun Apr 16 03:20:40 1995 +0000
@@ -991,10 +991,11 @@
 		       (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)