[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Illegal characters/ .LSP files
> Jeff Bishop <firstname.lastname@example.org> asked:
> I have found that whenever I edit any Lisp files on the OS/2 system
> editor (or any of several other text editors which run on the same
> platform) I get an error message when I attempt to load them. It says
> ;; Loading file C:\Common Lisp\chapter5.lsp ...
> *** - READ from #<STRING-CHAR-FILE-STREAM #"C:\\Common
> Lisp\\chapter5.lsp">: ill
> egal character #\
> I *suspect* it might have something to do with ^M at the end of a line,
> since I have experienced no such problems with the Unix version. Does
> anyone know how to edit the files to make them readable in a DOS,
> Windows, or OS/2 environment?
> This problem is caused by the End Of File character (Ctrl-Z
> in DOS and OS/2). You can avoid it by using the TE/2 editor
> (download from ftp-os2.cdrom.com or nic.funet.fi), which does
> NOT write Ctrl-Z at the end of files.
> I think GNU Emacs will do the same service, but I haven't
> tested it yet.
Another way is to tell the LISP reader to treat Ctrl-Z as whitespace:
(set-syntax-from-char #\Code26 #\Space)
Johann Petrak, Email: email@example.com
Austrian Research Institute for Schottengasse 3
Artificial Intelligence A-1010 Vienna, Austria