aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/guile/skribilo/lib.scm2
-rw-r--r--src/guile/skribilo/location.scm6
2 files changed, 6 insertions, 2 deletions
diff --git a/src/guile/skribilo/lib.scm b/src/guile/skribilo/lib.scm
index 5d96a10..a86e756 100644
--- a/src/guile/skribilo/lib.scm
+++ b/src/guile/skribilo/lib.scm
@@ -106,7 +106,7 @@
;; Memorize the invocation location. Note: the invocation depth
;; passed to `invocation-location' was determined experimentally and
;; may change as Guile changes (XXX).
- (let ((&invocation-location (invocation-location 6)))
+ (let ((&invocation-location (invocation-location 3)))
,@body))))
diff --git a/src/guile/skribilo/location.scm b/src/guile/skribilo/location.scm
index e4583ff..e6bf54f 100644
--- a/src/guile/skribilo/location.scm
+++ b/src/guile/skribilo/location.scm
@@ -81,7 +81,11 @@
;; Return a location object denoting the place of invocation of this
;; function's caller. Debugging must be enable for this to work, via
;; `(debug-enable 'debug)', otherwise `#f' is returned.
- (let ((depth (if (null? depth) 4 (car depth)))
+
+ (define %outer-depth 3) ;; update when moving `make-stack'!
+
+ (let ((depth (+ %outer-depth
+ (if (null? depth) 0 (car depth))))
(stack (make-stack #t)))
(and stack
(let* ((frame (stack-ref stack depth))