Skip to content

Commit 872c143

Browse files
committed
Handle properly ANSI color escape sequences in the REPL
1 parent 6a4329b commit 872c143

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* New interactive command `inf-clojure-display-version`.
1010
* [#42](https://github.com/clojure-emacs/inf-clojure/issues/42): Add a defcustom controlling the window in which the REPL buffer is displayed (`inf-clojure-repl-use-same-window`).
1111
* Font-lock the code in the REPL.
12+
* Handle properly ANSI color escape sequences in the REPL.
1213

1314
### Changes
1415

inf-clojure.el

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
(require 'clojure-mode)
4343
(require 'eldoc)
4444
(require 'thingatpt)
45+
(require 'ansi-color)
4546

4647

4748
(defgroup inf-clojure nil
@@ -281,7 +282,8 @@ to continue it."
281282
(setq comint-input-filter #'inf-clojure-input-filter)
282283
(setq-local comint-prompt-read-only inf-clojure-prompt-read-only)
283284
(add-hook 'comint-preoutput-filter-functions #'inf-clojure-preoutput-filter nil t)
284-
(add-hook 'completion-at-point-functions #'inf-clojure-completion-at-point nil t))
285+
(add-hook 'completion-at-point-functions #'inf-clojure-completion-at-point nil t)
286+
(ansi-color-for-comint-mode-on))
285287

286288
(defun inf-clojure-get-old-input ()
287289
"Return a string containing the sexp ending at point."

0 commit comments

Comments
 (0)