summaryrefslogtreecommitdiff
path: root/lisp/files.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1996-01-05 02:34:37 +0000
committerRichard M. Stallman <rms@gnu.org>1996-01-05 02:34:37 +0000
commit658e40815d79c4fe4bcea95fc347a8182a22ac28 (patch)
tree000b794d2c13c07b39e00df61a4a3dba129ceb56 /lisp/files.el
parent50a7b97ce3e8f4c0437b3c4992f02bc207ec8fa1 (diff)
downloademacs-658e40815d79c4fe4bcea95fc347a8182a22ac28.tar.gz
(interpreter-mode-alist): Add most shells, with sh-mode.
Add tail, more, less, pg with text-mode. (auto-mode-alist): Recognize extensions that indicate shell scripts, as well as common init file names.
Diffstat (limited to 'lisp/files.el')
-rw-r--r--lisp/files.el27
1 files changed, 26 insertions, 1 deletions
diff --git a/lisp/files.el b/lisp/files.el
index d4bf199b1ae..e512b75adc5 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -940,6 +940,10 @@ run `normal-mode' explicitly."
("ChangeLog.[0-9]+\\'" . change-log-mode)
("\\$CHANGE_LOG\\$\\.TXT" . change-log-mode)
("\\.scm\\.[0-9]*\\'" . scheme-mode)
+ ("\\.c?sh\\'\\|\\.shar\\'\\|/\\.z?profile\\'" . sh-mode)
+ ("/\\.\\(bash_profile\\|z?login\\|bash_login\\|z?logout\\)\\'" . sh-mode)
+ ("/\\.\\(bash_logout\\|[kz]shrc\\|bashrc\\|t?cshrc\\|esrc\\)\\'" . sh-mode)
+ ("/\\.\\([kz]shenv\\|xinitrc\\|startxrc\\|xsession\\)\\'" . sh-mode)
;;; The following should come after the ChangeLog pattern
;;; for the sake of ChangeLog.1, etc.
;;; and after the .scm.[0-9] pattern too.
@@ -998,7 +1002,28 @@ REGEXP and search the list again for another match.")
("awk" . awk-mode)
("nawk" . awk-mode)
("gawk" . awk-mode)
- ("scm" . scheme-mode))
+ ("scm" . scheme-mode)
+ ("ash" . sh-mode)
+ ("bash" . sh-mode)
+ ("csh" . sh-mode)
+ ("dtksh" . sh-mode)
+ ("es" . sh-mode)
+ ("itcsh" . sh-mode)
+ ("jsh" . sh-mode)
+ ("ksh" . sh-mode)
+ ("oash" . sh-mode)
+ ("pdksh" . sh-mode)
+ ("rc" . sh-mode)
+ ("sh" . sh-mode)
+ ("sh5" . sh-mode)
+ ("tcsh" . sh-mode)
+ ("wksh" . sh-mode)
+ ("wsh" . sh-mode)
+ ("zsh" . sh-mode)
+ ("tail" . text-mode)
+ ("more" . text-mode)
+ ("less" . text-mode)
+ ("pg" . text-mode))
"Alist mapping interpreter names to major modes.
This alist applies to files whose first line starts with `#!'.
Each element looks like (INTERPRETER . MODE).