aboutsummaryrefslogtreecommitdiff
path: root/src/guile/skribilo/location.scm
diff options
context:
space:
mode:
authorLudovic Court`es2007-04-03 14:05:48 +0000
committerLudovic Court`es2007-04-03 14:05:48 +0000
commit0caac277ae2f94d43ae68334cfb11031aafb78b6 (patch)
treebbaf38334ca0830ad58eea2c846784430344f01c /src/guile/skribilo/location.scm
parenta5795533336152ba0e8534ea0fcef220ce04ccf5 (diff)
downloadskribilo-0caac277ae2f94d43ae68334cfb11031aafb78b6.tar.gz
skribilo-0caac277ae2f94d43ae68334cfb11031aafb78b6.tar.lz
skribilo-0caac277ae2f94d43ae68334cfb11031aafb78b6.zip
Fixed computation of `&invocation-location'.
* src/guile/skribilo/location.scm (invocation-location): Make sure we always return the exact invocation location, no matter how `invocation-location' is implemented. * src/guile/skribilo/lib.scm (define-markup): Updated DEPTH argument to `invocation-location' due to previous change in the implementation of `invocation-location'. git-archimport-id: lcourtes@laas.fr--2006-libre/skribilo--devo--1.2--patch-42
Diffstat (limited to 'src/guile/skribilo/location.scm')
-rw-r--r--src/guile/skribilo/location.scm6
1 files changed, 5 insertions, 1 deletions
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))