hl-line face is not changed #45

Closed
hdhoang opened this Issue Oct 22, 2012 · 4 comments

Projects

None yet

2 participants

@hdhoang
Contributor
hdhoang commented Oct 22, 2012

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".

Collaborator
thomasf commented Oct 22, 2012

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

Contributor
hdhoang commented Oct 23, 2012

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.

Collaborator
thomasf commented Oct 23, 2012

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 added a commit that referenced this issue Oct 23, 2012
@thomasf thomasf issue #45 - make hl-line-mode face change correctly when switching be…
…tween zenburn and solarized themes.
9fd07d7
Collaborator
thomasf commented Oct 23, 2012

Thanks for spotting this.

@thomasf thomasf closed this Oct 23, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment