I'm trying to get the same left margin as textmate mac-classic theme, i've setup my custom face for fringe, but got some problems with left margin in linum-mode. If i try M-x customize-face linum background it sets my color only for linum-numbers, but not the whole l开发者_Python百科eft margin(the whole margin still have the color of the default background). How to set it right?
So you're setting the "fringe" and "linum" faces the same way, but "fringe" doesn't work when you apply your theme? The theme you're using, if it's this one, sets the fringe face background explicitly, so your customized definition is probably getting overridden by the theme's definition.
The solution is to modify the theme accordingly, or to put something like this 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. You could use set-face-background
instead, but set-face-attribute
is more versatile.)
精彩评论