How to set custom background for linum mode?

I am trying to get the same left margin as the textmate mac-classic text, I was setting up my fringe user interface but got some problems with the left margin in linear mode. If I try to use the linum Mx customize background, it sets my color only for linear numbers, but not for the entire left margin (the entire margin still has the default background color). How to install?

+7
source share
1 answer

So you set โ€œfringeโ€ and โ€œlinumโ€ the same way, but โ€œfringeโ€ doesn't work when you apply your theme? The theme you use, if it is this one , explicitly sets the background for the frame, so your custom definition is likely to be overridden by the theme definition.

The solution is to change the theme accordingly or put something similar in your .emacs:

(require 'color-theme-mac-classic) (defun my-color-theme-mac-classic () (interactive) (color-theme-mac-classic) (set-face-attribute 'fringe nil :background "#CCC") (set-face-attribute 'linum nil :background "#CCC")) 

and use my-color-theme-mac-classic instead of color-theme-mac-classic .

(NB. Instead, you can use set-face-background , but set-face-attribute more universal.)

+9
source

All Articles