Skip to content
Snippets Groups Projects
Commit 10859380 authored by Raymond Toy's avatar Raymond Toy
Browse files

Signal an error if the readtable case of the standard readtable is

changed.

* Rename the slot to %READTABLE-CASE (from READTABLE-CASE).
* Add READTABLE-CASE and (SETF READTABLE-CASE) functions, as required.
* Check for the standard readtable in (SETF READTABLE-CASE).
parent 00844093
No related branches found
No related tags found
No related merge requests found
......@@ -144,7 +144,7 @@
;; vectors of CHAR-CODE-LIMIT functions, for use in defining dispatching
;; macros (like #-macro).
(dispatch-tables () :type list)
(readtable-case :upcase :type (member :upcase :downcase :preserve :invert))
(%readtable-case :upcase :type (member :upcase :downcase :preserve :invert))
;;
;; The CHARACTER-ATTRIBUTE-HASH-TABLE handles the case of char codes
;; above ATTRIBUTE-TABLE-LIMIT, since we expect these to be
......@@ -466,6 +466,13 @@
(cerror "Modify it anyway." 'kernel:standard-readtable-modified-error
:operation operation)))
(defun readtable-case (table)
(%readtable-case table))
(defun (setf readtable-case) (new-case table)
(assert-not-standard-readtable table '(setf readtable-case))
(setf (%readtable-case table) new-case))
(defun copy-readtable (&optional (from-readtable *readtable*) to-readtable)
"A copy is made of from-readtable and place into to-readtable."
(assert-not-standard-readtable to-readtable 'copy-readtable)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment