7

I am trying to change the styling of the modeline in emacs 24.

I want to add an overline and an underline. Underline works fine, but overline is not working for some reason. Here is my code so far (added to .emacs):

(set-face-attribute 'mode-line nil
   :foreground "gray0"
   :background "cyan"
   :overline "cyan"
   :underline "cyan")

Any ideas on how to get the overline working?

Also is there a way to set the distance between the borders and text?

Thanks

Drew
  • 29,895
  • 7
  • 74
  • 104
BIOS
  • 1,655
  • 5
  • 20
  • 36
  • For me it is working? I did change the background color to grey, otherwise I was not able to see the overline and underline anyway. – PascalVKooten May 26 '13 at 20:54
  • The underline appears to be within the background color actually. – PascalVKooten May 26 '13 at 20:54
  • 1
    It seems to me that the color of underline/overlines is being the determined by the color provided by ':background' even though it should take a string value if provided so that is another issue. But whatever I set the ':background' to no change. I am currently using the solarized theme if that is worth mentioning! – BIOS May 26 '13 at 21:00
  • 1
    Try testing without using any theme, first. FWIW, it works for me. I customize option `mode-line-buffer-id` to use a spec like this: `((t (:overline "red" :underline "red")))`, so the buffer name (only) has both overline and underline. – Drew Aug 11 '13 at 22:57
  • Can you use both overline and underline at the same time? Perhaps just use a box instead and set the border to your liking. – lawlist Sep 14 '13 at 03:14

1 Answers1

1

If I remember correctly, the default mode-line spec has a non-nil :box spec, so it might solve your problem to add the line :box nil to your code listed above.

hruvulum
  • 105
  • 10