From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Lute Kamstra Newsgroups: gmane.emacs.devel Subject: Re: Suggestion for hl-line.el Date: Thu, 08 May 2003 09:00:29 +0200 Organization: CWI, Amsterdam Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <200305071446.h47EkSJw014780@rum.cs.yale.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1052377223 25215 80.91.224.249 (8 May 2003 07:00:23 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 8 May 2003 07:00:23 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Thu May 08 09:00:16 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19DfO4-0006Y6-00 for ; Thu, 08 May 2003 09:00:16 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19DfSP-0005k8-00 for ; Thu, 08 May 2003 09:04:45 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19DfOo-0001lu-08 for emacs-devel@quimby.gnus.org; Thu, 08 May 2003 03:01:02 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 19DfOO-0001gr-00 for emacs-devel@gnu.org; Thu, 08 May 2003 03:00:36 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 19DfOL-0001WD-00 for emacs-devel@gnu.org; Thu, 08 May 2003 03:00:35 -0400 Original-Received: from hera.cwi.nl ([192.16.191.8]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19DfOK-0001Qx-00 for emacs-devel@gnu.org; Thu, 08 May 2003 03:00:32 -0400 Original-Received: from occarina.pna.cwi.nl (occarina.pna.cwi.nl [192.16.184.200]) by hera.cwi.nl with ESMTP id JAA07649 for ; Thu, 8 May 2003 09:00:30 +0200 (MEST) Original-Received: (from lute@localhost) by occarina.pna.cwi.nl (8.12.8/8.12.5) id h4870UO1018252; Thu, 8 May 2003 09:00:30 +0200 X-Authentication-Warning: occarina.pna.cwi.nl: lute set sender to Lute.Kamstra@cwi.nl using -f Original-To: "Stefan Monnier" In-Reply-To: <200305071446.h47EkSJw014780@rum.cs.yale.edu> (Stefan Monnier's message of "Wed, 07 May 2003 10:46:28 -0400") User-Agent: Gnus/5.1001 (Gnus v5.10.1) Emacs/21.3 (gnu/linux) Original-Lines: 40 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:13760 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:13760 "Stefan Monnier" 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. -- Lute Kamstra CWI department PNA4 Room M233 phone (+31) 20 592 4214 [Echelon material: Janet Reno Khaddafi JUWTF]