]> code.delx.au - gnu-emacs/commitdiff
(set-auto-mode): If search for mode specification failed, look for an
authorEli Zaretskii <eliz@gnu.org>
Fri, 16 Dec 2005 15:44:39 +0000 (15:44 +0000)
committerEli Zaretskii <eliz@gnu.org>
Fri, 16 Dec 2005 15:44:39 +0000 (15:44 +0000)
interpreter specified on the first line.

lisp/ChangeLog
lisp/files.el

index 4fa3538b30ecc9d293a2975f92bd64766f85b57d..a442970132aa06ccb7b9f2c9fbb4daf076813feb 100644 (file)
@@ -1,3 +1,9 @@
+2005-12-16  Klaus Zeitler  <kzeitler@lucent.com>
+
+       * files.el (set-auto-mode): Look for an interpreter specified on
+       the first line also if search for mode specification succeeded,
+       but the mode is not known.
+
 2005-12-16  Carsten Dominik  <dominik@science.uva.nl>
 
        * textmodes/org.el: (org-tags-match-list-sublevels): New option.
index df78985e3be8e272fadf91af4fbb1b954b95158c..bb2342c2cefcac96d01a8eb45eec3ffbcaced068 100644 (file)
@@ -2098,7 +2098,8 @@ only set the major mode, if that would change it."
              (setq done t)
              (or (set-auto-mode-0 mode keep-mode-if-same)
                  ;; continuing would call minor modes again, toggling them off
-                 (throw 'nop nil)))))
+                 (throw 'nop nil))))))
+    (unless done
       ;; If we didn't, look for an interpreter specified in the first line.
       ;; As a special case, allow for things like "#!/bin/env perl", which
       ;; finds the interpreter anywhere in $PATH.