From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: change cursor type when idle Date: Thu, 14 Feb 2008 14:16:58 +0100 Message-ID: <87lk5nsmnp.fsf@kfs-lx.rd.rdm> References: <000d01c86c82$700dccc0$7051908d@us.oracle.com> <200802121430.m1CEUc6k013361@sallyv1.ics.uci.edu> <002601c86d8a$a0454db0$405a908d@us.oracle.com> <87tzkdnkee.fsf@kfs-lx.rd.rdm> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1202995048 32355 80.91.229.12 (14 Feb 2008 13:17:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 14 Feb 2008 13:17:28 +0000 (UTC) Cc: dann@ics.uci.edu, drew.adams@oracle.com, emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 14 14:17:50 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JPdyG-0006VD-36 for ged-emacs-devel@m.gmane.org; Thu, 14 Feb 2008 14:17:48 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JPdxl-0005Am-Sg for ged-emacs-devel@m.gmane.org; Thu, 14 Feb 2008 08:17:17 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JPdxi-0005Ah-3S for emacs-devel@gnu.org; Thu, 14 Feb 2008 08:17:14 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JPdxh-0005AV-A3 for emacs-devel@gnu.org; Thu, 14 Feb 2008 08:17:13 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JPdxh-0005AS-7B for emacs-devel@gnu.org; Thu, 14 Feb 2008 08:17:13 -0500 Original-Received: from mail-relay.sonofon.dk ([212.88.64.25]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1JPdxg-0007s8-TS for emacs-devel@gnu.org; Thu, 14 Feb 2008 08:17:13 -0500 Original-Received: (qmail 1195 invoked from network); 14 Feb 2008 13:17:00 -0000 Original-Received: from unknown (HELO kfs-lx.rd.rdm.cua.dk) (213.83.150.21) by 0 with SMTP; 14 Feb 2008 13:17:00 -0000 In-Reply-To: (Richard Stallman's message of "Wed\, 13 Feb 2008 17\:00\:31 -0500") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: FreeBSD 4.6-4.9 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:89072 Archived-At: Richard Stallman writes: > The reason it is tied into cua-mode in the first place is that I > needed to have separate cursor styles for rectangle marking and the > global-mark feature. > > As a historical explanation, that makes sense, but I don't see why > this is an argument against installing a general cursor-style control > feature. The real point is that we should verify that it serves CUA's > needs before installing it. I guess if the cursor package has a "cursor-style-setup-functions" special hook of some form (the cursor package would run the functions on this list and use the first non-nil cursor face returned instead of its own idea of which cursor to use). Then cua-mode could hook into that with its special cursor shapes and colors. But notice that if the cursor package is using a post-command hook, it will have problems if it is run before the cua-mode post-command hook. Of course, cua-mode could just run the rest of its own post-command hook as part of the call from the above list -- but suppose some other function on that list determines to use another cursor, the cua hook will not be called. So cua-mode will have to keep track of whether its hook on the cursor hook is run before or after its own post command hook - and behave accordingly. Better would be to run the cursor-style-setup-functions hook from C code (after post-command-hook) - and push appropriate functions on that hook from Lisp if the user wants indications for e.g. overwrite and read-only buffers. -- Kim F. Storm http://www.cua.dk