[asdf-devel] Tool for transcoding lisp source files and adding coding file options.

Douglas Crosher dtc-asdf at scieneer.com
Wed Apr 25 03:39:38 UTC 2012


A tool to add the coding file option to lisp source files is now available.  This can also be used to transcode all the files to
UTF-8, or to attempt transcoding to ISO-8859-1 or US-ASCII with loss in comments.  There is an example for the current Quicklisp
releases with a few required exceptions.  This is experimental, particularly the transcoding to ISO-8859-1 or US-ASCII.  Please
backup your code before giving this a try!  See:
http://www.scieneer.com/files/transcode.lisp

With the coding file option in place, the developmental version of ASDF is able to pass the correct external-format to 'load and
'compile-file.

Note the lambda-reader is handled by substituting references to the lambda character back to "(lambda".

Since the :encoding file option should become unnecessary with the coding file option, and also because it would be invalid upon any
transcoding, it is removed from .asd files.  I don't think it would be practical to try and update the :encoding declarations.

With the coding file option on all the files, all that asdf-encodings needs to do is read this file option.  The UTF-8 and other
detection could be removed and moved into a tools such as this.

If some of the CL implementations would add the reading of the file option as an external-format then the coding file option could
be used by 'load and 'compile-file outside of ASDF - then for these CL implementations asdf-encodings would not be necessary and
ASDF could pass on the encoding-file-option reading external-format which may well be the :default.  I will look at implementing
this for the Scieneer CL, and perhaps take a look at CMUCL, but it would be best optimized for each CL implementation.

Regards
Douglas Crosher




More information about the asdf-devel mailing list