about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorDavid Morgan <djm_uk@protonmail.com>2024-10-07 14:11:06 +0100
committerDavid Morgan <djm_uk@protonmail.com>2024-10-07 14:11:06 +0100
commitd817595cf31cfee55f691319ef466f57b37e8671 (patch)
tree810725a82c8ab7c6e1cb6ac024f109ee90765412
parent6422bea95f652c78e7a60de8704155b36c592671 (diff)
downloaddotfiles-d817595cf31cfee55f691319ef466f57b37e8671.tar.gz
Inline displaying results with edebug
-rw-r--r--.emacs.d/lisp/init-emacs-lisp.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/.emacs.d/lisp/init-emacs-lisp.el b/.emacs.d/lisp/init-emacs-lisp.el
index e32ee31..0cf1f44 100644
--- a/.emacs.d/lisp/init-emacs-lisp.el
+++ b/.emacs.d/lisp/init-emacs-lisp.el
@@ -65,6 +65,16 @@ Start `ielm' if it's not already running."
 
 
 (use-package eros
+  :config
+  ;; https://xenodium.com/inline-previous-result-and-why-you-should-edebug/
+  (defun adviced:edebug-previous-result (_ &rest r)
+    "Adviced `edebug-previous-result'."
+    (eros--make-result-overlay edebug-previous-result
+      :where (point)
+      :duration eros-eval-result-duration))
+  (advice-add #'edebug-previous-result
+              :around
+              #'adviced:edebug-previous-result)
   :hook
   (emacs-lisp-mode . eros-mode))