diff options
-rw-r--r-- | elisp/geiser-guile.el | 14 | ||||
-rw-r--r-- | scheme/guile/geiser/emacs.scm | 2 |
2 files changed, 14 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) diff --git a/scheme/guile/geiser/emacs.scm b/scheme/guile/geiser/emacs.scm index 05c525e..3b6f49c 100644 --- a/scheme/guile/geiser/emacs.scm +++ b/scheme/guile/geiser/emacs.scm @@ -27,6 +27,7 @@ ge:callees ge:find-file) #:export (ge:no-values) + #:export (ge:newline) #:use-module (geiser evaluation) #:use-module ((geiser modules) :renamer (symbol-prefix-proc 'ge:)) #:use-module ((geiser completion) :renamer (symbol-prefix-proc 'ge:)) @@ -34,5 +35,6 @@ #:use-module ((geiser doc) :renamer (symbol-prefix-proc 'ge:))) (define (ge:no-values) (values)) +(define ge:newline newline) ;;; emacs.scm ends here |