Mercurial > emacs
changeset 76468:b32293a2b36f
eshell ansi-color hook
author | Mark A. Hershberger <mah@everybody.org> |
---|---|
date | Fri, 16 Mar 2007 16:53:06 +0000 |
parents | fd2206c3690b |
children | 3c5fa2a9ad15 |
files | lisp/ChangeLog lisp/eshell/esh-mode.el |
diffstat | 2 files changed, 14 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Sun Mar 11 23:53:38 2007 +0000 +++ b/lisp/ChangeLog Fri Mar 16 16:53:06 2007 +0000 @@ -1,3 +1,8 @@ +2007-03-16 Mark A. Hershberger <mah@everybody.org> + + * eshell/esh-mode.el (eshell-handle-ansi-color): New function. + Add new option for eshell-output-filter-functions. + 2007-03-11 Juri Linkov <juri@jurta.org> * replace.el (match): Use yellow background on light-bg terminals.
--- a/lisp/eshell/esh-mode.el Sun Mar 11 23:53:38 2007 +0000 +++ b/lisp/eshell/esh-mode.el Fri Mar 16 16:53:06 2007 +0000 @@ -1078,6 +1078,15 @@ (custom-add-option 'eshell-output-filter-functions 'eshell-handle-control-codes) +(defun eshell-handle-ansi-color () + "Handle ANSI color codes." + (require 'ansi-color) + (ansi-color-apply-on-region eshell-last-output-start + eshell-last-output-end)) + +(custom-add-option 'eshell-output-filter-functions + 'eshell-handle-ansi-color) + ;;; Code: ;;; arch-tag: ec65bc2b-da14-4547-81d3-a32af3a4dc57