summaryrefslogtreecommitdiff
path: root/elisp/geiser-guile.el
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-08-31 16:43:35 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-08-31 16:43:35 +0200
commit46e6067f388d7d1ac502f50c5558c9d953d700c7 (patch)
tree878b27256ab23395891327ee9ab404cb40caf367 /elisp/geiser-guile.el
parent855f6f2278d6ce5a116df2c7bfaa9a5f5e55327c (diff)
downloadgeiser-guile-46e6067f388d7d1ac502f50c5558c9d953d700c7.tar.gz
geiser-guile-46e6067f388d7d1ac502f50c5558c9d953d700c7.tar.bz2
Guile: show error message upon entering the debugger
Diffstat (limited to 'elisp/geiser-guile.el')
-rw-r--r--elisp/geiser-guile.el14
1 files changed, 12 insertions, 2 deletions
diff --git a/elisp/geiser-guile.el b/elisp/geiser-guile.el
index 28a0015..910d3b7 100644
--- a/elisp/geiser-guile.el
+++ b/elisp/geiser-guile.el
@@ -44,6 +44,12 @@ started."
:type 'string
:group 'geiser-guile)
+(geiser-custom--defcustom geiser-guile-debug-show-bt-p nil
+ "Whether to autmatically show a full backtrace when entering the debugger.
+If `nil', only the last frame is shown."
+ :type 'boolean
+ :group 'geiser-guile)
+
;;; REPL support:
@@ -141,9 +147,13 @@ This function uses `geiser-guile-init-file' if it exists."
(defun geiser-guile--display-error (module key msg)
(if (eq key 'geiser-debugger)
- (progn
+ (let ((bt-cmd (format ",%s\n"
+ (if geiser-guile-debug-show-bt-p "bt" "fr"))))
(goto-char (point-max))
- (comint-send-string nil ",bt\n"))
+ (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 key
(insert "Error: ")
(geiser--insert-with-face (format "%s" key) 'bold)