Rather than simply a progn at the end of elisp-reader, how about making it possible to enable/disable, then it could maybe be scoped for reading certain things.
(defvar er--original-read (symbol-function 'read))
(defvar er--original-read-from-string (symbol-function 'read-from-string))
(defvar er--original-load-read-function load-read-function)
(defun er-enable ()
(interactive)
(setq er--original-read (symbol-function 'read)
er--original-read-from-string (symbol-function 'read-from-string)
er--original-load-read-function load-read-function)
(fset 'read (symbol-function 'er-read))
(fset 'read-from-string (symbol-function 'er-read-from-string))
(setq load-read-function (symbol-function 'er-read)))
(defun er-disable ()
(interactive)
(fset 'read er-original-read)
(fset 'read-from-string er--original-read-from-string)
(setq load-read-function er--original-load-read-function))
(defcustom er-enabled nil
"Whether to use the extensible elisp-reader when reading elisp."
:set
(lambda (option new-value)
(if new-value (er-enable) (er-disable))))
Rather than simply a
prognat the end of elisp-reader, how about making it possible to enable/disable, then it could maybe be scoped for reading certain things.