Subject: Re: loading Emacs-Lisp into CL
From: Erik Naggum <>
Date: 1999/02/22
Newsgroups: comp.lang.lisp
Message-ID: <>

* Sam Steingold <>
| Note that it only works with Allegro CL with Erik's readtable fix, which
| he did not post but sent me by private e-mail.  I would appreciate if he
| did post it for public consumption.

  um, I'm not sure this is a good idea, but here goes:

excl:	;; compile and load this, do _not_ evaluate interpreted
(loop	;; make the #\ reader fully ANSI CL compliant, ignore CLtL1.
  with readtables = (get-objects 11)
  for i from 1 to (aref readtables 0)
  for readtable = (aref readtables i) do 
    (when (readtable-dispatch-tables readtable)
      (set-dispatch-macro-character #\# #\\
	(named-function sharp-backslash
	  (lambda (stream backslash font)
	    (declare (ignore font))
	    (stream-unread-char backslash stream)
	    (let* ((charstring (read-extended-token stream)))
	      (unless *read-suppress*
		(or (if (= (length charstring) 1)
		      (char charstring 0)
		      (name-char charstring))
		     stream "Meaningless character name ~A"
		     (string-upcase charstring)))))))

  this is deliberately Allegro CL-specific and hopefully won't work
  anywhere else.  unsupported, copyrighted, no warranties kind of stuff,
  based on my understanding of source code licensed to supported customers,
  but not derived from which, etc, legal blah blah blah, sue Bill Gates if
  you have problems, and indemnify everybody else, OK?  cancel?  <click>