summaryrefslogtreecommitdiff
path: root/elisp/geiser-debug.el
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2009-06-13 03:50:23 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2009-06-13 03:50:23 +0200
commitf9d746bd4600d34d3b3fe72d5159b58d6160bfb9 (patch)
tree43039b53c38b6668a7221c4a882146eb9f0aace2 /elisp/geiser-debug.el
parent176afa86ec0da835c6dc60fa80495a1bc96f5db7 (diff)
downloadgeiser-f9d746bd4600d34d3b3fe72d5159b58d6160bfb9.tar.gz
geiser-f9d746bd4600d34d3b3fe72d5159b58d6160bfb9.tar.bz2
Guile: rewriting stack trace captures - not yet complete.
Diffstat (limited to 'elisp/geiser-debug.el')
-rw-r--r--elisp/geiser-debug.el16
1 files changed, 6 insertions, 10 deletions
diff --git a/elisp/geiser-debug.el b/elisp/geiser-debug.el
index bc155c9..7ebd0b5 100644
--- a/elisp/geiser-debug.el
+++ b/elisp/geiser-debug.el
@@ -72,14 +72,9 @@
(defsubst geiser-debug--frame-source-column (src) (or (caddr src) 0))
(defun geiser-debug--display-stack (stack)
- (let* ((frames (cdr stack))
- (step 2)
- (indent (* (length frames) step)))
- (dolist (f frames)
- (geiser-debug--display-stack-frame f indent)
- (setq indent (- indent step)))))
-
-(defun geiser-debug--display-stack-frame (frame offset)
+ (mapc 'geiser-debug--display-stack-frame (reverse (cdr stack))))
+
+(defun geiser-debug--display-stack-frame (frame)
(let ((procedure (geiser-debug--frame-proc frame))
(source (geiser-debug--frame-source frame))
(description (geiser-debug--frame-desc frame)))
@@ -89,7 +84,7 @@
(geiser-debug--frame-source-line source)
(1+ (geiser-debug--frame-source-column source))))
(insert "In expression:\n"))
- (insert (format "%s%s\n" (make-string offset ?\ ) description))))
+ (insert (format "%s\n" description))))
(defsubst geiser-debug--wrap-region (str)
(format "(begin %s)" str))
@@ -112,7 +107,8 @@
(defun geiser-debug--expand-region (start end all wrap)
(let* ((str (buffer-substring-no-properties start end))
(wrapped (if wrap (geiser-debug--wrap-region str) str))
- (code `(:eval ((:ge macroexpand) (quote (:scm ,wrapped)) ,(if all :t :f))))
+ (code `(:eval ((:ge macroexpand) (quote (:scm ,wrapped))
+ ,(if all :t :f))))
(ret (geiser-eval--send/wait code))
(err (geiser-eval--retort-error ret))
(result (geiser-eval--retort-result ret)))