Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define behavior of NIL for readtable argument #56

Open
yitzchak opened this issue May 21, 2024 · 0 comments
Open

Define behavior of NIL for readtable argument #56

yitzchak opened this issue May 21, 2024 · 0 comments
Labels
needs writeup A problem description that should be turned into a written-up issue

Comments

@yitzchak
Copy link
Member

yitzchak commented May 21, 2024

COPY-READTABLE states that passing NIL as the readtable argument will cause the standard readtable to be copied. The other readtable functions do not state the behavior of NIL as the readtable argument. Dictionary entries affected:

  • set-macro-character, get-macro-character
  • make-dispatch-macro-character
  • readtable-case
  • set-dispatch-macro-character, get-dispatch-macro-character
  • set-syntax-from-char

GET-MACRO-CHARACTER

Some examples for just one of the functions, GET-MACRO-CHARACTER using the following test case:

(defun one ()
  (let ((func (lambda (x y)))
        (*readtable* (copy-readtable)))
    (set-macro-character #\a func *readtable*)
    (values (eq func (get-macro-character #\a))
            (eq func (get-macro-character #\a nil)))))
    
(one)
  • ABCL (one) ; => T, NIL
  • CCL (one) ; => T, T
  • Clasp (one) ; => T, T
  • ECL (one) ; => T, NIL
  • SBCL (one) ; => T, NIL
@yitzchak yitzchak added the needs writeup A problem description that should be turned into a written-up issue label May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs writeup A problem description that should be turned into a written-up issue
Projects
None yet
Development

No branches or pull requests

1 participant