2

I try to set a new hex-color to highlight the current line in the distinguished theme, but this can have no effects. I put this in init.el:

;;highlight current LINE
(global-hl-line-mode 1)
(set-face-background 'hl-line "#47310D")
(set-face-foreground 'highlight nil)

How can i change the color of the current line?

  • Are you place this after loading theme? – Konstantin Morenko Sep 12 '16 at 14:47
  • 1
    Sometimes getting these customizations applied at the correct time is tricky. Maybe it will be easier to use M-x customize-group hl-line than to do this in your init.el? – Tyler Sep 12 '16 at 14:57
  • @KonstantinMorenko No its placed before (load-theme 'distinguished t) – user12021 Sep 12 '16 at 15:48
  • 1
    So, load-theme could change value of this variable. Try to place setting face after load-theme. – Konstantin Morenko Sep 12 '16 at 16:13
  • @KonstantinMorenko Perfect, this works! – user12021 Sep 12 '16 at 16:26
1

When you put your code before load-theme, loading theme could change value of this variable. Put your code after load-theme in your init.el.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy