From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#45264: 26.3; `face-remap-set-base' seems to be bugged Date: Sat, 19 Dec 2020 12:20:04 +0200 Message-ID: <833602umgb.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29131"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 45264@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 19 11:21:21 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kqZMX-0007Ow-2d for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 19 Dec 2020 11:21:21 +0100 Original-Received: from localhost ([::1]:40128 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kqZMV-0000so-K7 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 19 Dec 2020 05:21:19 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46100) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kqZME-0000sh-Nh for bug-gnu-emacs@gnu.org; Sat, 19 Dec 2020 05:21:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57530) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kqZMD-0003xn-T3 for bug-gnu-emacs@gnu.org; Sat, 19 Dec 2020 05:21:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kqZMD-0001JC-OL for bug-gnu-emacs@gnu.org; Sat, 19 Dec 2020 05:21:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 19 Dec 2020 10:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45264 X-GNU-PR-Package: emacs Original-Received: via spool by 45264-submit@debbugs.gnu.org id=B45264.16083732294970 (code B ref 45264); Sat, 19 Dec 2020 10:21:01 +0000 Original-Received: (at 45264) by debbugs.gnu.org; 19 Dec 2020 10:20:29 +0000 Original-Received: from localhost ([127.0.0.1]:40843 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kqZLh-0001I6-7I for submit@debbugs.gnu.org; Sat, 19 Dec 2020 05:20:29 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:52916) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kqZLg-0001Ht-1u for 45264@debbugs.gnu.org; Sat, 19 Dec 2020 05:20:28 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:53908) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kqZLa-0003en-PW; Sat, 19 Dec 2020 05:20:22 -0500 Original-Received: from [176.228.60.248] (port=2905 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kqZLa-0003hL-1T; Sat, 19 Dec 2020 05:20:22 -0500 In-Reply-To: (message from Drew Adams on Tue, 15 Dec 2020 16:31:31 -0800 (PST)) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:196372 Archived-At: > Date: Tue, 15 Dec 2020 16:31:31 -0800 (PST) > From: Drew Adams > > (defface foo '((t (:background "red"))) "...") > > (face-remap-set-base 'font-lock-keyword-face 'foo) > > The &rest arg SPECS is `(foo)', which is, as required, a list of > (one) face. > > But the code actually expects `foo' itself to be a list. It raises > an error, because it sets SPECS to just `foo' and then tries to > take the car of it. > > (while (and (consp specs) > (not (null (car specs))) > (null (cdr specs))) > (setq specs (car specs))) ; <========= > > (if (or (null specs) > (and (eq (car specs) face) ; <========= > (null (cdr specs)))) > > Is there a doc bug (both manual and doc string)? Or is there a code > bug? Or am I missing something? I don't see anything wrong with the documentation yet. One needs to know and understand what is a "face spec", and then everything falls into its place. The &rest part is also a big hint. Can I turn the table and ask you why you thought the argument could be a list of one or more faces? The doc string says "should FORM a list of faces", it doesn't say it should BE a list of faces. And since when does &rest specify a single argument that is a list?