diff options
author | Ludovic Court`es | 2007-04-03 14:58:13 +0000 |
---|---|---|
committer | Ludovic Court`es | 2007-04-03 14:58:13 +0000 |
commit | 75d25f7c6edd388124c4ff858869a83ddee2246c (patch) | |
tree | 9d060389d608e508d9281f0cdabe4365e49b3364 | |
parent | f38830f2c7e4a772df8face3c308ba0cb2a29132 (diff) | |
parent | 0caac277ae2f94d43ae68334cfb11031aafb78b6 (diff) | |
download | skribilo-75d25f7c6edd388124c4ff858869a83ddee2246c.tar.gz skribilo-75d25f7c6edd388124c4ff858869a83ddee2246c.tar.lz skribilo-75d25f7c6edd388124c4ff858869a83ddee2246c.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: skribilo@sv.gnu.org--2006/skribilo--devo--1.2--patch-83
-rw-r--r-- | ChangeLog | 23 | ||||
-rw-r--r-- | src/guile/skribilo/lib.scm | 2 | ||||
-rw-r--r-- | src/guile/skribilo/location.scm | 6 |
3 files changed, 29 insertions, 2 deletions
@@ -2,6 +2,29 @@ # arch-tag: automatic-ChangeLog--skribilo@sv.gnu.org--2006/skribilo--devo--1.2 # +2007-04-03 14:58:13 GMT Ludovic Court`es <ludovic.courtes@laas.fr> patch-83 + + Summary: + Fixed computation of `&invocation-location'. + Revision: + skribilo--devo--1.2--patch-83 + + * 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'. + + modified files: + ChangeLog src/guile/skribilo/lib.scm + src/guile/skribilo/location.scm + + new patches: + lcourtes@laas.fr--2006-libre/skribilo--devo--1.2--patch-42 + + 2007-04-03 14:57:19 GMT Ludovic Court`es <ludovic.courtes@laas.fr> patch-82 Summary: 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)) |