tags:

views:

330

answers:

1

In Emacs (23 on Mac Leopard), I've discovered how to highlight the current line with hl-line-mode, but when using it globally in all buffers, it highlights the current line in all buffers in all frames.

I'd like to be able to highlight the current line (or at least have a different face for it) in only the currently active buffer. I'm sure this must be possible to some degree as the cursor changes dependent on whether the buffer is the current one or not.

Thanks

Singletoned

+5  A: 

Looking at the documentation for hl-line-mode, it appears that you might have the variable hl-line-sticky-flag turned on. Try

C-h v hl-line-sticky-flag

to see if it's non-nil, and if so, then add

(setq hl-line-sticky-flag nil)

to your .emacs.

Trey Jackson
Ok. I'm embarrassed now. I thought I'd read all the documentation for hl-line-mode. Thank you.
Singletoned
It seems to be set to `t` by default. Wierd.
monotux
@monotux It is set to `t` by default in the library itself (Emacs 23.2).
Trey Jackson