emacs-devel
[Top][All Lists]
Advanced

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

Re: Info-mode patch


From: Eli Zaretskii
Subject: Re: Info-mode patch
Date: Sat, 08 Jul 2023 11:14:50 +0300

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: Arthur Miller <arthur.miller@live.com>,  juri@linkov.net,
>   emacs-devel@gnu.org
> Date: Tue, 04 Jul 2023 19:58:12 -0400
> 
> Hmm... I now see that `read` does work on a sub-char-table and returns
> that sub-char-table, so contrary to what I thought, they are exposed to
> ELisp, and also contrary to what `lisp.h` suggests:
> 
>     /* A char-table is a kind of vectorlike, with contents like a vector,
>        but with a few additional slots.  [...]
>        [...] A sub-char-table appears only in an element of a
>        char-table, and there's no way to access it directly from a Lisp
>        program.  */
> 
> I wonder what ELisp can do with it (other than abort/crash, that is :-)
> 
> > AFAICT, this happens because the debugger now uses cl-print to display
> > objects in the backtrace, and cl-print calls type-of, which aborts if
> > presented with a sub-char-table:
> >
> >         /* "Impossible" cases.  */
> >     case PVEC_MISC_PTR:
> >         case PVEC_OTHER:
> >         case PVEC_SUB_CHAR_TABLE:
> >         case PVEC_FREE: ;
> >         }
> >       emacs_abort ();
> 
> The easy fix is to make `type-of` return `sub-char-table`, of course, as
> in the patch below.  But if we go that way, then we should at least
> update the comment in `lisp.h`.  
> Another option is to change `read` so it refuses to return
> a sub-char-table.

Thanks, I installed the patch in your name (and updated the comment),
and I'm therefore closing bug#64450.



reply via email to

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