From: Eli Zaretskii <eliz@gnu.org>
To: zhang cc <ccsmile2008@outlook.com>
Cc: emacs-devel@gnu.org
Subject: Re: How to let hl-line-mode ignore text with non-default background color?
Date: Tue, 09 Jan 2018 21:12:02 +0200 [thread overview]
Message-ID: <83tvvu6e4d.fsf@gnu.org> (raw)
In-Reply-To: <PS1PR0601MB1403E250CF031E9779456806A8100@PS1PR0601MB1403.apcprd06.prod.outlook.com> (message from zhang cc on Tue, 9 Jan 2018 06:21:47 +0000)
> From: zhang cc <ccsmile2008@outlook.com>
> CC: "emacs-devel@gnu.org" <emacs-devel@gnu.org>
> Date: Tue, 9 Jan 2018 06:21:47 +0000
> 1. Open emacs with “-Q” arg
> 2. In the scratch buffer, eval the following form:
>
> (progn
> (text-mode)
> (hl-line-mode)
> (defface test-face
> '((((class color) (background light))
> :foreground "darkseagreen2" :background "black")
> (((class color) (background dark))
> :foreground "darkolivegreen" :background "white")
> (t :inverse-video t))
> "test face")
> (set-text-properties (point-min) (point-max) `(face test-face)))
>
> 3. Then move cursor across lines in buffer. Foreground color of text is the same as background color set by hl-line-mode, and text can’t be seen.
If you must set the foreground of the text the same as the background
of the hl-line face, then customize the hl-line face to define the
"distant foreground" color for it. E.g., I defined the "distant
foreground" to be black, and the problem went away.
next prev parent reply other threads:[~2018-01-09 19:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-09 2:25 How to let hl-line-mode ignore text with non-default background color? zhang cc
2018-01-09 3:45 ` Eli Zaretskii
2018-01-09 6:21 ` zhang cc
2018-01-09 19:12 ` Eli Zaretskii [this message]
2018-01-10 9:23 ` zhang cc
2018-01-10 15:38 ` Eli Zaretskii
2018-01-11 0:29 ` zhang cc
[not found] <3d53b7ae-a4cf-4405-8669-706781bb4889@Spark>
2018-01-09 2:42 ` zhang cc
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=83tvvu6e4d.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=ccsmile2008@outlook.com \
--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.