[slime-devel] Better solution to redefinition warnings in Allegro

Helmut Eller e9626484 at stud3.tuwien.ac.at
Wed Aug 18 21:11:49 UTC 2004


Peter Seibel <peter at javamonkey.com> writes:

> Here's the patch; please let me know what you think.

I think this looks good.

It's possible that the buffer-name is different from the filename,
e.g. "foo.lisp<3>", and I think this case is not covered by the
current approach.  But that's pretty uncommon.  You could probably
pass the buffer-file-name instead of the directory just in case the
actual filename is ever needed.

Only a minor detail:
 
> -(defimplementation swank-compile-string (string &key buffer position)
> +(defimplementation swank-compile-string (string &key buffer position (directory *default-pathname-defaults*))
>    ;; We store the source buffer in excl::*source-pathname* as a string
>    ;; of the form <buffername>:<start-offset>.  Quite ugly encoding, but
>    ;; the fasl file is corrupted if we use some other datatype.
>    (with-compilation-hooks ()
>      (let ((*buffer-name* buffer)
>            (*buffer-start-position* position)
> -          (*buffer-string* string))
> +          (*buffer-string* string)
> +          (*default-pathname-defaults* (merge-pathnames (pathname directory))))
>        (compile-from-temp-file

this might not work so well if the buffer-file-name is nil.

Helmut.




More information about the slime-devel mailing list