[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#24982: 24.5; way to let Elisp reader ignore unreadable #(...) constr
From: |
Lars Ingebrigtsen |
Subject: |
bug#24982: 24.5; way to let Elisp reader ignore unreadable #(...) constructs |
Date: |
Sun, 13 Feb 2022 09:46:19 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Drew Adams <drew.adams@oracle.com> writes:
> Provide a Boolean variable or a wrapper macro that has the effect of not
> raising an error but just skipping over any unreadable #(...) construct.
I assume you mean #<...> here?
Anyway, there was some discussion about this in the context of the new
readablep function and the `print-unreadable-function' variable. We
could indeed introduce a new `read-unreadable-function' variable that's
called when we encounter a #< instead of throwing an error (with no
performance impact).
Does anybody see any major downsides to doing that? We've been wary of
allowing the users to customise the Emacs Lisp reader, but this seems
like a very small thing. And it'd allow people to implement having
#<marker in no buffer>
read to (make-marker), etc, if they find that useful for some data
structures.
I had an extremely quick peek at this some time back, and it seemed
pretty trivial to implement.
Any opinions?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
- bug#24982: 24.5; way to let Elisp reader ignore unreadable #(...) constructs,
Lars Ingebrigtsen <=