emacs-devel
[Top][All Lists]
Advanced

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

Re: Temporarily overriding cursor color?


From: Eli Zaretskii
Subject: Re: Temporarily overriding cursor color?
Date: Thu, 05 Feb 2015 18:58:54 +0200

> From: David Kastrup <address@hidden>
> Cc: address@hidden
> Date: Thu, 05 Feb 2015 17:36:08 +0100
> 
> > 'cursor' is not really a face used by the Emacs display.  It's more
> > like a handle to inject the 'cursor-color' parameter into a frame's
> > parameter alist.  And there's no code to do that when you remap the
> > 'cursor' face, so the above has no effect.
> >
> > By contrast, when you use (for example) set-face-background to change
> > the 'cursor' face, that function eventually calls
> > get_lface_attributes, which handles this face specially, see there.
> 
> But that happens per-frame rather than per-buffer.

I didn't mean that set-face-background can replace face remapping.  I
just explained how come set-face-background succeeds in changing the
cursor colors, while face remapping doesn't.

> The question is whether my expectations here were unreasonable or
> whether it would be unreasonably expensive to match them.

I wouldn't say "expensive", but the changes in code will be more than
just call a function in face-remap-add-relative or some such.  You
need to plug in face lookup into the code that draw the cursor.




reply via email to

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