diff options
| author | Mark A. Hershberger | 2007-03-16 16:53:06 +0000 |
|---|---|---|
| committer | Mark A. Hershberger | 2007-03-16 16:53:06 +0000 |
| commit | 1c979bff35bb7603245ffbd8aaf19be097dc2bdd (patch) | |
| tree | 5d90a4228553e79d98340f13b542a4831f974acb | |
| parent | 330167fce8f6eca3098a2b4d74706395963979b1 (diff) | |
| download | emacs-1c979bff35bb7603245ffbd8aaf19be097dc2bdd.tar.gz emacs-1c979bff35bb7603245ffbd8aaf19be097dc2bdd.zip | |
eshell ansi-color hook
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/eshell/esh-mode.el | 9 |
2 files changed, 14 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fe5b283ab53..36f0d35eb5f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2007-03-16 Mark A. Hershberger <mah@everybody.org> | ||
| 2 | |||
| 3 | * eshell/esh-mode.el (eshell-handle-ansi-color): New function. | ||
| 4 | Add new option for eshell-output-filter-functions. | ||
| 5 | |||
| 1 | 2007-03-11 Juri Linkov <juri@jurta.org> | 6 | 2007-03-11 Juri Linkov <juri@jurta.org> |
| 2 | 7 | ||
| 3 | * replace.el (match): Use yellow background on light-bg terminals. | 8 | * replace.el (match): Use yellow background on light-bg terminals. |
diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el index c185e88d8a8..c6abda631dc 100644 --- a/lisp/eshell/esh-mode.el +++ b/lisp/eshell/esh-mode.el | |||
| @@ -1078,6 +1078,15 @@ This function could be in the list `eshell-output-filter-functions'." | |||
| 1078 | (custom-add-option 'eshell-output-filter-functions | 1078 | (custom-add-option 'eshell-output-filter-functions |
| 1079 | 'eshell-handle-control-codes) | 1079 | 'eshell-handle-control-codes) |
| 1080 | 1080 | ||
| 1081 | (defun eshell-handle-ansi-color () | ||
| 1082 | "Handle ANSI color codes." | ||
| 1083 | (require 'ansi-color) | ||
| 1084 | (ansi-color-apply-on-region eshell-last-output-start | ||
| 1085 | eshell-last-output-end)) | ||
| 1086 | |||
| 1087 | (custom-add-option 'eshell-output-filter-functions | ||
| 1088 | 'eshell-handle-ansi-color) | ||
| 1089 | |||
| 1081 | ;;; Code: | 1090 | ;;; Code: |
| 1082 | 1091 | ||
| 1083 | ;;; arch-tag: ec65bc2b-da14-4547-81d3-a32af3a4dc57 | 1092 | ;;; arch-tag: ec65bc2b-da14-4547-81d3-a32af3a4dc57 |