branch: elpa/inf-clojure commit 5ef6bdf09e8716340f09a08d5fa957ca3ebeef18 Author: Andrea Richiardi <a.richiardi.w...@gmail.com> Commit: Bozhidar Batsov <bozhidar.bat...@gmail.com>
Revert "Remove unwanted ansi chars from the REPL output" This reverts commit a36d2a0473a211078af995ef9ea28f00fe1e6b32. --- inf-clojure.el | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/inf-clojure.el b/inf-clojure.el index 0f36dd6..092d43c 100644 --- a/inf-clojure.el +++ b/inf-clojure.el @@ -344,7 +344,6 @@ 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 'comint-output-filter-functions 'inf-clojure--ansi-filter) (add-hook 'completion-at-point-functions #'inf-clojure-completion-at-point nil t) (ansi-color-for-comint-mode-on)) @@ -369,19 +368,6 @@ to continue it." "Remove subprompts from STRING." (replace-regexp-in-string inf-clojure-subprompt "" string)) -(defconst inf-clojure--ansi-clear-line "\\[1G\\|\\[0J\\|\\[13G" - "Ansi codes sent by the lumo repl that we need to clear." ) - -(defun inf-clojure--ansi-filter (string) - "Filter unwanted ansi character from STRING." - (save-excursion - ;; go to start of first line just inserted - (comint-goto-process-mark) - (goto-char (max (point-min) (- (point) (string-width string)))) - (forward-line 0) - (while (re-search-forward inf-clojure--ansi-clear-line nil t) - (replace-match "")))) - (defun inf-clojure-preoutput-filter (str) "Preprocess the output STR from interactive commands." (cond