[Top][All Lists]

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

Re: Suggestion for hl-line.el

From: Lute Kamstra
Subject: Re: Suggestion for hl-line.el
Date: Thu, 08 May 2003 09:00:29 +0200
User-agent: Gnus/5.1001 (Gnus v5.10.1) Emacs/21.3 (gnu/linux)

"Stefan Monnier" <monnier+gnu/address@hidden> writes:

>> 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"
> I think it makes more sense to add a hl-line-sticky variable.

Do you want that changing hl-line-sticky takes effect immediately, or
the next time the mode is turned on?  The first case would require an
unhighlight function on pre-command-hook whenever hl-line-mode is
turned on.  Just in case sticky is set to t.  The second case can, in
case hl-line-sticky is t, do without an unhighlight function on
pre-command-hook, which should be faster.

> Better yet: make the buffer-local mode sticky, but the global mode
> non-sticky.

Do you like to have this behavior instead of a hl-line-sticky variable
(easier), or in addition to such a variable (more difficult)?

The global mode is currently defined in terms of the local mode
(courtesy of easy-mmode-define-global-mode).  I don't easily see how a
non-sticky global mode can piggyback on a sticky local mode like that,
so it probably needs to be implemented directly.

These seem sensible behaviors for the local and global modes, though.


Lute Kamstra  <address@hidden>
CWI  department PNA4
Room M233  phone (+31) 20 592 4214
[Echelon material: Janet Reno Khaddafi JUWTF]

reply via email to

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