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?

5
  • Are you place this after loading theme? Sep 12, 2016 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, 2016 at 14:57
  • @KonstantinMorenko No its placed before (load-theme 'distinguished t)
    – user12021
    Sep 12, 2016 at 15:48
  • 1
    So, load-theme could change value of this variable. Try to place setting face after load-theme. Sep 12, 2016 at 16:13
  • @KonstantinMorenko Perfect, this works!
    – user12021
    Sep 12, 2016 at 16:26

1 Answer 1

2

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