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:
parent
750ae8b7b7
commit
41147ee732
1 changed files with 8 additions and 0 deletions
|
@ -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}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue