comparison lisp/comint/shell.el @ 108:360340f9fd5f r20-1b6

Import from CVS: tag r20-1b6
author cvs
date Mon, 13 Aug 2007 09:18:39 +0200
parents a145efe76779
children 34a5b81f86ba
comparison
equal deleted inserted replaced
107:523141596bda 108:360340f9fd5f
282 (copy-face 'font-lock-string-face shell-output-3-face)) 282 (copy-face 'font-lock-string-face shell-output-3-face))
283 ;; we only need to do this once 283 ;; we only need to do this once
284 (remove-hook 'font-lock-mode-hook 'shell-font-lock-mode-hook)) 284 (remove-hook 'font-lock-mode-hook 'shell-font-lock-mode-hook))
285 (add-hook 'font-lock-mode-hook 'shell-font-lock-mode-hook) 285 (add-hook 'font-lock-mode-hook 'shell-font-lock-mode-hook)
286 286
287 (defvar shell-prompt-pattern-for-font-lock shell-prompt-pattern 287 (defvar shell-prompt-pattern-for-font-lock nil
288 "Pattern to use to font-lock the prompt. 288 "If non-nil, pattern to use to font-lock the prompt.
289 Defaults to `shell-prompt-pattern'.") 289 When nil, shell-prompt-pattern will be used. Set this to a regular
290 expression if you want the font-locked pattern to be different then
291 the shell's prompt pattern.")
290 292
291 (defvar shell-font-lock-keywords 293 (defvar shell-font-lock-keywords
292 (list (cons 'shell-prompt-pattern-for-font-lock shell-prompt-face) 294 (list '(eval . (cons (if shell-prompt-pattern-for-font-lock
295 shell-prompt-pattern-for-font-lock
296 shell-prompt-pattern)
297 shell-prompt-face))
293 '("[ \t]\\([+-][^ \t\n>]+\\)" 1 shell-option-face) 298 '("[ \t]\\([+-][^ \t\n>]+\\)" 1 shell-option-face)
294 '("^[^ \t\n]+:.*" . shell-output-2-face) 299 '("^[^ \t\n]+:.*" . shell-output-2-face)
295 '("^\\[[1-9][0-9]*\\]" . shell-output-3-face) 300 '("^\\[[1-9][0-9]*\\]" . shell-output-3-face)
296 '("^[^\n]+.*$" . shell-output-face)) 301 '("^[^\n]+.*$" . shell-output-face))
297 "Additional expressions to highlight in Shell mode.") 302 "Additional expressions to highlight in Shell mode.")