简体   繁体   中英

In emacs, how do I highlight the current line in the current frame only?

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM