summaryrefslogtreecommitdiff
path: root/elisp
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
commitf6e8492346b1ac7be21b96849df25c08dd8ce3ae (patch)
treefa45e217219a3f92c11cb2e008e57ea3e4740901 /elisp
parentfb357359565a89c8e97db0c8068bad11579bb291 (diff)
downloadgeiser-guile-f6e8492346b1ac7be21b96849df25c08dd8ce3ae.tar.gz
geiser-guile-f6e8492346b1ac7be21b96849df25c08dd8ce3ae.tar.bz2
Guile: show error message upon entering the debugger
Diffstat (limited to 'elisp')
-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)