Paste number 24264: (defun list-all-macro-characters (&optional (*readtable* *readtable*))

Paste number 24264: (defun list-all-macro-characters (&optional (*readtable* *readtable*))
Pasted by: pjb
2 years, 3 months ago
None
Paste contents:
Raw Source | XML | Display As
(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.

Colorize as:
Show Line Numbers

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.