diff options
| author | Richard M. Stallman | 1994-05-23 09:48:37 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-05-23 09:48:37 +0000 |
| commit | e3998da17a69530b9b59cf1d1d86395a2eb7ad5d (patch) | |
| tree | aae4fcac1dd920d6dd7375fea853b9a769cdd867 /lisp | |
| parent | 7dbf73697a9e518720a8489babe66223918fee66 (diff) | |
| download | emacs-e3998da17a69530b9b59cf1d1d86395a2eb7ad5d.tar.gz emacs-e3998da17a69530b9b59cf1d1d86395a2eb7ad5d.zip | |
(interpreter-mode-alist): Add wishx, tclsh.
Delete form, scope, shell.
(set-auto-mode): Don't get confused by args after #! shell name.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/files.el | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/lisp/files.el b/lisp/files.el index b64bb047af4..da51f543149 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -847,11 +847,10 @@ again for another match.") | |||
| 847 | 847 | ||
| 848 | (defconst interpreter-mode-alist | 848 | (defconst interpreter-mode-alist |
| 849 | '(("perl" . perl-mode) | 849 | '(("perl" . perl-mode) |
| 850 | ("scope" . tcl-mode) | ||
| 851 | ("wish" . tcl-mode) | 850 | ("wish" . tcl-mode) |
| 852 | ("shell" . tcl-mode) | 851 | ("wishx" . tcl-mode) |
| 853 | ("form" . tcl-mode) | ||
| 854 | ("tcl" . tcl-mode) | 852 | ("tcl" . tcl-mode) |
| 853 | ("tclsh" . tcl-mode) | ||
| 855 | ("awk" . awk-mode) | 854 | ("awk" . awk-mode) |
| 856 | ("gawk" . awk-mode) | 855 | ("gawk" . awk-mode) |
| 857 | ("scm" . scheme-mode)) | 856 | ("scm" . scheme-mode)) |
| @@ -871,10 +870,13 @@ If it matches, mode MODE is selected.") | |||
| 871 | 870 | ||
| 872 | (defun set-auto-mode () | 871 | (defun set-auto-mode () |
| 873 | "Select major mode appropriate for current buffer. | 872 | "Select major mode appropriate for current buffer. |
| 874 | This checks for a -*- mode tag in the buffer's text, or | 873 | This checks for a -*- mode tag in the buffer's text, |
| 875 | compares the filename against the entries in `auto-mode-alist'. It does | 874 | compares the filename against the entries in `auto-mode-alist', |
| 876 | not check for the \"mode:\" local variable in the Local Variables | 875 | or checks the interpreter that runs this file against |
| 877 | section of the file; for that, use `hack-local-variables'. | 876 | `interpreter-mode-alist'. |
| 877 | |||
| 878 | It does not check for the `mode:' local variable in the | ||
| 879 | Local Variables section of the file; for that, use `hack-local-variables'. | ||
| 878 | 880 | ||
| 879 | If `enable-local-variables' is nil, this function does not check for a | 881 | If `enable-local-variables' is nil, this function does not check for a |
| 880 | -*- mode tag." | 882 | -*- mode tag." |
| @@ -958,11 +960,9 @@ If `enable-local-variables' is nil, this function does not check for a | |||
| 958 | (let ((interpreter | 960 | (let ((interpreter |
| 959 | (save-excursion | 961 | (save-excursion |
| 960 | (goto-char (point-min)) | 962 | (goto-char (point-min)) |
| 961 | (if (looking-at "#! *") | 963 | (if (looking-at "#! *\\([^ \t\n]+\\)") |
| 962 | (progn | 964 | (buffer-substring (match-beginning 1) |
| 963 | (goto-char (match-end 0)) | 965 | (match-end 1)) |
| 964 | (buffer-substring (point) | ||
| 965 | (progn (end-of-line) (point)))) | ||
| 966 | ""))) | 966 | ""))) |
| 967 | elt) | 967 | elt) |
| 968 | ;; Map interpreter name to a mode. | 968 | ;; Map interpreter name to a mode. |