GNU bug report logs - #77871
[PATCH 2/2] term: don't translate undercurl to plain underline

Previous Next

Package: emacs;

Reported by: Johannes Altmanninger <aclopte <at> gmail.com>

Date: Thu, 17 Apr 2025 18:49:04 UTC

Severity: normal

Tags: patch

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Johannes Altmanninger <aclopte <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Cc: Johannes Altmanninger <aclopte <at> gmail.com>
Subject: [PATCH 2/2] term: don't translate undercurl to plain underline
Date: Thu, 17 Apr 2025 20:46:33 +0200
* src/term.c (turn_on_face): given a underline face such as
FACE_UNDERLINE_WAVE, do not automagically translate it
to single underline if terminfo does not declare support
for the desired underline style. Instead, add no underline.

I have not yet figured out how to test this change.  In doubt we
should drop it.  But I included it here anyway, since it tries to
do the same as the previous commit, so it should at least serve to
point out another instance of this problem. I know almost nothing
about Emacs faces; maybe this change would break themes that rely on
this automatic translation.
---
 src/term.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/term.c b/src/term.c
index 8aa47322d19..ef93ccfbef8 100644
--- a/src/term.c
+++ b/src/term.c
@@ -2050,8 +2050,7 @@ turn_on_face (struct frame *f, struct face *face)
 
   if (face->underline && MAY_USE_WITH_COLORS_P (tty, NC_UNDERLINE))
     {
-      if (face->underline == FACE_UNDERLINE_SINGLE
-	  || !tty->TF_set_underline_style)
+      if (face->underline == FACE_UNDERLINE_SINGLE)
 	OUTPUT1_IF (tty, tty->TS_enter_underline_mode);
       else if (tty->TF_set_underline_style)
 	{
-- 
2.49.0





This bug report was last modified 123 days ago.

Previous Next


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