unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* cursor face
@ 2007-06-01 21:37 Drew Adams
  2007-06-02  7:16 ` Eli Zaretskii
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Drew Adams @ 2007-06-01 21:37 UTC (permalink / raw)
  To: Emacs-Devel

I don't see any index entry for the `cursor' face in the Elisp manual.

I haven't yet found any mention of the `cursor' face in the manual by
searching and browsing, either, but perhaps it is there. I did find a
statement in node Color Parameters that frame parameter `cursor-color' is
equivalent to the :background attribute of the `cursor' face. (It would be
good to state that also at the place where the `cursor' face is described,
if it ever is.)

Question:

The `cursor' face is equivalent to the value of frame parameter
`cursor-color' - but for which frame? Or is face `cursor' somehow a
frame-local face? Frame parameters are frame-local variables, but I didn't
think that there was such a thing as a frame-local face. Is there?

I have the frame parameter `cursor-color' set to "Yellow" for
special-display frames, but "Red" for the default-frame-alist. If there is
no such thing as a frame-local face, then I would expect that the
:background of face `cursor' would correspond to the `cursor-color'
parameter for the default-frame-alist.

However, if I do `M-x customize-face cursor', no matter which frame or
buffer I am in when I do it, I get a customize buffer that shows me the
`cursor' face with background "Yellow" (not "Red").

When I show, in buffer Customize, the Lisp expression that defines face
`cursor', I see this: ((t (:background "Yellow"))). Why is the value for
`special-display-frame-alist' ("Yellow") what is used, not that for
`default-frame-alist'?

If I customize the value of the face background, changing from "Yellow" to
"Green", and click set for session but not save for future, I see no change
in any existing frame or in any frame created thereafter. Is that right?

Is there a bug here somewhere? Several bugs? What am I missing?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: cursor face
  2007-06-01 21:37 cursor face Drew Adams
@ 2007-06-02  7:16 ` Eli Zaretskii
  2007-06-02 13:52   ` Drew Adams
  2007-06-02 13:54 ` Richard Stallman
  2007-06-02 13:54 ` Richard Stallman
  2 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2007-06-02  7:16 UTC (permalink / raw)
  To: Drew Adams; +Cc: emacs-devel

> From: "Drew Adams" <drew.adams@oracle.com>
> Date: Fri, 1 Jun 2007 14:37:51 -0700
> 
> I don't see any index entry for the `cursor' face in the Elisp manual.

Do you see other standard faces documented in the ELisp manual?  If
so, where?

I only find the standard faces documented in the Emacs user manual
(see the node "Standard Faces" there), and the list there includes
`cursor'.

> The `cursor' face is equivalent to the value of frame parameter
> `cursor-color' - but for which frame? Or is face `cursor' somehow a
> frame-local face? Frame parameters are frame-local variables, but I didn't
> think that there was such a thing as a frame-local face. Is there?

Actually, faces are _always_ frame-local.  (It looks like this is not
stated specifically anywhere, which would be an omission.)  Changing a
face normally changes it only on the frame which was the selected
frame at the time of the change; you need to work harder to have a
face changed on all frames, which is a hint to the fact that faces
local to frames.  For example:

    (set-face-attribute face frame &rest args)

    Set attributes of face on frame from args.

    frame nil means change attributes on all frames.  frame t means change
    the default for new frames (this is done automatically each time an
    attribute is changed on all frames).

The above pertains to the functions that change faces; I don't know
what does Customize do with faces, but I'd expect it to change the
face for the currently selected frame and for newly created frames.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: cursor face
  2007-06-02  7:16 ` Eli Zaretskii
@ 2007-06-02 13:52   ` Drew Adams
  0 siblings, 0 replies; 5+ messages in thread
From: Drew Adams @ 2007-06-02 13:52 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

> > Or is face `cursor' somehow a frame-local face?
>
> Actually, faces are _always_ frame-local.

Yes, of course. What was I thinking? I knew that well. Lack of coffee,
perhaps.

I think what threw me off was that, though the frame I was in had a red
cursor, when I typed M-x customize-face cursor, it showed up yellow in
Customize.

I think there is a bug, in that Customize shows the wrong face attributes.
See my previous mail for the details: default-frame-alist had red, and
special-display-frame-alist had yellow. Although I was in a normal (default)
frame when I used M-x customize-face cursor, Customize was shown with
yellow.

Note: Customize itself appears in a special frame. Perhaps that's the origin
of the bug - perhaps it uses its own frame instead of the frame selected
when you invoke customize-face.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: cursor face
  2007-06-01 21:37 cursor face Drew Adams
  2007-06-02  7:16 ` Eli Zaretskii
@ 2007-06-02 13:54 ` Richard Stallman
  2007-06-02 13:54 ` Richard Stallman
  2 siblings, 0 replies; 5+ messages in thread
From: Richard Stallman @ 2007-06-02 13:54 UTC (permalink / raw)
  To: Drew Adams; +Cc: emacs-devel

    I don't see any index entry for the `cursor' face in the Elisp manual.

The standard faces are documented in the Emacs manual.
I will add an xref.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: cursor face
  2007-06-01 21:37 cursor face Drew Adams
  2007-06-02  7:16 ` Eli Zaretskii
  2007-06-02 13:54 ` Richard Stallman
@ 2007-06-02 13:54 ` Richard Stallman
  2 siblings, 0 replies; 5+ messages in thread
From: Richard Stallman @ 2007-06-02 13:54 UTC (permalink / raw)
  To: Drew Adams; +Cc: emacs-devel

    The `cursor' face is equivalent to the value of frame parameter
    `cursor-color' - but for which frame? Or is face `cursor' somehow a
    frame-local face?

ALL faces can have frame-specific definitions.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-06-02 13:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-01 21:37 cursor face Drew Adams
2007-06-02  7:16 ` Eli Zaretskii
2007-06-02 13:52   ` Drew Adams
2007-06-02 13:54 ` Richard Stallman
2007-06-02 13:54 ` Richard Stallman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).