Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

hl-line face is not changed #45

Closed
hdhoang opened this Issue · 4 comments

2 participants

@hdhoang

I use prelude with emacs 24.2, and have (load-theme 'solarized-light) in custom.el.

hl-line's background is something near black which is unreadable together with solarized's foreground. describe-face hl-line says:

Background: #383838
Inherit: highlight

describe-face highlight says:

Background: #eee8d5

The other values are "unspecified".

@thomasf
Collaborator

Hmm, I think it works as it should in 24.2.1, I just recompiled from the emacs24-branch.

@hdhoang

Sorry, I'm actually using 24.2.1 binary from gnu.org on windows.

Curiously, zenburn comments that hl-line is for "old-emacsen", while solarized doesn't define it. I think moving from zenburn to solarized triggers this problem.

On a related note, solarized.el defines hl-line-face with solarized-bg, which is the normal background. I think it should be solarized-hl as with the highlight face.

@thomasf
Collaborator

Non of them are deprecated, hl-line is a (defface, added in 2006 according to the changelog. hl-line-face copies it so i belive you are right. I'll do that change.

hl-line.el

(defface hl-line
  '((t :inherit highlight))
  "Default face for highlighting the current line in Hl-Line mode."
  :version "22.1"
  :group 'hl-line)

(defcustom hl-line-face 'hl-line
  "Face with which to highlight the current line in Hl-Line mode."
  :type 'face
  :group 'hl-line
  :set (lambda (symbol value)
     (set symbol value)
     (dolist (buffer (buffer-list))
       (with-current-buffer buffer
         (when hl-line-overlay
           (overlay-put hl-line-overlay 'face hl-line-face))))
     (when global-hl-line-overlay
       (overlay-put global-hl-line-overlay 'face hl-line-face))))
@thomasf thomasf referenced this issue from a commit
@thomasf thomasf issue #45 - make hl-line-mode face change correctly when switching be…
…tween zenburn and solarized themes.
9fd07d7
@thomasf
Collaborator

Thanks for spotting this.

@thomasf thomasf closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.