summaryrefslogtreecommitdiff
path: root/geiser-guile.el
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2022-09-21 13:51:04 +0100
committerjao <jao@gnu.org>2022-09-21 13:51:04 +0100
commitf9b0828e1599078c596df0100886d4199b9b62bc (patch)
tree2c528ba339dc65b12b50be33e551b6cdfc128145 /geiser-guile.el
parent44f40a6db656e4c33ce7b42099d3c09073c2c2b8 (diff)
downloadgeiser-guile-f9b0828e1599078c596df0100886d4199b9b62bc.tar.gz
geiser-guile-f9b0828e1599078c596df0100886d4199b9b62bc.tar.bz2
new option geiser-guile-debug-backwards-backtrace
Fixes #24
Diffstat (limited to 'geiser-guile.el')
-rw-r--r--geiser-guile.el23
1 files changed, 17 insertions, 6 deletions
diff --git a/geiser-guile.el b/geiser-guile.el
index e5f6476..4bb014c 100644
--- a/geiser-guile.el
+++ b/geiser-guile.el
@@ -79,15 +79,22 @@ exported modules."
:type 'boolean
:link '(info-link "(guile) Declarative Modules"))
+(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-terminal-width 999
+ "Maximum number of columns shown in backtraces.
+Normally, you'd want a big value here so that messages are not
+truncated. Set to a negative value if you prefer that geiser
+does not set it on startup."
+ :type 'integer)
+
(geiser-custom--defcustom geiser-guile-debug-show-bt-p t
"Whether to automatically show a full backtrace when entering the debugger.
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)
@@ -502,9 +509,13 @@ See `geiser-guile-use-declarative-modules-p'."
(geiser-eval--send/wait code))))
(defun geiser-guile--set-up-backtrace ()
- "Set up Guile's backtrace ordering."
+ "Set up Guile's backtrace properties."
(when geiser-guile-debug-backwards-backtrace
- (geiser-eval--send/wait '(debug-enable 'backwards))))
+ (geiser-eval--send/wait '(debug-enable 'backwards)))
+ (when (> geiser-guile-debug-terminal-width 0)
+ (geiser-eval--send/wait `(begin ((@ (system repl debug) terminal-width)
+ ,geiser-guile-debug-terminal-width)
+ 'ok))))
(defun geiser-guile--startup (remote)
"Startup function, for a remote connection if REMOTE is t."