| Paste number 24264: | (defun list-all-macro-characters (&optional (*readtable* *readtable*)) |
| Pasted by: | pjb |
| When: | 2 years, 10 months ago |
| Share: | Tweet this! | http://paste.lisp.org/+IQ0 |
| Channel: | None |
| Paste contents: |
(defun list-all-macro-characters (&optional (*readtable* *readtable*))
(loop
:with results = '()
:for code :from 0 :below CHAR-CODE-LIMIT
:for ch = (code-char code)
:do (multiple-value-bind (fun ntp) (get-macro-character ch)
(when (or fun ntp)
(push (list ch fun ntp
(when (handler-case
(progn (get-dispatch-macro-character ch #\a)
t)
(error () nil))
(loop
:for code :from 0 :below char-code-limit
:for sub = (code-char code)
:for fun = (get-dispatch-macro-character ch sub)
:when fun
:collect (list sub fun)))) results)))
:finally (return results)))This paste has no annotations.