From: Ergus <spacibba@aol.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Merging the underline attribute at EOL
Date: Thu, 19 Dec 2019 02:19:10 +0100 [thread overview]
Message-ID: <20191219011910.bhvwrcco56uv2znm@Ergus> (raw)
In-Reply-To: <834kxy50rk.fsf@gnu.org>
On Tue, Dec 17, 2019 at 07:18:23PM +0200, Eli Zaretskii wrote:
>> Date: Tue, 17 Dec 2019 15:13:45 +0100
>> From: Ergus <spacibba@aol.com>
>> Cc: emacs-devel@gnu.org
>>
>> --- a/src/xdisp.c
>> +++ b/src/xdisp.c
>> @@ -21596,13 +21596,17 @@ extend_face_to_end_of_line (struct it *it)
>>
>> if (FRAME_WINDOW_P (f)
>> && MATRIX_ROW_DISPLAYS_TEXT_P (it->glyph_row)
>> - && face->box == FACE_NO_BOX
>> && FACE_COLOR_TO_PIXEL (face->background, f) == FRAME_BACKGROUND_PIXEL (f)
>> #ifdef HAVE_WINDOW_SYSTEM
>> && !face->stipple
>> #endif
>> && !it->glyph_row->reversed_p
>> - && !Vdisplay_fill_column_indicator)
>> + && !Vdisplay_fill_column_indicator
>> + && (NILP (face->lface[LFACE_EXTEND_INDEX])
>> + ||(face->box == FACE_NO_BOX
>> + && face->underline == FACE_NO_UNDERLINE
>> + && face->overline_p == false
>> + && face->strike_through_p == false)))
>> return;
>
>I don't think I understand the test for the :extend attribute being
>non-nil. Can you explain why you added it? In general, faces that we
>treat as "base face" when we start face merging don't need to have the
>:extend attribute set (see, for example, the tool-bar face), but we
>still want to apply them to the space past EOL. Am I missing
>something? Did you bump into some scenario where this attribute
>caused some regression or bad results?
>
>Thanks.
>
Hi Eli:
I just added that test (probably not the best one) for the case where
the face is the default face. Actually the merge we use (with the
filter) asserts that the resulting face will be :extend t or the default
face (AFAIR).
So at this point I thought (probably wrong) that only the default face
could have :extend nil and we could exit early in that case... But if
there are some cases that I am not considering we can remove that.
Do you think that removing it, the rest of the changes will be enough?
Best,
Ergus
next prev parent reply other threads:[~2019-12-19 1:19 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-14 8:28 Merging the underline attribute at EOL Eli Zaretskii
2019-12-16 3:12 ` Ergus
2019-12-16 16:12 ` Eli Zaretskii
2019-12-16 3:49 ` Ergus
2019-12-16 16:17 ` Eli Zaretskii
2019-12-16 16:11 ` Ergus
2019-12-16 17:05 ` Eli Zaretskii
2019-12-16 20:31 ` Ergus
2019-12-17 3:22 ` Eli Zaretskii
2019-12-17 14:13 ` Ergus
2019-12-17 17:18 ` Eli Zaretskii
2019-12-19 1:19 ` Ergus [this message]
2019-12-19 15:38 ` Eli Zaretskii
2019-12-22 22:46 ` Ergus
2019-12-23 13:35 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191219011910.bhvwrcco56uv2znm@Ergus \
--to=spacibba@aol.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.