GNU bug report logs - #77381
[PATCH] extend tex--prettify-symbols-alist

Previous Next

Package: emacs;

Reported by: "Paul D. Nelson" <ultrono <at> gmail.com>

Date: Sun, 30 Mar 2025 11:42:02 UTC

Severity: normal

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: "Paul D. Nelson" <ultrono <at> gmail.com>
Cc: 77381 <at> debbugs.gnu.org
Subject: bug#77381: [PATCH] extend tex--prettify-symbols-alist
Date: Tue, 01 Apr 2025 14:32:56 +0300
> From: "Paul D. Nelson" <ultrono <at> gmail.com>
> Cc: 77381 <at> 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.




This bug report was last modified 48 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.