emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: change cursor type when idle


From: Kim F. Storm
Subject: Re: change cursor type when idle
Date: Thu, 14 Feb 2008 14:16:58 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

Richard Stallman <address@hidden> 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 <address@hidden> http://www.cua.dk





reply via email to

[Prev in Thread] Current Thread [Next in Thread]