From: Eli Zaretskii <eliz@gnu.org>
To: Stephen Berman <stephen.berman@gmx.net>
Cc: hinrik.sig@gmail.com, 21750@debbugs.gnu.org
Subject: bug#21750: show-paren-mode erroneously highlights the left margin
Date: Sun, 25 Oct 2015 20:37:28 +0200 [thread overview]
Message-ID: <83y4eqdcbb.fsf@gnu.org> (raw)
In-Reply-To: <87vb9wndad.fsf@gmx.net>
> From: Stephen Berman <stephen.berman@gmx.net>
> Cc: hinrik.sig@gmail.com, 21750@debbugs.gnu.org
> Date: Sat, 24 Oct 2015 23:54:02 +0200
>
> >> I think this is a side effect of the general feature whereby an
> >> overlay string "inherits" the face of the surrounding buffer text.
> >> It doesn't matter whether the overlay string is displayed in the
> >> window's display margin or in the text area.
>
> Is this clearly documented in the Emacs Lisp manual? If not, I think it
> should be.
Which part(s) of what I said you think should be clearly documented?
The part about display/overlay strings using the face of the
"underlying" text, or the fact that this applies to strings displayed
on the display margins?
> (The only places I found that mention overlays and faces
> together are 37.9.2 Overlay Properties and 37.12.4 Displaying Faces, but
> in neither is this effect of face inheritance clearly stated, AFAICS.)
"Displaying Faces" is the place that should make it clear. It
describes the order in which Emacs determines a face appropriate for
displaying a given character, using the various possible sources. If
something there is unclear or missing, please elaborate. (It is clear
to me, but I'm not the typical reader of those parts, obviously ;-)
> > You can work around this in this case if you modify your face
> > customization as follows:
> >
> > (custom-set-faces
> > '(linum ((t (:foreground "black" :background "white" :weight bold)))))
> >
> > IOW, don't let the 'linum' face inherit the background color from the
> > surrounding text.
>
> It would also be very helpful to document this workaround.
Once again, the above section says that specifying the face takes the
specified attributes from that face, and merges them with faces from
lower-priority sources in order to determine unspecified attributes.
In this case, the background color is not specified by the customized
'linum' face, so Emacs takes it from the buffer text. I'm open to
suggestions for how to make this more evident.
In any case, I take it that you agree that what Emacs does is the only
reasonable thing in this case, right?
next prev parent reply other threads:[~2015-10-25 18:37 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-24 17:28 bug#21750: show-paren-mode erroneously highlights the left margin Hinrik Örn Sigurðsson
2015-10-24 20:07 ` Eli Zaretskii
2015-10-24 20:22 ` Eli Zaretskii
2015-10-24 21:54 ` Stephen Berman
2015-10-25 18:37 ` Eli Zaretskii [this message]
2015-10-25 21:33 ` Stephen Berman
2016-03-19 19:07 ` Eli Zaretskii
2015-10-24 23:53 ` Hinrik Örn Sigurðsson
2015-10-25 18:39 ` Eli Zaretskii
2015-10-26 13:28 ` Hinrik Örn Sigurðsson
2015-10-27 23:28 ` Johan Bockgård
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=83y4eqdcbb.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=21750@debbugs.gnu.org \
--cc=hinrik.sig@gmail.com \
--cc=stephen.berman@gmx.net \
/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).