[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#77381: [PATCH] extend tex--prettify-symbols-alist
From: |
Eli Zaretskii |
Subject: |
bug#77381: [PATCH] extend tex--prettify-symbols-alist |
Date: |
Tue, 01 Apr 2025 14:32:56 +0300 |
> From: "Paul D. Nelson" <ultrono@gmail.com>
> Cc: 77381@debbugs.gnu.org
> Date: Mon, 31 Mar 2025 22:33:59 +0200
>
> One thing I realized is that the implementation I had given of the new
> function was incorrect in its handling of the frame argument, because
> the function char-displayable-p does seem to depend upon the selected
> frame (e.g., on a graphical terminal with multiple frames, each having
> their own default face or font-backend).
You are right, char-displayable-p is a mess in this regard.
> Assuming I haven't misunderstood, I saw a few options for correcting the
> new function:
>
> 1. Wrap char-displayable-p in (with-selected-frame ...).
>
> 2. Give char-displayable-p a frame argument, and wrap its body in
> (with-selected-frame ...).
>
> 3. Drop the frame argument altogether (leaving (with-selected-frame
> ...) to callers of these functions).
I prefer (1), since we cannot change char-displayable-p itself (it's
used in too many places, including during startup).
> Option (3) seemed simplest to me, and also at the least risk of
> introducing confusion concerning the name of the new function: at a
> glance, "char-displayable-on-frame-p" might suggest incorrectly that it
> does the analogue for the given frame of what char-displayable-p does
> for the selected frame.
I acknowledge the potential confusion, but I think we can countermand
that in the doc string (without even mentioning char-displayable-p).
Thanks.
- bug#77381: [PATCH] extend tex--prettify-symbols-alist,
Eli Zaretskii <=