Lisp Knowledgebase
Title: Lisp code copied & pasted from PDF gets reader error
ID: 17037
Product: LispWorks Version: All OS: All | |
Description: Lisp code copied from a PDF document, pasted into LispWorks and then read by the Lisp reader can get an unbound-variable error or a reader-error if it contains a Unicode quote character. For example: Error while reading: Subcharacter #\\<2019> not defined for dispatch char #\\#. CL-USER 2 > (defun my-plus (&rest x) (apply #'+ x)) MY-PLUS The problem in this case is that the Lisp readtable does not contain the dispatching macro for the sub character #\U+2019, which is a Unicode single quote character sometimes used instead of the regular ASCII single quote #\'. unbound-variable errors can occur with the Unicode single quote character used directly (i.e. not as a dispatching macro sub character) and Unicode double quote character: Again the problem is that the Lisp readtable does not contain these macro characters. These issues can occur with text copied from Preview.app on Mac OS X, from old versions of the LispWorks documentation, and other cases. The solution is to modify your Lisp readtable. To do this, see the comments in config/a-dot-lispworks.lisp in the LispWorks library. | |
See Also: Workaround: Patch: | |
Hardware:N/A | |
Summary: | |
Bug#: | |
Patch Enhancement#: | |
Reported: |