diff options
author | Chong Yidong <cyd@gnu.org> | 2012-02-19 21:59:42 +0800 |
---|---|---|
committer | Chong Yidong <cyd@gnu.org> | 2012-02-19 21:59:42 +0800 |
commit | 0fd40f8951f1aaa387e78999ecfbf6bc954ccf8a (patch) | |
tree | 48386211397064dd0eb1bc47fb0a292e3ad4e19f /lisp/comint.el | |
parent | 2375c96a71874756c132de1d0508a224c0fea0ab (diff) | |
download | emacs-0fd40f8951f1aaa387e78999ecfbf6bc954ccf8a.tar.gz emacs-0fd40f8951f1aaa387e78999ecfbf6bc954ccf8a.tar.bz2 emacs-0fd40f8951f1aaa387e78999ecfbf6bc954ccf8a.zip |
Use text properties for color escape highlighting in Shell mode.
* ansi-color.el: Don't set comint-output-filter-functions; it is
now in the initial value defined in comint.el.
(ansi-color-apply-face-function): New variable.
(ansi-color-apply-on-region): Use it.
(ansi-color-apply-overlay-face): New function.
* comint.el: Require ansi-color.
(comint-output-filter-functions): Add ansi-color-process-output.
* shell.el (shell): No need to require ansi-color.
(shell-mode): Use ansi-color-apply-face-function to highlight
color escapes using font-lock-face property.
Fixes: debbugs:10835
Diffstat (limited to 'lisp/comint.el')
-rw-r--r-- | lisp/comint.el | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/comint.el b/lisp/comint.el index 975291471df..4c2229f2f83 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -103,6 +103,7 @@ (eval-when-compile (require 'cl)) (require 'ring) +(require 'ansi-color) ;; Buffer Local Variables: ;;============================================================================ @@ -385,7 +386,7 @@ history list. Default is to save anything that isn't all whitespace.") These functions get one argument, a string containing the text to send.") ;;;###autoload -(defvar comint-output-filter-functions '(comint-postoutput-scroll-to-bottom comint-watch-for-password-prompt) +(defvar comint-output-filter-functions '(ansi-color-process-output comint-postoutput-scroll-to-bottom comint-watch-for-password-prompt) "Functions to call after output is inserted into the buffer. One possible function is `comint-postoutput-scroll-to-bottom'. These functions get one argument, a string containing the text as originally |