Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


hl-line face is not changed #45

hdhoang opened this Issue · 4 comments

2 participants


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


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


Sorry, I'm actually using 24.2.1 binary from 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.


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.


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

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.