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:18:44 +0200

> From: David Kastrup <address@hidden>
> Date: Thu, 05 Feb 2015 14:03:10 +0100
> 
> 
> (let ((cookie (face-remap-add-relative 'cursor :background "red")))
>    (recursive-edit)
>    (face-remap-remove-relative cookie))
> 
> does not appear to do anything.  Any idea why?

'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.



reply via email to

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