unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: "51465@debbugs.gnu.org" <51465@debbugs.gnu.org>
Subject: bug#51465: [External] : Re: bug#51465: 27.2; `face-all-attributes' doc or behavior (?)
Date: Thu, 28 Oct 2021 23:08:42 +0000	[thread overview]
Message-ID: <SJ0PR10MB54887ADBDB8FB1015D903419F3869@SJ0PR10MB5488.namprd10.prod.outlook.com> (raw)
In-Reply-To: <83h7d1rlk6.fsf@gnu.org>

> > (elisp) `Attribute Functions' says "the default attributes of FACE
> > for newly created frames".  I would expect to see :background as
> > "LightGoldenrod", not as `unspecified'.
> 
> Why? because that's what you actually see in a new frame?  Those
> aren't the default attributes, those are the attributes specified by
> defface.

The Elisp manual says it returns "the default attributes
of FACE for newly created frames."

Whenever I create a new frame (from emacs -Q) that face
on that frame has a :background of "LightGoldenrod" -
never `unspecified'.  Is the manual wrong?  Or are the
manual and the doc string trying to say the same thing
but ending up suggesting different things?

To me, the manual's text suggests I'd expect to see
"LightGoldenrod", with emacs -Q, based on a GUI Emacs.
The defface for `region' and a light background with at
least 88 colors specifies "lightgoldenrod2".

> > Why would one want to get a list of the face's attributes
> > with every attribute value as `unspecified'?
> 
> I don't know.  I guess those defaults are not very interesting,
> indeed.

Unless otherwise specified (which could be by
`default-frame-alist' or whatever) a newly created
frame has, according to the manual, the attributes
for that face that are given by `face-all-attributes'
when that function is passed a nil FRAME arg: "the
default attributes of FACE for newly created frames."

IOW, it calls this "the default attributes" for
"newly created frames", not the attributes for some
existing frame (this is the FRAME=nil case).

And yet, with emacs -Q, every newly created frame
has :background set to "LightGoldenrod" (AFAICT).
At the very least, most, if not all, newly created
frames have that attribute value.  None have that
attribute with a value of `unspecified'.

The function returns `unspecified' as the default
for newly created frames (for this FACE's background).
But it seems that the actual default for newly
created frames is "LightGoldenrod".  Perhaps there
are multiple, unexplained meanings of "default"
involved here?

I'd think that "default" would just mean what you
get for a newly created frame unless there is
something that overrides that somehow.  I'd think
that "default" is what the current customized value
of the face has - that's what you get by default for
a newly created frame (or if it's not customized
then the value given by the original defface).

I'm hoping you at least see a possibility for
confusion in the doc.  And maybe even a problematic
behavior (what's the point of returning `unspecified'
everywhere?).
____

You didn't address my question about the seeming
impedance mismatch between what `set-face-attribute'
accepts as a list of attributes and what
`face-all-attributes' returns as a list of attributes.
So I submitted a separate bug report for that: #51469.





  reply	other threads:[~2021-10-28 23:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-28 19:08 bug#51465: 27.2; `face-all-attributes' doc or behavior (?) Drew Adams
2021-10-28 19:33 ` Eli Zaretskii
2021-10-28 23:08   ` Drew Adams [this message]
2021-10-29  7:24     ` bug#51465: [External] : " Eli Zaretskii
2021-10-29 16:11       ` Drew Adams
2021-10-29 16:19         ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=SJ0PR10MB54887ADBDB8FB1015D903419F3869@SJ0PR10MB5488.namprd10.prod.outlook.com \
    --to=drew.adams@oracle.com \
    --cc=51465@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).