diff options
| author | Eli Zaretskii | 2005-12-16 15:44:39 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2005-12-16 15:44:39 +0000 |
| commit | ec6328a24a5b7e1fb3e307b276dc8ed07f2f3816 (patch) | |
| tree | df5d6a0bf5d4b25e9129fbae47d8e56d4dc0501c | |
| parent | 812a8ed127c914ca3397b01d0ba3e2384cc20770 (diff) | |
| download | emacs-ec6328a24a5b7e1fb3e307b276dc8ed07f2f3816.tar.gz emacs-ec6328a24a5b7e1fb3e307b276dc8ed07f2f3816.zip | |
(set-auto-mode): If search for mode specification failed, look for an
interpreter specified on the first line.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/files.el | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4fa3538b30e..a442970132a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2005-12-16 Klaus Zeitler <kzeitler@lucent.com> | ||
| 2 | |||
| 3 | * files.el (set-auto-mode): Look for an interpreter specified on | ||
| 4 | the first line also if search for mode specification succeeded, | ||
| 5 | but the mode is not known. | ||
| 6 | |||
| 1 | 2005-12-16 Carsten Dominik <dominik@science.uva.nl> | 7 | 2005-12-16 Carsten Dominik <dominik@science.uva.nl> |
| 2 | 8 | ||
| 3 | * textmodes/org.el: (org-tags-match-list-sublevels): New option. | 9 | * textmodes/org.el: (org-tags-match-list-sublevels): New option. |
diff --git a/lisp/files.el b/lisp/files.el index df78985e3be..bb2342c2cef 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -2098,7 +2098,8 @@ only set the major mode, if that would change it." | |||
| 2098 | (setq done t) | 2098 | (setq done t) |
| 2099 | (or (set-auto-mode-0 mode keep-mode-if-same) | 2099 | (or (set-auto-mode-0 mode keep-mode-if-same) |
| 2100 | ;; continuing would call minor modes again, toggling them off | 2100 | ;; continuing would call minor modes again, toggling them off |
| 2101 | (throw 'nop nil))))) | 2101 | (throw 'nop nil)))))) |
| 2102 | (unless done | ||
| 2102 | ;; If we didn't, look for an interpreter specified in the first line. | 2103 | ;; If we didn't, look for an interpreter specified in the first line. |
| 2103 | ;; As a special case, allow for things like "#!/bin/env perl", which | 2104 | ;; As a special case, allow for things like "#!/bin/env perl", which |
| 2104 | ;; finds the interpreter anywhere in $PATH. | 2105 | ;; finds the interpreter anywhere in $PATH. |