emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Suggestion for hl-line.el


From: Lute Kamstra
Subject: Suggestion for hl-line.el
Date: Wed, 07 May 2003 14:33:56 +0200
User-agent: Gnus/5.1001 (Gnus v5.10.1) Emacs/21.3 (gnu/linux)

Dear people,

Currently, lisp/hl-line.el defines two minor modes, one local and one
global variant (defined with easy-mmode-define-global-mode).  The
minor modes highlight the line around point for the selected window
only.  They use an overlay, a function on pre-command-hook, and a
function on post-command-hook to do that.

I understand that hl-line.el was originally implemented to satisfy a
feature request of people who wanted to use it to locate the point
easily.  The commentary section of hl-line.el actually discourages
this use and suggest to use it for things like the Gnus summary
buffer.  I agree with this.  There is a problem with this suggested
use, however.  

Suppose one has two buffers visible: one buffer in a non-selected
window and some sort of summary of this buffer in the selected window.
hl-line-mode can now be used to highlight the current line in the
summary buffer.  However if the window of the other buffer becomes
selected, the line in the summary buffer is no longer highlighted.  I
would like it to stay highlighted.

In order to accomplish this, a second pair of minor modes ("sticky"
variants of the original pair) could be implemented.  They should
highlight the line the buffer's point is in, in all windows.  This
might cause the mode to highlight another line than the line the
window's point is in, but this seems hard to remedy.  Implementation
of such modes should be more efficient because only a highlighting
function on post-command-hook is needed.  In, fact I already
implemented such a pair of minor modes.

Is it a good idea to add such a second pair of minor modes to
hl-line.el?

Regards,

  Lute.

-- 
Lute Kamstra  <address@hidden>
CWI  department PNA4
Room M233  phone (+31) 20 592 4214
[Echelon material: beanpole AFSPC enigma]




reply via email to

[Prev in Thread] Current Thread [Next in Thread]