chiark / gitweb /
src/module-parse.lisp (read-module): Use requested pathname for location.
authorMark Wooding <mdw@distorted.org.uk>
Thu, 26 May 2016 08:26:09 +0000 (09:26 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Fri, 8 Jun 2018 18:58:28 +0000 (19:58 +0100)
commite783e65bc434b69ad73684c035aac345878ba6e9
tree34332f60cb3bb578ca2c655ec0917cec25dc769e
parenta8bc78318db49efeb25d4a042fafde7c0ca1c0a5
src/module-parse.lisp (read-module): Use requested pathname for location.

The default behaviour for `charbuf-scanner' is to use the pathname from
its underlying stream; but (at least on some implementations) this is an
absolute pathname which is actually rather annoying in error messages.

Instead, arrange for `read-module' to attach the namestring of the
pathname it was given directly to the scanner.  This will be the correct
possibly-relative pathname to the module file, because `find-file' has
already done that part of the work, but it will be relative if that's
how it was specified on the command line, if it was found by merging
with a relative pathname in the `*module-dirs*' list, or if it was
imported by a name relative to a module with a relative pathname.
src/module-parse.lisp