changeset 5726:781af712e68c

(font-lock-set-defaults): Handle shell mode. (shell-font-lock-keywords): New variable.
author Richard M. Stallman <rms@gnu.org>
date Tue, 01 Feb 1994 23:10:41 +0000
parents 45d91f2b3810
children 18518992600c
files lisp/font-lock.el
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/font-lock.el	Tue Feb 01 18:24:12 1994 +0000
+++ b/lisp/font-lock.el	Tue Feb 01 23:10:41 1994 +0000
@@ -437,6 +437,7 @@
 		  ((eq major-mode 'perl-mode) 	    perl-font-lock-keywords)
 		  ((eq major-mode 'tex-mode)        tex-font-lock-keywords)
 		  ((eq major-mode 'texinfo-mode)    texi-font-lock-keywords)
+		  ((eq major-mode 'shell-mode)      shell-font-lock-keywords)
 		  (t nil)))))
 
 (defconst lisp-font-lock-keywords-1
@@ -635,6 +636,15 @@
    )
   "Additional expressions to highlight in TeXinfo mode.")
 
+(defvar shell-font-lock-keywords
+  (list (cons shell-prompt-pattern 'font-lock-keyword-face)
+	(list (concat shell-prompt-pattern "\\([^ \t]+\\)")
+	      1 'font-lock-function-name-face)
+	'("[ \t]\\([+-][^ \t\n]+\\)" 1 font-lock-comment-face)
+	'("^[^ \t]+:.*$" . font-lock-string-face)
+	'("^\\[[1-9][0-9]*\\]" . font-lock-string-face))
+  "Additional expressions to highlight in TeXinfo mode.")
+
 (provide 'font-lock)
 
 ;;; font-lock.el ends here