# HG changeset patch # User Eli Zaretskii # Date 1134747681 0 # Node ID 38379232f2f6e67a5b7c49ba2da2195d432f285b # Parent d77c3edcebd353bb3cb1615379ec1b4bcc650f35 (set-auto-mode): If search for mode specification failed, look for an interpreter specified on the first line. diff -r d77c3edcebd3 -r 38379232f2f6 lisp/files.el --- a/lisp/files.el Fri Dec 16 14:32:51 2005 +0000 +++ b/lisp/files.el Fri Dec 16 15:41:21 2005 +0000 @@ -2098,7 +2098,8 @@ (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.