Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

idle-hightlight-mode should be able to change only the background color #2

Open
semente opened this issue Aug 23, 2011 · 6 comments
Open

Comments

@semente
Copy link

semente commented Aug 23, 2011

When i-h-m highlights it changes also the foreground color even when the face is configured to change only the background.

@nonsequitur
Copy link
Owner

Have you checked M-x customize-face idle-highlight?
Are you sure only the "Background" attribute is enabled?

@semente
Copy link
Author

semente commented Aug 23, 2011

Yep! Only Background is enabled in this face. (no inherit, no foreground configured there)

@nonsequitur
Copy link
Owner

Please do the following:

  1. Move the point over a word so that it gets highlighted.
  2. Run M-x describe-char
  3. Post the content of the resulting help buffer in a Pastie or a Gist. (To keep the formatting intact.)

@semente
Copy link
Author

semente commented Aug 24, 2011

On Wed, Aug 24, 2011 at 8:28 AM, nonsequitur
[email protected]
wrote:

Please do the following:

  1. Move the point over a word so that it gets highlighted.
  2. Run M-x describe-char
  3. Post the content of the resulting help buffer in a Pastie or a Gist. (To keep the formatting intact.)

https://gist.github.com/1167973

Also attached a screenshot. (The cursor is in "test", look the
foreground face of "another").

Guilherme Gondim (semente)

@semente
Copy link
Author

semente commented Aug 24, 2011

I hope you've received the screenshot in your e-mail. :-)

@semente semente closed this as completed Aug 24, 2011
@semente semente reopened this Aug 24, 2011
@groks
Copy link

groks commented Aug 19, 2014

Same problem. Here's the output of describe-char and describe-font idle-highlight:

             position: 3297 of 3835 (86%), column: 2
            character: e (displayed as e) (codepoint 101, #o145, #x65)
    preferred charset: ascii (ASCII (ISO646 IRV))
code point in charset: 0x65
               syntax: w    which means: word
             category: .:Base, L:Left-to-right (strong), a:ASCII, l:Latin, r:Roman
             to input: type "C-x 8 RET HEX-CODEPOINT" or "C-x 8 RET NAME"
          buffer code: #x65
            file code: #x65 (encoded by coding system undecided-unix)
              display: no font available

Character code properties: customize what to show
  name: LATIN SMALL LETTER E
  general-category: Ll (Letter, Lowercase)
  decomposition: (101) ('e')

There is an overlay here:
 From 3295 to 3334
  face                 hl-line
  window               nil


There are text properties here:
  face                 idle-highlight
  fontified            t

[back]      [forward]




Face: idle-highlight (sample) (customize this face)

Documentation:
Face used to highlight other occurrences of the word at point.

Defined in `idle-highlight-mode.el'.

        Family: unspecified
       Foundry: unspecified
         Width: unspecified
        Height: unspecified
        Weight: unspecified
         Slant: unspecified
    Foreground: unspecified
    Background: gray15
     Underline: unspecified
      Overline: unspecified
Strike-through: unspecified
           Box: unspecified
       Inverse: unspecified
       Stipple: unspecified
          Font: unspecified
       Fontset: unspecified
       Inherit: nil

[back]

hl-line does the correct thing: it sets the background only (as the face specifies) maintaining the original text's foreground color. idle-highlight always forces the default-face foreground.

tarsius pushed a commit to emacsmirror/idle-highlight-mode that referenced this issue Feb 13, 2022
Scan for symbol bounds instead of word bounds.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants