Commit e1369677 authored by Tobias C. Rittweiler's avatar Tobias C. Rittweiler

Fix some minor stuff after Stephen's patch.

darcs-hash:20080925101036-f5546-25d2dacd87d0be5a2528312995225719e2fed3a7.gz
parent c5319523
(in-package :editor-hints.named-readtables)
#-(or allegro sbcl clozure)
#-(or sbcl clozure)
(eval-when (:compile-toplevel)
(warn "~A hasn't been ported to ~A; you're likely to get a compiler error"
(package-name *package*) (lisp-implementation-type)))
......@@ -36,17 +36,14 @@
(declaim (inline %standard-readtable))
(defun %standard-readtable ()
#+sbcl+sb-reader sb-reader:*standard-readtable*
#+clozure ccl::%initial-readtable%
#-(or sbcl+sb-reader clozure)
(copy-readtable nil))
#-sbcl+sb-reader (copy-readtable nil))
#+sbcl+sb-reader
(defmacro %with-readtable-iterator ((name readtable) &body body)
`(sb-reader:with-readtable-iterator (,name ,readtable) ,@body))
#+(or (and sbcl (not sbcl+sb-reader)) clozure)
#+(and sbcl (not sbcl+sb-reader))
(progn
#+sbcl
(defun make-readtable-iterator (readtable)
(let ((char-macro-array (sb-impl::character-macro-array readtable))
(char-macro-ht (sb-impl::character-macro-hash-table readtable))
......@@ -79,7 +76,13 @@
(values t disp-ch disp-fn t sub-char-alist)))))
#'grovel1))))
#+clozure
(defmacro %with-readtable-iterator ((name readtable) &body body)
(let ((it (gensym)))
`(let ((,it (make-readtable-iterator ,readtable)))
(macrolet ((,name () `(funcall ,',it)))
,@body)))))
#+clozure
(progn
(defun make-readtable-iterator (readtable)
(let ((char-macro-alist (ccl::rdtab.alist readtable)))
(lambda ()
......@@ -96,6 +99,7 @@
(macrolet ((,name () `(funcall ,',it)))
,@body)))))
#-allegro
(progn
(defvar *named-readtables* (make-package (gensym "READTABLES+")))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment