From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Stefan Monnier" Newsgroups: gmane.emacs.devel Subject: Re: Suggestion for hl-line.el Date: Thu, 08 May 2003 10:48:49 -0400 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200305081448.h48EmnZd019230@rum.cs.yale.edu> 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 1052405493 19164 80.91.224.249 (8 May 2003 14:51:33 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 8 May 2003 14:51:33 +0000 (UTC) Cc: Stefan Monnier Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Thu May 08 16:51:28 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 19Dmhu-0004nD-00 for ; Thu, 08 May 2003 16:49:14 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19DmmP-0001x2-00 for ; Thu, 08 May 2003 16:53:53 +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 19Dmhx-0002Ff-03 for emacs-devel@quimby.gnus.org; Thu, 08 May 2003 10:49:17 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 19Dmhf-0002Ds-00 for emacs-devel@gnu.org; Thu, 08 May 2003 10:48:59 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 19Dmha-00027P-00 for emacs-devel@gnu.org; Thu, 08 May 2003 10:48:56 -0400 Original-Received: from rum.cs.yale.edu ([128.36.229.169]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19DmhZ-00027C-00 for emacs-devel@gnu.org; Thu, 08 May 2003 10:48:54 -0400 Original-Received: from rum.cs.yale.edu (localhost [127.0.0.1]) by rum.cs.yale.edu (8.12.8/8.12.8) with ESMTP id h48Emox6019232; Thu, 8 May 2003 10:48:50 -0400 Original-Received: (from monnier@localhost) by rum.cs.yale.edu (8.12.8/8.12.8/Submit) id h48EmnZd019230; Thu, 8 May 2003 10:48:49 -0400 X-Mailer: exmh version 2.4 06/23/2000 with nmh-1.0.4 Original-To: Lute Kamstra Original-cc: emacs-devel@gnu.org 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:13763 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:13763 > 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 ;-) Stefan