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

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

[nongnu] elpa/geiser-guile 480767e 162/284: Guile: geiser-guile-jump-on-


From: Philip Kaludercic
Subject: [nongnu] elpa/geiser-guile 480767e 162/284: Guile: geiser-guile-jump-on-debug-p, geiser-guile-show-debug-help-p
Date: Sun, 1 Aug 2021 18:29:37 -0400 (EDT)

branch: elpa/geiser-guile
commit 480767e3d4b2dd8771bcd9bbb70ddad88d1d347f
Author: Jose Antonio Ortega Ruiz <jao@gnu.org>
Commit: Jose Antonio Ortega Ruiz <jao@gnu.org>

    Guile: geiser-guile-jump-on-debug-p, geiser-guile-show-debug-help-p
---
 elisp/geiser-guile.el | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/elisp/geiser-guile.el b/elisp/geiser-guile.el
index af9d589..8561df7 100644
--- a/elisp/geiser-guile.el
+++ b/elisp/geiser-guile.el
@@ -52,6 +52,17 @@ If `nil', only the last frame is shown."
   :type 'boolean
   :group 'geiser-guile)
 
+(geiser-custom--defcustom geiser-guile-jump-on-debug-p nil
+  "Whether to autmatically jump to error when entering the debugger.
+If `t', Geiser will use `next-error' to jump to the error's location."
+  :type 'boolean
+  :group 'geiser-guile)
+
+(geiser-custom--defcustom geiser-guile-show-debug-help-p t
+  "Whether to show brief help in the echo area when entering the debugger."
+  :type 'boolean
+  :group 'geiser-guile)
+
 
 ;;; REPL support:
 
@@ -132,7 +143,12 @@ This function uses `geiser-guile-init-file' if it exists."
       (comint-send-string nil "((@ (geiser emacs) ge:newline))\n")
       (comint-send-string nil ",error-message\n")
       (comint-send-string nil bt-cmd)
-      (message "Debug REPL. Enter ,q to quit, ,h for help.")))
+      (when geiser-guile-show-debug-help-p
+        (message "Debug REPL. Enter ,q to quit, ,h for help."))
+      (when geiser-guile-jump-on-debug-p
+        (accept-process-output (get-buffer-process (current-buffer))
+                               0.2 nil t)
+        (ignore-errors (next-error)))))
   t)
 
 



reply via email to

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