unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: 42552@debbugs.gnu.org
Subject: bug#42552: 28.0.50; Overlay 'face' property doesn't set the "underlying face" for 'after-string'
Date: Tue, 11 Aug 2020 18:10:42 +0300	[thread overview]
Message-ID: <83h7t943rh.fsf@gnu.org> (raw)
In-Reply-To: <2b1fda37-b193-0119-3fab-71181fc758ae@yandex.ru> (message from Dmitry Gutov on Tue, 11 Aug 2020 01:27:59 +0300)

> Cc: 42552-done@debbugs.gnu.org
> From: Dmitry Gutov <dgutov@yandex.ru>
> Date: Tue, 11 Aug 2020 01:27:59 +0300
> 
> On 07.08.2020 08:42, Eli Zaretskii wrote:
> 
> >> 1. Eval:
> >>
> >> (with-silent-modifications
> >>     (insert (propertize "abc"
> >>                         'font-lock-face
> >>                         '((:background "green" :extend t)
> >>                           default
> >>                           ( :inverse-video t
> >>                             :foreground "yellow"
> >>                             :extend t)))))
> >>
> >> 2. C-j
> >>
> >> The "extended" newline is yellow.
> > 
> > That's expected due to face-merging, no?
> 
> I would have expected it to be green, at least. But if you say it's 
> working correctly, it probably is.

No, you are right: there's a subtlety here and another bug.

The subtlety is that having 'default' there is not a no-op: it resets
the :inverse-video attribute, and then "yellow" no longer affects the
background of the merged face.  So to have the same happen during face
extension past EOL, you need to have all the components say ":extend t",
like this:

 (with-silent-modifications
     (insert (propertize "abc"
                         'font-lock-face
                         '((:background "green" :extend t)
                           ( :inherit default :extend t)
                           ( :inverse-video t
                             :foreground "yellow"
                             :extend t)))))

And the bug is that the above doesn't work in Emacs 27; I've just
installed a fix on master.

Thanks.





      reply	other threads:[~2020-08-11 15:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-26 18:23 bug#42552: 28.0.50; Overlay 'face' property doesn't set the "underlying face" for 'after-string' Dmitry Gutov
2020-07-26 19:02 ` Eli Zaretskii
2020-07-26 20:00   ` Dmitry Gutov
2020-07-30 14:04     ` Eli Zaretskii
2020-08-02 23:37       ` Dmitry Gutov
2020-08-03 15:09         ` Eli Zaretskii
2020-08-04 23:55           ` Dmitry Gutov
2020-08-05 14:58             ` Eli Zaretskii
2020-08-06 23:16               ` Dmitry Gutov
2020-08-07  5:42                 ` Eli Zaretskii
2020-08-10 22:27                   ` Dmitry Gutov
2020-08-11 15:10                     ` Eli Zaretskii [this message]

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83h7t943rh.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=42552@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).