summaryrefslogtreecommitdiff
path: root/lisp/shell.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-10-07 10:04:06 +0000
committerRichard M. Stallman <rms@gnu.org>1994-10-07 10:04:06 +0000
commit5945a1f78f38ca5ee6f8b45f41c4fa32745a41b9 (patch)
tree35ab7c538bce5d77e5388b76ba46f4e5cf14dd9d /lisp/shell.el
parenta1f6b0c60bc056da68f01b0173c7af16586876cf (diff)
downloademacs-5945a1f78f38ca5ee6f8b45f41c4fa32745a41b9.tar.gz
(shell-font-lock-keywords): New variable.
(shell-mode): Set font-lock-keywords locally.
Diffstat (limited to 'lisp/shell.el')
-rw-r--r--lisp/shell.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/lisp/shell.el b/lisp/shell.el
index becd26f65b0..594ea0bf444 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -271,6 +271,12 @@ Thus, this does not include the shell's current directory.")
(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 @@ buffer."
(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)