diff options
| author | Richard M. Stallman | 1994-10-07 10:04:06 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-10-07 10:04:06 +0000 |
| commit | 5945a1f78f38ca5ee6f8b45f41c4fa32745a41b9 (patch) | |
| tree | 35ab7c538bce5d77e5388b76ba46f4e5cf14dd9d /lisp/shell.el | |
| parent | a1f6b0c60bc056da68f01b0173c7af16586876cf (diff) | |
| download | emacs-5945a1f78f38ca5ee6f8b45f41c4fa32745a41b9.tar.gz emacs-5945a1f78f38ca5ee6f8b45f41c4fa32745a41b9.zip | |
(shell-font-lock-keywords): New variable.
(shell-mode): Set font-lock-keywords locally.
Diffstat (limited to 'lisp/shell.el')
| -rw-r--r-- | lisp/shell.el | 8 |
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.") | |||
| 271 | (defvar shell-mode-hook '() | 271 | (defvar shell-mode-hook '() |
| 272 | "*Hook for customising Shell mode.") | 272 | "*Hook for customising Shell mode.") |
| 273 | 273 | ||
| 274 | (defvar shell-font-lock-keywords | ||
| 275 | (list (cons shell-prompt-pattern 'font-lock-keyword-face) | ||
| 276 | '("[ \t]\\([+-][^ \t\n]+\\)" 1 font-lock-comment-face) | ||
| 277 | '("^[^ \t]+:.*$" . font-lock-string-face) | ||
| 278 | '("^\\[[1-9][0-9]*\\]" . font-lock-string-face)) | ||
| 279 | "Additional expressions to highlight in Shell mode.") | ||
| 274 | 280 | ||
| 275 | ;;; Basic Procedures | 281 | ;;; Basic Procedures |
| 276 | ;;; =========================================================================== | 282 | ;;; =========================================================================== |
| @@ -331,6 +337,8 @@ buffer." | |||
| 331 | (setq comint-dynamic-complete-functions shell-dynamic-complete-functions) | 337 | (setq comint-dynamic-complete-functions shell-dynamic-complete-functions) |
| 332 | (make-local-variable 'paragraph-start) | 338 | (make-local-variable 'paragraph-start) |
| 333 | (setq paragraph-start comint-prompt-regexp) | 339 | (setq paragraph-start comint-prompt-regexp) |
| 340 | (make-local-variable 'font-lock-keywords) | ||
| 341 | (setq font-lock-keywords shell-font-lock-keywords) | ||
| 334 | (make-local-variable 'shell-dirstack) | 342 | (make-local-variable 'shell-dirstack) |
| 335 | (setq shell-dirstack nil) | 343 | (setq shell-dirstack nil) |
| 336 | (setq shell-last-dir nil) | 344 | (setq shell-last-dir nil) |