Mercurial > hg > xemacs-beta
diff 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 |
line wrap: on
line diff
--- a/lisp/comint/shell.el Mon Aug 13 09:17:27 2007 +0200 +++ b/lisp/comint/shell.el Mon Aug 13 09:18:39 2007 +0200 @@ -284,12 +284,17 @@ (remove-hook 'font-lock-mode-hook 'shell-font-lock-mode-hook)) (add-hook 'font-lock-mode-hook 'shell-font-lock-mode-hook) -(defvar shell-prompt-pattern-for-font-lock shell-prompt-pattern - "Pattern to use to font-lock the prompt. -Defaults to `shell-prompt-pattern'.") +(defvar shell-prompt-pattern-for-font-lock nil + "If non-nil, pattern to use to font-lock the prompt. +When nil, shell-prompt-pattern will be used. Set this to a regular +expression if you want the font-locked pattern to be different then +the shell's prompt pattern.") (defvar shell-font-lock-keywords - (list (cons 'shell-prompt-pattern-for-font-lock shell-prompt-face) + (list '(eval . (cons (if shell-prompt-pattern-for-font-lock + shell-prompt-pattern-for-font-lock + shell-prompt-pattern) + shell-prompt-face)) '("[ \t]\\([+-][^ \t\n>]+\\)" 1 shell-option-face) '("^[^ \t\n]+:.*" . shell-output-2-face) '("^\\[[1-9][0-9]*\\]" . shell-output-3-face)