]> git.eshelyaron.com Git - emacs.git/commitdiff
eshell ansi-color hook
authorMark A. Hershberger <mah@everybody.org>
Fri, 16 Mar 2007 16:53:06 +0000 (16:53 +0000)
committerMark A. Hershberger <mah@everybody.org>
Fri, 16 Mar 2007 16:53:06 +0000 (16:53 +0000)
lisp/ChangeLog
lisp/eshell/esh-mode.el

index fe5b283ab53da419ae1336b4939c39e17e5e35a5..36f0d35eb5fd5429e6e0a48dbd88d6576739d51e 100644 (file)
@@ -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.
index c185e88d8a87114558e04a3b5fc1bfff63401f99..c6abda631dc677de2c4f5b484856fb14a84fa565 100644 (file)
@@ -1078,6 +1078,15 @@ This function could be in the list `eshell-output-filter-functions'."
 (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