From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs 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) Message-ID: References: <<<<<<<06a7cc83-a2a8-45a0-97d4-bd3a478aab92@default>>>>>>> <<<<<<<83wp8ra9g6.fsf@gnu.org>>>>>>> <<<<<<26a213b3-908e-43b1-a009-b8a18f0a1c23@default>>>>>> <<<<<<83tw3v9njh.fsf@gnu.org>>>>>> <<<<>>>> <<<<<83lgp6a257.fsf@gnu.org>>>>> <<<<139eede5-534a-47ad-805a-bad9995526eb@default>>>> <<<<83d1ai9yy1.fsf@gnu.org>>>> <<<2ceee035-593d-4831-be30-06443ba3bc92@default>>> <<<83bmq29x63.fsf@gnu.org>>> <> <<83a85m9sxe.fsf@gnu.org>> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1496691496 22441 195.159.176.226 (5 Jun 2017 19:38:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 5 Jun 2017 19:38:16 +0000 (UTC) Cc: 27238@debbugs.gnu.org To: Eli Zaretskii , Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jun 05 21:38:10 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHxpI-0005QB-7x for geb-bug-gnu-emacs@m.gmane.org; Mon, 05 Jun 2017 21:38:08 +0200 Original-Received: from localhost ([::1]:34875 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dHxpL-0005Uy-UN for geb-bug-gnu-emacs@m.gmane.org; Mon, 05 Jun 2017 15:38:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43748) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dHxpG-0005Ut-FU for bug-gnu-emacs@gnu.org; Mon, 05 Jun 2017 15:38:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dHxpC-0000zC-CG for bug-gnu-emacs@gnu.org; Mon, 05 Jun 2017 15:38:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:55393) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dHxpC-0000yy-8R for bug-gnu-emacs@gnu.org; Mon, 05 Jun 2017 15:38:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dHxpC-0007tC-1l for bug-gnu-emacs@gnu.org; Mon, 05 Jun 2017 15:38:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 05 Jun 2017 19:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27238 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 27238-submit@debbugs.gnu.org id=B27238.149669142730261 (code B ref 27238); Mon, 05 Jun 2017 19:38:02 +0000 Original-Received: (at 27238) by debbugs.gnu.org; 5 Jun 2017 19:37:07 +0000 Original-Received: from localhost ([127.0.0.1]:58070 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHxoH-0007s0-6O for submit@debbugs.gnu.org; Mon, 05 Jun 2017 15:37:06 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:17141) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHxoF-0007rT-IP for 27238@debbugs.gnu.org; Mon, 05 Jun 2017 15:37:04 -0400 Original-Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v55JauUX002763 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 5 Jun 2017 19:36:56 GMT Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v55Jaue7011750 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 5 Jun 2017 19:36:56 GMT Original-Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id v55Jatd7015384; Mon, 5 Jun 2017 19:36:56 GMT In-Reply-To: <<83a85m9sxe.fsf@gnu.org>> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 12.0.6767.5000 (x86)] X-Source-IP: userv0022.oracle.com [156.151.31.74] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:133315 Archived-At: > > (I still suggest fixing the doc string of `face-spec-set-2', as it is > > misleading about its "SPEC" arg.) >=20 > I'm not sure I understand why it's misleading. You said: >=20 > > 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 seem= s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > to be an attributes list such as what is returned by `face-spec-choose' ^^^^^^^^^^^ > > or `face-attr-construct'. >=20 > However, "face spec" is described in '(elisp)Defining Faces' as and > alist whose elements each have the form >=20 > (DISPLAY . PLIST) >=20 > 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.