emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: `unreadablep'


From: Po Lu
Subject: Re: `unreadablep'
Date: Wed, 15 Dec 2021 20:22:00 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux)

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Po Lu <luangruo@yahoo.com> writes:
>
>> Yes, now I think the `print-unreadable-function' solution would be best;
>> we could just cause a non-local exit from within that function.

> The PRINTCHARFUN just gets a single character at a time, doesn't it?  So
> it's not at the correct level to determine whether something is
> unreadable or not...

The idea is that `print-unreadable-function' is called _with_ the object
and the printcharfun (and possibly some prin1 state, but I haven't
thought of the details yet) when prin1 encounters an unreadable object.

So if you want to error something when trying to print an unreadable
object, you can just set that to a function that throws.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]