# HG changeset patch # User Richard M. Stallman # Date 781524246 0 # Node ID c4fa081b416ebe94a878bb22dd72709d29b18b33 # Parent ac2649a20967c1164d189fc12f4bbdc8f49a24e8 (shell-font-lock-keywords): New variable. (shell-mode): Set font-lock-keywords locally. diff -r ac2649a20967 -r c4fa081b416e lisp/shell.el --- 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)