changeset 9383:c4fa081b416e

(shell-font-lock-keywords): New variable. (shell-mode): Set font-lock-keywords locally.
author Richard M. Stallman <rms@gnu.org>
date Fri, 07 Oct 1994 10:04:06 +0000
parents ac2649a20967
children 798467725c8d
files lisp/shell.el
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/shell.el	Fri Oct 07 10:02:04 1994 +0000
+++ b/lisp/shell.el	Fri Oct 07 10:04:06 1994 +0000
@@ -271,6 +271,12 @@
 (defvar shell-mode-hook '()
   "*Hook for customising Shell mode.")
 
+(defvar shell-font-lock-keywords
+  (list (cons shell-prompt-pattern 'font-lock-keyword-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 Shell mode.")
 
 ;;; Basic Procedures
 ;;; ===========================================================================
@@ -331,6 +337,8 @@
   (setq comint-dynamic-complete-functions shell-dynamic-complete-functions)
   (make-local-variable 'paragraph-start)
   (setq paragraph-start comint-prompt-regexp)
+  (make-local-variable 'font-lock-keywords)
+  (setq font-lock-keywords shell-font-lock-keywords)
   (make-local-variable 'shell-dirstack)
   (setq shell-dirstack nil)
   (setq shell-last-dir nil)