comparison lisp/shell.el @ 9485:2685c7803c18

* shell.el: (shell-font-lock-keywords): Add `\n' to [^] regexps. (shell-mode): Set font-lock-defaults.
author Simon Marshall <simon@gnu.org>
date Wed, 12 Oct 1994 09:18:53 +0000
parents c4fa081b416e
children e7b821dcdbc9
comparison
equal deleted inserted replaced
9484:255efa3fb8d0 9485:2685c7803c18
92 ;;; m-? comint-dynamic-list-filename-completions List completions in help buffer 92 ;;; m-? comint-dynamic-list-filename-completions List completions in help buffer
93 ;;; m-c-f shell-forward-command Forward a shell command 93 ;;; m-c-f shell-forward-command Forward a shell command
94 ;;; m-c-b shell-backward-command Backward a shell command 94 ;;; m-c-b shell-backward-command Backward a shell command
95 ;;; dirs Resync the buffer's dir stack 95 ;;; dirs Resync the buffer's dir stack
96 ;;; dirtrack-toggle Turn dir tracking on/off 96 ;;; dirtrack-toggle Turn dir tracking on/off
97 ;;; shell-strip-ctrl-m Remove trailing ^Ms from output
97 ;;; 98 ;;;
98 ;;; The shell mode hook is shell-mode-hook 99 ;;; The shell mode hook is shell-mode-hook
99 ;;; comint-prompt-regexp is initialised to shell-prompt-pattern, for backwards 100 ;;; comint-prompt-regexp is initialised to shell-prompt-pattern, for backwards
100 ;;; compatibility. 101 ;;; compatibility.
101 102
272 "*Hook for customising Shell mode.") 273 "*Hook for customising Shell mode.")
273 274
274 (defvar shell-font-lock-keywords 275 (defvar shell-font-lock-keywords
275 (list (cons shell-prompt-pattern 'font-lock-keyword-face) 276 (list (cons shell-prompt-pattern 'font-lock-keyword-face)
276 '("[ \t]\\([+-][^ \t\n]+\\)" 1 font-lock-comment-face) 277 '("[ \t]\\([+-][^ \t\n]+\\)" 1 font-lock-comment-face)
277 '("^[^ \t]+:.*$" . font-lock-string-face) 278 '("^[^ \t\n]+:.*$" . font-lock-string-face)
278 '("^\\[[1-9][0-9]*\\]" . font-lock-string-face)) 279 '("^\\[[1-9][0-9]*\\]" . font-lock-string-face))
279 "Additional expressions to highlight in Shell mode.") 280 "Additional expressions to highlight in Shell mode.")
280 281
281 ;;; Basic Procedures 282 ;;; Basic Procedures
282 ;;; =========================================================================== 283 ;;; ===========================================================================
335 (setq comint-completion-fignore shell-completion-fignore) 336 (setq comint-completion-fignore shell-completion-fignore)
336 (setq comint-delimiter-argument-list shell-delimiter-argument-list) 337 (setq comint-delimiter-argument-list shell-delimiter-argument-list)
337 (setq comint-dynamic-complete-functions shell-dynamic-complete-functions) 338 (setq comint-dynamic-complete-functions shell-dynamic-complete-functions)
338 (make-local-variable 'paragraph-start) 339 (make-local-variable 'paragraph-start)
339 (setq paragraph-start comint-prompt-regexp) 340 (setq paragraph-start comint-prompt-regexp)
340 (make-local-variable 'font-lock-keywords) 341 (make-local-variable 'font-lock-defaults)
341 (setq font-lock-keywords shell-font-lock-keywords) 342 (setq font-lock-defaults '(shell-font-lock-keywords t))
342 (make-local-variable 'shell-dirstack) 343 (make-local-variable 'shell-dirstack)
343 (setq shell-dirstack nil) 344 (setq shell-dirstack nil)
344 (setq shell-last-dir nil) 345 (setq shell-last-dir nil)
345 (make-local-variable 'shell-dirtrackp) 346 (make-local-variable 'shell-dirtrackp)
346 (setq shell-dirtrackp t) 347 (setq shell-dirtrackp t)