GNU bug report logs - #54115
27.2; `face-remap-set-base' bug with only two args

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Tue, 22 Feb 2022 17:48:01 UTC

Severity: normal

Found in version 27.2

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 54115 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: "54115 <at> debbugs.gnu.org" <54115 <at> debbugs.gnu.org>
Subject: RE: [External] : Re: bug#54115: 27.2; `face-remap-set-base' bug with
 only two args
Date: Tue, 22 Feb 2022 18:45:11 +0000
> > (I see the same problem (same code) in an Emacs 28 pretest snapshot.)
> >
> > emacs -Q
> >
> > Eval the source-code defun of `face-remap-set-base'.
> >
> > M-x debug-on-entry face-remap-set-base
> >
> > Evaluate (face-remap-set-base 'variable-pitch 'default).
> >
> > Debugger entered--Lisp error: (wrong-type-argument listp default)
> > * car(default)
> > * (eq (car specs) face)
> > * (and (eq (car specs) face) (null (cdr specs)))
> 
> How is this different from bug#46973?

1. I'd forgotten about that bug filing.  Thx.
2. That's a doc bug.  This is a behavior bug.

So far, there's been no improvement of the doc
or correction of the behavior.

Feel free to merge the two bugs, if you like.

And please let us know how to pass a single
face for SPECS.  Clearly passing a list with
only one face doesn't work.

Labeling this "wishlist" doesn't help anyone
trying to use `face-remap-set-base' to set
the base remapping of FACE to another (single)
face.
___

The doc says this:

"If SPECS is empty or a single face 'eq' to FACE, call 'face-remap-reset-base'
to use the normal definition of FACE as the base remapping"

But SPECS is specifies with &rest, which means
that it's necessarily a _list_ (empty or not).
There's no way that SPECS can be a single face.
SPECS can be a list that contains only a single
face, but it can't be a face.

The doc string apparently gets mixed up from
the fact that the code in some cases resets
SPEC to the single face it contains.  But as
an argument SPECS is always a list.




This bug report was last modified 3 years and 139 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.