1
votes

I used local-time's reader macro, until the moment I realized I don't need it (want to read back a date? Just use format or local-time:format-datestring and it won't output a @…).

However, it conflicts with Parenscript code using ps:@

illegal terminating character after a colon: #@

Can I disable the reader macro without restarting the image?

What it does is

(defun enable-read-macros ()
  "Enables the local-time reader macros for literal timestamps and universal time."
  (set-macro-character #\@ '%read-timestring)
  (set-dispatch-macro-character #\# #\@ '%read-universal-time)
  (values))

I don't see a reader macro on Parenscript's side.

1

1 Answers

2
votes

Maybe what you can do is to try to revert the changes to the current readtable with something like this, that should get the standard readtable and “restore” the entries of the current readtable to the standard one.

(let ((rt (copy-readtable nil)))
  (multiple-value-bind (function non-terminating-p)
      (get-macro-character #\@ rt)
    (set-macro-character #\@ function non-terminating-p))
  (set-dispatch-macro-character #\# #\@ (get-dispatch-macro-character #\# #\@ rt)))