3

I installed Prelude on my emacs24. I'm using ubuntu 12.04

It worked perfectly the first time I used it, but all the next times it doesn't. On my current line the font color is gray so it's hard to see what I write. Previously it was a Bold case, keeping any color the line had for reserved words.

How can I fix this?

Gray on Cursor line

or also the empty lines with spaces are all yellow

I've been trying to fix it on the: ~/.emacs.d/elpa/zenburn-theme-20130716.1457/zenburn-theme.el file but I can't find a solution... I think the problem could be between this lines:

;;;;; hl-line-mode

`(hl-line-face ((,class (:background ,zenburn-bg-05)) (t :weight bold)))
`(hl-line ((,class (:background ,zenburn-bg-05)) ; old emacsen (t :weight bold)))

Thanks!

Cœur
  • 37,241
  • 25
  • 195
  • 267
AAlvz
  • 1,059
  • 2
  • 9
  • 15

2 Answers2

3

You can change the background and foreground to whatever you want, or turn it off completely. You can add bold or underline or overline or slant, or whatever floats your boat. One of my very first projects was to take the settings from color-theme and put it into my .emacs file and I haven't used a specific color theme since. Oh, and of course you want to open your .emacs or init file to see if there are any settings that conflict with the color theme you are using.

(global-hl-line-mode 1)  ;; highlight current line -- see hl-line.el

(custom-set-faces
  '(highlight ((t (:background "grey80" :foreground "black" :bold t)))) ;; highlight current line
)
lawlist
  • 13,099
  • 3
  • 49
  • 158
  • Hi lawlist. I've experimented with your solution. the `foreground` part is the letter color, right? .. How can I make it to keep the current color but make it bold? instead of "black" – AAlvz Jul 25 '13 at 00:40
  • The portion of the code that says `:bold t` is bold. `foreground` is the letters. If you want to make the background disappear, then remove `:background "grey80"`. The `foreground` could be set to the same color as whatever your regular foreground font is, which could be the default or it might be set for a specific mode depending upon your setup. – lawlist Jul 25 '13 at 01:47
  • using `:foreground nil` makes all the deal. Thanks =) – AAlvz Jul 25 '13 at 01:50
3

Important: Add to .bashrc file:

export TERM=xterm-256color

and I found the perfect configuration for me. Here it goes:

;;;;; hl-line-mode                                                              

   (custom-set-faces
  '(highlight ((t (:background "grey20" :foreground nil :bold t)))) ;; highligh\
t current line                                                                  
)

This way you keep every color for reserved words all bold and a gray background for the current line. Everything will be beautiful =)

enter image description here

enter image description here

AAlvz
  • 1,059
  • 2
  • 9
  • 15