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: Fri, 09 May 2003 13:59:14 +0200 Organization: CWI, Amsterdam Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <200305071446.h47EkSJw014780@rum.cs.yale.edu> <200305081448.h48EmnZd019230@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 1052482016 27945 80.91.224.249 (9 May 2003 12:06:56 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 9 May 2003 12:06:56 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri May 09 14:06:53 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 19E6eL-0007GQ-00 for ; Fri, 09 May 2003 14:06:53 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19E6jH-0005fy-00 for ; Fri, 09 May 2003 14:11:59 +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 19E6b5-0002FE-03 for emacs-devel@quimby.gnus.org; Fri, 09 May 2003 08:03:31 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 19E6ao-0002EY-00 for emacs-devel@gnu.org; Fri, 09 May 2003 08:03:14 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 19E6am-0002Bl-00 for emacs-devel@gnu.org; Fri, 09 May 2003 08:03:13 -0400 Original-Received: from hera.cwi.nl ([192.16.191.8]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19E6X0-0001DW-00 for emacs-devel@gnu.org; Fri, 09 May 2003 07:59:18 -0400 Original-Received: from occarina.pna.cwi.nl (occarina.pna.cwi.nl [192.16.184.200]) by hera.cwi.nl with ESMTP id NAA24936 for ; Fri, 9 May 2003 13:59:15 +0200 (MEST) Original-Received: (from lute@localhost) by occarina.pna.cwi.nl (8.12.8/8.12.5) id h49BxEWW003733; Fri, 9 May 2003 13:59:14 +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: <200305081448.h48EmnZd019230@rum.cs.yale.edu> (Stefan Monnier's message of "Thu, 08 May 2003 10:48:49 -0400") User-Agent: Gnus/5.1001 (Gnus v5.10.1) Emacs/21.3 (gnu/linux) Original-Lines: 39 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:13783 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:13783 "Stefan Monnier" writes: >> 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. > > It's up to you. If I were you I'd ask the user to re-exec > hl-line-mode for a new value of hl-line-sticky to take effect. > >>> 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)? > > Probably "instead". But here again it's up to you. > >> 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. > > I think the global mode should be implemented directly, using the > global part of post/pre-command-hook. But guess what.... it's up to > you ;-) Well, if it's up to me... I like the idea of one local mode that is governed by a hl-line-sticky-flag variable and one non-sticky global mode that is implemented directly. I guess nobody will want to use a sticky global mode. Is it OK if I boldly go ahead and commit such a change? Lute.