summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2022-09-21 13:35:52 +0100
committerjao <jao@gnu.org>2022-09-21 13:35:52 +0100
commit44f40a6db656e4c33ce7b42099d3c09073c2c2b8 (patch)
treed9159025e7d1e3099f21216645da57b27808b622
parente540e14db538ed0d116a188569413f5aadd79180 (diff)
downloadgeiser-guile-44f40a6db656e4c33ce7b42099d3c09073c2c2b8.tar.gz
geiser-guile-44f40a6db656e4c33ce7b42099d3c09073c2c2b8.tar.bz2
new option geiser-guile-debug-backwards-backtrace
Fixes #22
-rw-r--r--geiser-guile.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/geiser-guile.el b/geiser-guile.el
index 273e197..e5f6476 100644
--- a/geiser-guile.el
+++ b/geiser-guile.el
@@ -84,6 +84,10 @@ exported modules."
If nil, only the last frame is shown."
:type 'boolean)
+(geiser-custom--defcustom geiser-guile-debug-backwards-backtrace t
+ "Whether to configure backtraces using the 'backwards' ordering."
+ :type 'boolean)
+
(geiser-custom--defcustom geiser-guile-debug-show-full-bt-p t
"Whether to show full backtraces in the debugger, including local variables."
:type 'boolean)
@@ -497,6 +501,11 @@ See `geiser-guile-use-declarative-modules-p'."
(let ((code '(begin (eval-when (expand) (user-modules-declarative? :f)) 'ok)))
(geiser-eval--send/wait code))))
+(defun geiser-guile--set-up-backtrace ()
+ "Set up Guile's backtrace ordering."
+ (when geiser-guile-debug-backwards-backtrace
+ (geiser-eval--send/wait '(debug-enable 'backwards))))
+
(defun geiser-guile--startup (remote)
"Startup function, for a remote connection if REMOTE is t."
(geiser-guile--set-up-error-links)
@@ -507,6 +516,7 @@ See `geiser-guile-use-declarative-modules-p'."
(when (or geiser-guile--conn-address remote)
(geiser-guile--set-geiser-load-path))
(geiser-guile--set-up-declarative-modules)
+ (geiser-guile--set-up-backtrace)
(geiser-eval--send/wait ",use (geiser emacs)\n'done")
(dolist (dir g-load-path)
(let ((dir (expand-file-name dir)))