emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question about display engine


From: Ergus
Subject: Re: Question about display engine
Date: Sun, 8 Sep 2019 02:51:10 +0200
User-agent: NeoMutt/20180716


Hi Eli and Martin:

Please give a look to the attached patch and check if it is working fine
for you. (I added a new branch "extend_face_id" in savannah too)

I tried to make it as optimized and less changes as possible from the
beginning.

In general I added a parameter to handle_face_prop renamed to
handle_face_prop_general (keeping the original name as a wrapper with
the same signature.)

And the extra parameter is an enum lface_attribute_index. The parameter
is passed from function to function until merge_named_face which checks:

(attr_filter == 0 || (!NILP (from[attr_filter])
                     && !UNSPECIFIEDP (from[attr_filter])))

So if we pass zero as the parameter then the merge is unconditional;
else the attribute needs to be non-nil and specified to merge.

I made it in this way because it is general enough and with low overhead
in case we want to condition the merge for different conditions in
the future.

Right now only region is extensible by default. So you can try with
region and hl-line-mode for example.

I added also the commands to change extensibility set-face-extend and
the internal lisp commands to get/set extend as usual.

Now the only annoying thing is that when extend is disabled for the
region, the extra space after eol has the same face than the text before
(which for me is fine) but in the terminal it is not added... so I
should ask if you consider correct to add the space in terminal or
remove the extra "colored" space in gui? I vote for the first... but you
say.

(I made some changes in the extend_face_to_end_of_line code related with
fill column indicator to reuse part of the code and avoid unneeded
duplication.



On Sat, Sep 07, 2019 at 10:55:14AM +0300, Eli Zaretskii wrote:
Date: Sat, 07 Sep 2019 10:37:07 +0300
From: Eli Zaretskii <address@hidden>
Cc: address@hidden, address@hidden

The default face should always be merged into the face used for line
extension, that goes without saying.

IOW, the default face should always be treated as having the :extend
attribute by default.

Attachment: test.patch
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]