[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.
- Re: Info-mode patch, (continued)
- Re: Info-mode patch, Eli Zaretskii, 2023/07/03
- Re: Info-mode patch, Juri Linkov, 2023/07/03
- Re: Info-mode patch, Eli Zaretskii, 2023/07/03
- easy-menu-define keys for key-valid-p (was: Info-mode patch), Juri Linkov, 2023/07/04
- Re: easy-menu-define keys for key-valid-p (was: Info-mode patch), Eli Zaretskii, 2023/07/04
- Re: Info-mode patch, Arthur Miller, 2023/07/03
- Re: Info-mode patch, Andreas Schwab, 2023/07/04
- Re: Info-mode patch, Arthur Miller, 2023/07/04
- Re: Info-mode patch, Eli Zaretskii, 2023/07/03
- Re: Info-mode patch, Stefan Monnier, 2023/07/04
- Re: Info-mode patch,
Eli Zaretskii <=
Re: Info-mode patch, Arthur Miller, 2023/07/02
- Re: Info-mode patch, Juri Linkov, 2023/07/03
- Re: Info-mode patch, Arthur Miller, 2023/07/03
- Re: Info-mode patch, Juri Linkov, 2023/07/04
- Re: Info-mode patch, Arthur Miller, 2023/07/04
- Re: Info-mode patch, Juri Linkov, 2023/07/04
- Re: Info-mode patch, Arthur Miller, 2023/07/04
- Re: Info-mode patch, Juri Linkov, 2023/07/05
- Re: Info-mode patch, Arthur Miller, 2023/07/05