1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-23 07:19:15 +00:00

* shell.el: (shell-font-lock-keywords): Add `\n' to [^] regexps.

(shell-mode): Set font-lock-defaults.
This commit is contained in:
Simon Marshall 1994-10-12 09:18:53 +00:00
parent 0ffb818c8f
commit c156572ff2

View File

@ -94,6 +94,7 @@
;;; m-c-b shell-backward-command Backward a shell command ;;; m-c-b shell-backward-command Backward a shell command
;;; dirs Resync the buffer's dir stack ;;; dirs Resync the buffer's dir stack
;;; dirtrack-toggle Turn dir tracking on/off ;;; dirtrack-toggle Turn dir tracking on/off
;;; shell-strip-ctrl-m Remove trailing ^Ms from output
;;; ;;;
;;; The shell mode hook is shell-mode-hook ;;; The shell mode hook is shell-mode-hook
;;; comint-prompt-regexp is initialised to shell-prompt-pattern, for backwards ;;; comint-prompt-regexp is initialised to shell-prompt-pattern, for backwards
@ -274,7 +275,7 @@ Thus, this does not include the shell's current directory.")
(defvar shell-font-lock-keywords (defvar shell-font-lock-keywords
(list (cons shell-prompt-pattern 'font-lock-keyword-face) (list (cons shell-prompt-pattern 'font-lock-keyword-face)
'("[ \t]\\([+-][^ \t\n]+\\)" 1 font-lock-comment-face) '("[ \t]\\([+-][^ \t\n]+\\)" 1 font-lock-comment-face)
'("^[^ \t]+:.*$" . font-lock-string-face) '("^[^ \t\n]+:.*$" . font-lock-string-face)
'("^\\[[1-9][0-9]*\\]" . font-lock-string-face)) '("^\\[[1-9][0-9]*\\]" . font-lock-string-face))
"Additional expressions to highlight in Shell mode.") "Additional expressions to highlight in Shell mode.")
@ -337,8 +338,8 @@ buffer."
(setq comint-dynamic-complete-functions shell-dynamic-complete-functions) (setq comint-dynamic-complete-functions shell-dynamic-complete-functions)
(make-local-variable 'paragraph-start) (make-local-variable 'paragraph-start)
(setq paragraph-start comint-prompt-regexp) (setq paragraph-start comint-prompt-regexp)
(make-local-variable 'font-lock-keywords) (make-local-variable 'font-lock-defaults)
(setq font-lock-keywords shell-font-lock-keywords) (setq font-lock-defaults '(shell-font-lock-keywords t))
(make-local-variable 'shell-dirstack) (make-local-variable 'shell-dirstack)
(setq shell-dirstack nil) (setq shell-dirstack nil)
(setq shell-last-dir nil) (setq shell-last-dir nil)