branch: elpa/inf-clojure commit 872c143b68e751d737b79751d43b303d24cab0ed Author: Bozhidar Batsov <bozhi...@batsov.com> Commit: Bozhidar Batsov <bozhi...@batsov.com>
Handle properly ANSI color escape sequences in the REPL --- CHANGELOG.md | 1 + inf-clojure.el | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f3a98e..5314cd3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ * New interactive command `inf-clojure-display-version`. * [#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`). * Font-lock the code in the REPL. +* Handle properly ANSI color escape sequences in the REPL. ### Changes diff --git a/inf-clojure.el b/inf-clojure.el index 43f4307..a193f95 100644 --- a/inf-clojure.el +++ b/inf-clojure.el @@ -42,6 +42,7 @@ (require 'clojure-mode) (require 'eldoc) (require 'thingatpt) +(require 'ansi-color) (defgroup inf-clojure nil @@ -281,7 +282,8 @@ to continue it." (setq comint-input-filter #'inf-clojure-input-filter) (setq-local comint-prompt-read-only inf-clojure-prompt-read-only) (add-hook 'comint-preoutput-filter-functions #'inf-clojure-preoutput-filter nil t) - (add-hook 'completion-at-point-functions #'inf-clojure-completion-at-point nil t)) + (add-hook 'completion-at-point-functions #'inf-clojure-completion-at-point nil t) + (ansi-color-for-comint-mode-on)) (defun inf-clojure-get-old-input () "Return a string containing the sexp ending at point."