emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/cider 59aac64262 3/7: Display interactive eval errors as o


From: ELPA Syncer
Subject: [nongnu] elpa/cider 59aac64262 3/7: Display interactive eval errors as overlays
Date: Fri, 11 Feb 2022 03:58:05 -0500 (EST)

branch: elpa/cider
commit 59aac642626c65bcfa67771f552ed7f74fd00fcb
Author: yuhan0 <qythium@gmail.com>
Commit: Bozhidar Batsov <bozhidar@batsov.dev>

    Display interactive eval errors as overlays
    
    When the error buffer is disabled, there is no other indication that an 
error
    occured
---
 cider-eval.el     | 6 +++++-
 cider-overlays.el | 9 +++++++++
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/cider-eval.el b/cider-eval.el
index 45dd7ffbdd..e9d9c02225 100644
--- a/cider-eval.el
+++ b/cider-eval.el
@@ -727,7 +727,11 @@ when `cider-auto-inspect-after-eval' is non-nil."
                                  (lambda (_buffer out)
                                    (cider-emit-interactive-eval-output out))
                                  (lambda (_buffer err)
-                                   (cider-emit-interactive-eval-err-output err)
+                                   (unless cider-show-error-buffer
+                                     ;; Display errors as temporary overlays
+                                     (let ((cider-result-use-clojure-font-lock 
nil))
+                                       (cider--display-interactive-eval-result
+                                        err end 'cider-error-overlay-face)))
                                    (cider-handle-compilation-errors err 
eval-buffer))
                                  (when (and cider-auto-inspect-after-eval
                                             (boundp 'cider-inspector-buffer)
diff --git a/cider-overlays.el b/cider-overlays.el
index 577dd3c445..060a77b6c3 100644
--- a/cider-overlays.el
+++ b/cider-overlays.el
@@ -42,6 +42,15 @@ applied with lower priority than the syntax highlighting."
   :group 'cider
   :package-version '(cider "0.9.1"))
 
+(defface cider-error-overlay-face
+  '((((class color) (background light))
+     :background "orange red")
+    (((class color) (background dark))
+     :background "firebrick"))
+  "Like `cider-result-overlay-face', but for evaluation errors."
+  :group 'cider
+  :package-version '(cider "0.25.0"))
+
 (defcustom cider-result-use-clojure-font-lock t
   "If non-nil, interactive eval results are font-locked as Clojure code."
   :group 'cider



reply via email to

[Prev in Thread] Current Thread [Next in Thread]