From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dave Abrahams Newsgroups: gmane.emacs.devel Subject: Re: Ideas for hl-line-mode Date: Fri, 30 Sep 2011 10:17:25 -0400 Message-ID: References: <838vp6ecsk.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1317413695 24959 80.91.229.12 (30 Sep 2011 20:14:55 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 30 Sep 2011 20:14:55 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 30 22:14:51 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1R9jTt-0007dA-R1 for ged-emacs-devel@m.gmane.org; Fri, 30 Sep 2011 22:14:49 +0200 Original-Received: from localhost ([::1]:34255 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R9jTq-00039J-5n for ged-emacs-devel@m.gmane.org; Fri, 30 Sep 2011 16:14:46 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:48572) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R9duJ-0001Rw-Ra for emacs-devel@gnu.org; Fri, 30 Sep 2011 10:17:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R9duI-0004fi-Mp for emacs-devel@gnu.org; Fri, 30 Sep 2011 10:17:43 -0400 Original-Received: from mail-vw0-f41.google.com ([209.85.212.41]:62176) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R9duF-0004dz-Cs; Fri, 30 Sep 2011 10:17:39 -0400 Original-Received: by vws16 with SMTP id 16so1680806vws.0 for ; Fri, 30 Sep 2011 07:17:35 -0700 (PDT) Original-Received: by 10.52.92.77 with SMTP id ck13mr10988880vdb.73.1317392255386; Fri, 30 Sep 2011 07:17:35 -0700 (PDT) Original-Received: from pluto.local (207-172-223-249.c3-0.smr-ubr3.sbo-smr.ma.static.cable.rcn.com. [207.172.223.249]) by mx.google.com with ESMTPS id ha1sm4886293vdb.17.2011.09.30.07.17.26 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 30 Sep 2011 07:17:28 -0700 (PDT) Original-Received: by pluto.local (Postfix, from userid 501) id 5A3E91023C5D; Fri, 30 Sep 2011 10:17:25 -0400 (EDT) In-Reply-To: <838vp6ecsk.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 30 Sep 2011 09:59:07 +0300") User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/23.3 (darwin) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.212.41 X-Mailman-Approved-At: Fri, 30 Sep 2011 16:14:44 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:144501 Archived-At: on Fri Sep 30 2011, Eli Zaretskii wrote: >> From: Dave Abrahams > >> Date: Thu, 29 Sep 2011 22:40:21 -0400 >> >> I just realized that there are a whole bunch of modes where the >> horizontal position of the cursor just doesn't matter, and that these >> correspond almost exactly to where I want hl-line-mode active. In these >> modes would also want to make the cursor very close to the color of the >> highlight. It would be nice if emacs had a way for modes to represent >> that they're "vertical-position-only modes" so that this sort of thing >> could be set up programmatically. > > Does > > (eq (get major-mode 'mode-class) 'special) > > do what you want? Cool, I was hoping someone would point out an existing facility I didn't know about... Oh, interesting. It's probably a very good heuristic, though I'm not sure the description of this mode-class as "only for specially-prepared text" really implies that horizontal position is irrelevant. I'll try using it and see how it goes. -- Dave Abrahams BoostPro Computing http://www.boostpro.com