diff options
author | Bozhidar Batsov <bozhidar@tradeo.com> | 2014-07-18 17:47:32 +0300 |
---|---|---|
committer | Bozhidar Batsov <bozhidar@tradeo.com> | 2014-07-18 17:47:32 +0300 |
commit | eac2bdd03c9220a77281e9a24e01180cc9c12600 (patch) | |
tree | 0122e2a2a776bcc76f2a6270af24b2824cfe3fe7 | |
parent | a4805fc4a1e63e12253ec3cc93900ab645e2d4b2 (diff) |
[Fix #662] Use Clojure font-lock for results displayed in popup buffers
-rw-r--r-- | cider-interaction.el | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/cider-interaction.el b/cider-interaction.el index d2d5fd9b..de5dd374 100644 --- a/cider-interaction.el +++ b/cider-interaction.el @@ -824,18 +824,24 @@ This is controlled via `cider-interactive-eval-output-destination'." "Make a handler for evaluating and printing result in popup BUFFER." (nrepl-make-response-handler buffer (lambda (buffer str) - (cider-emit-into-popup-buffer buffer str)) + (cider-emit-into-popup-buffer + buffer + (cider-font-lock-as-clojure str))) '() (lambda (buffer str) (cider-emit-into-popup-buffer buffer str)) '())) (defun cider-popup-eval-out-handler (buffer) - "Make a handler for evaluating and printing stdout/stderr in popup BUFFER." + "Make a handler for evaluating and printing stdout/stderr in popup BUFFER. + +This is used by pretty-printing commands and intentionally discards their results." (nrepl-make-response-handler buffer '() (lambda (buffer str) - (cider-emit-into-popup-buffer buffer str)) + (cider-emit-into-popup-buffer + buffer + (cider-font-lock-as-clojure str))) (lambda (buffer str) (cider-emit-into-popup-buffer buffer str)) '())) @@ -1052,8 +1058,7 @@ If prefix argument KILL-BUFFER-P is non-nil, kill the buffer instead of burying (let ((inhibit-read-only t) (buffer-undo-list t)) (insert (format "%s" value)) - (indent-sexp) - (font-lock-fontify-buffer)))) + (indent-sexp)))) (defun cider-emit-into-color-buffer (buffer value) "Emit into color BUFFER the provided VALUE." |