all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Eli Zaretskii <eliz@gnu.org>, Drew Adams <drew.adams@oracle.com>
Cc: 27238@debbugs.gnu.org
Subject: bug#27238: 24.5; Rename `face-spec-set-2' and give it a better doc string
Date: Mon, 5 Jun 2017 12:36:54 -0700 (PDT)	[thread overview]
Message-ID: <da720a4e-331f-494d-9bbd-8405d963526f@default> (raw)
In-Reply-To: <<83a85m9sxe.fsf@gnu.org>>

> > (I still suggest fixing the doc string of `face-spec-set-2', as it is
> > misleading about its "SPEC" arg.)
> 
> I'm not sure I understand why it's misleading.  You said:
> 
> > Wrt the doc, the SPEC arg is apparently NOT a face spec, i.e., a spec
> > such as is returned by (get FACE 'face-defface-spec).  Instead, it seems
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > to be an attributes list such as what is returned by `face-spec-choose'
                                             ^^^^^^^^^^^
> > or `face-attr-construct'.
> 
> However, "face spec" is described in '(elisp)Defining Faces' as and
> alist whose elements each have the form
> 
>           (DISPLAY . PLIST)
> 
> and I believe the SPEC argument accepted by face-spec-choose has this
                                  ^^^^^^^^^^^
> form.

Yes.

> The argument received by face-spec-set-2 is just the PLIST
> which matches the frame's display, i.e. a simple list.

Yes.  It is not a face spec.  It is a face-attributes plist.

> So what would you want the doc string to say about this?

The SPEC arg accepted by `face-spec-choose', and by (all of?) the other
face functions whose signatures mention a SPEC arg, is of the same form.

But the "SPEC" accepted by `face-spec-set-2' is not of that form.

Instead, it is of the form that is _returned_ by `face-spec-choose' - it
is a plist of face attributes.  Such a plist is also what is accepted as
the ATTRS argument of `face-attr-match-p'.  It is more properly referred
to as ATTRS or ATTRIBUTES or some such.  It is not a face spec.

This is a face SPEC:

 ((((background dark)) (:background "DarkMagenta"))
  (t (:background "LightGreen" :foreground "Red")))

This is a face-attributes list:

 (:background "LightGreen" :foreground "Red")

I've said the same thing several times now.  HTH.





       reply	other threads:[~2017-06-05 19:36 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <<<<<<<06a7cc83-a2a8-45a0-97d4-bd3a478aab92@default>
     [not found] ` <<<<<<<83wp8ra9g6.fsf@gnu.org>
     [not found]   ` <<<<<<26a213b3-908e-43b1-a009-b8a18f0a1c23@default>
     [not found]     ` <<<<<<83tw3v9njh.fsf@gnu.org>
     [not found]       ` <<<<<c2f33d90-673d-4f13-894f-a26a52cf1a0d@default>
     [not found]         ` <<<<<83lgp6a257.fsf@gnu.org>
     [not found]           ` <<<<139eede5-534a-47ad-805a-bad9995526eb@default>
     [not found]             ` <<<<83d1ai9yy1.fsf@gnu.org>
     [not found]               ` <<<2ceee035-593d-4831-be30-06443ba3bc92@default>
     [not found]                 ` <<<83bmq29x63.fsf@gnu.org>
     [not found]                   ` <<a67cb3cf-a77f-4161-babd-eb475e16da95@default>
     [not found]                     ` <<83a85m9sxe.fsf@gnu.org>
2017-06-05 19:36                       ` Drew Adams [this message]
2017-06-10  8:41                         ` bug#27238: 24.5; Rename `face-spec-set-2' and give it a better doc string Eli Zaretskii
     [not found] <<<<<<06a7cc83-a2a8-45a0-97d4-bd3a478aab92@default>
     [not found] ` <<<<<<83wp8ra9g6.fsf@gnu.org>
     [not found]   ` <<<<<26a213b3-908e-43b1-a009-b8a18f0a1c23@default>
     [not found]     ` <<<<<83tw3v9njh.fsf@gnu.org>
     [not found]       ` <<<<c2f33d90-673d-4f13-894f-a26a52cf1a0d@default>
     [not found]         ` <<<<83lgp6a257.fsf@gnu.org>
     [not found]           ` <<<139eede5-534a-47ad-805a-bad9995526eb@default>
     [not found]             ` <<<83d1ai9yy1.fsf@gnu.org>
     [not found]               ` <<2ceee035-593d-4831-be30-06443ba3bc92@default>
     [not found]                 ` <<83bmq29x63.fsf@gnu.org>
2017-06-05 17:56                   ` Drew Adams
2017-06-05 18:43                     ` Eli Zaretskii
     [not found] <<<<<06a7cc83-a2a8-45a0-97d4-bd3a478aab92@default>
     [not found] ` <<<<<83wp8ra9g6.fsf@gnu.org>
     [not found]   ` <<<<26a213b3-908e-43b1-a009-b8a18f0a1c23@default>
     [not found]     ` <<<<83tw3v9njh.fsf@gnu.org>
     [not found]       ` <<<c2f33d90-673d-4f13-894f-a26a52cf1a0d@default>
     [not found]         ` <<<83lgp6a257.fsf@gnu.org>
     [not found]           ` <<139eede5-534a-47ad-805a-bad9995526eb@default>
     [not found]             ` <<83d1ai9yy1.fsf@gnu.org>
2017-06-05 16:40               ` Drew Adams
2017-06-05 17:11                 ` Eli Zaretskii
     [not found] <<<<06a7cc83-a2a8-45a0-97d4-bd3a478aab92@default>
     [not found] ` <<<<83wp8ra9g6.fsf@gnu.org>
     [not found]   ` <<<26a213b3-908e-43b1-a009-b8a18f0a1c23@default>
     [not found]     ` <<<83tw3v9njh.fsf@gnu.org>
     [not found]       ` <<c2f33d90-673d-4f13-894f-a26a52cf1a0d@default>
     [not found]         ` <<83lgp6a257.fsf@gnu.org>
2017-06-05 15:55           ` Drew Adams
2017-06-05 16:33             ` Eli Zaretskii
     [not found] <<<06a7cc83-a2a8-45a0-97d4-bd3a478aab92@default>
     [not found] ` <<<83wp8ra9g6.fsf@gnu.org>
     [not found]   ` <<26a213b3-908e-43b1-a009-b8a18f0a1c23@default>
     [not found]     ` <<83tw3v9njh.fsf@gnu.org>
2017-06-05  5:44       ` Drew Adams
2017-06-05 15:24         ` Eli Zaretskii
     [not found] <<06a7cc83-a2a8-45a0-97d4-bd3a478aab92@default>
     [not found] ` <<83wp8ra9g6.fsf@gnu.org>
2017-06-04 19:38   ` Drew Adams
2017-06-05  2:27     ` Eli Zaretskii
2017-06-04 17:42 Drew Adams
2017-06-04 18:34 ` 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

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

  git send-email \
    --in-reply-to=da720a4e-331f-494d-9bbd-8405d963526f@default \
    --to=drew.adams@oracle.com \
    --cc=27238@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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.