guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] branch master updated: psyntax: 'include' no longer reje


From: Ludovic Courtès
Subject: [Guile-commits] branch master updated: psyntax: 'include' no longer rejects relative file names.
Date: Thu, 05 Mar 2020 17:06:09 -0500

This is an automated email from the git hooks/post-receive script.

civodul pushed a commit to branch master
in repository guile.

The following commit(s) were added to refs/heads/master by this push:
     new 4cfe0c1  psyntax: 'include' no longer rejects relative file names.
4cfe0c1 is described below

commit 4cfe0c1014f2d238646c5d8d66d44ffb64ede54b
Author: Ludovic Courtès <address@hidden>
AuthorDate: Thu Mar 5 22:59:05 2020 +0100

    psyntax: 'include' no longer rejects relative file names.
    
    Fixes a regression introduced in commit
    fd2ffc649c2d08639c2ac41c25e4ebdbeb4b151d whereby including a relative
    file name would result in:
    
      ice-9/psyntax.scm:3254:24: attempt to include relative file name but 
could not determine base dir
    
    * module/ice-9/psyntax.scm (call-with-include-port)[syntax-dirname]:
    Lookup 'filename (symbol), not filename (identifier).
    * module/ice-9/psyntax-pp.scm: Regenerate.
---
 module/ice-9/psyntax-pp.scm | 2 +-
 module/ice-9/psyntax.scm    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/module/ice-9/psyntax-pp.scm b/module/ice-9/psyntax-pp.scm
index ca9a0da..b19ed77 100644
--- a/module/ice-9/psyntax-pp.scm
+++ b/module/ice-9/psyntax-pp.scm
@@ -3321,7 +3321,7 @@
           (lambda (stx)
             (letrec*
               ((src (syntax-source stx))
-               (filename (if src (assq-ref src filename) #f)))
+               (filename (if src (assq-ref src 'filename) #f)))
               (if (string? filename) (dirname filename) #f)))))
     (lambda* (filename proc #:key (dirname (syntax-dirname filename) 
#:dirname))
       "Like @code{call-with-input-file}, except relative paths are\nsearched 
relative to the @var{dirname} instead of the current working\ndirectory.  Also, 
@var{filename} can be a syntax object; in that case,\nand if @var{dirname} is 
not specified, the @code{syntax-source} of\n@var{filename} is used to obtain a 
base directory for relative file\nnames."
diff --git a/module/ice-9/psyntax.scm b/module/ice-9/psyntax.scm
index 0c5082d..b97911d 100644
--- a/module/ice-9/psyntax.scm
+++ b/module/ice-9/psyntax.scm
@@ -3234,7 +3234,7 @@
 (define call-with-include-port
   (let ((syntax-dirname (lambda (stx)
                           (define src (syntax-source stx))
-                          (define filename (and src (assq-ref src filename)))
+                          (define filename (and src (assq-ref src 'filename)))
                           (and (string? filename)
                                (dirname filename)))))
     (lambda* (filename proc #:key (dirname (syntax-dirname filename)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]