1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-03 02:36:19 +02:00

add current-source-location

* module/ice-9/boot-9.scm (current-source-location): New macro, returns
  the, um, current source location.
This commit is contained in:
Andy Wingo 2010-06-06 23:21:24 +02:00
parent 750ae8b7b7
commit 41147ee732

View file

@ -461,6 +461,14 @@ If there is no handler at all, Guile prints an error and then exits."
(include-from-path "ice-9/quasisyntax")
(define-syntax current-source-location
(lambda (x)
(syntax-case x ()
((_)
(with-syntax ((s (datum->syntax x (syntax-source x))))
#''s)))))
;;; {Defmacros}