bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#45264: 26.3; `face-remap-set-base' seems to be bugged


From: Drew Adams
Subject: bug#45264: 26.3; `face-remap-set-base' seems to be bugged
Date: Sat, 19 Dec 2020 11:28:31 -0800 (PST)

> > The confusion is from the doc not saying explicitly
> > that each element of SPECS is a face spec, and NOT a
> > face.
> 
> SPECS has no "elements".  SPECS stands for arguments to the function
> beyond the 1st arg FACE.

As with any &rest, you supply zero or more actual
args that correspond to SPECS.  The function itself
receives a single list argument that corresponds to
SPECS.

In the function body, variable SPECS is a list.
And as the doc says, "Each list element...".

> Each such argument is either a face name or
> a list of attribute/value pairs.

AFAICT, the function doesn't work if such an arg
is a face name.  See what I said about that
previously, please.

> I changed the doc string to be more clear about that.

Great.  Thanks for taking a look.

Please check for the behavior bug I pointed to:
If the doc is correct then the behavior seems
bugged.  It's not true that you can pass face
names, AFAICT.

> > 2. "why you thought the argument could be a list of
> > one or more faces?"
> >
> > The doc string explicitly says that elements of
> > SPECS can be face names:
> >
> >   Each list element should be either a face name or...
> 
> That's after it says that you should consider SPECS as "forming" a
> list of elements.

"Forming" a list of elements is unclear, as I said.

And SPECS is, itself, from the point of view of the
function, a list of elements.  See above.  There is
_nothing_ special about this.  Every &rest parameter
behaves the same in this regard.

BTW, the exact same misleading and inexact text is
used for function `face-map-add-relative'.

For functions `buffer-face-(set|toggle)', however,
we instead say, as we usually do, "Each argument
in SPECS should be a face, i.e., either a face name
or a property list...".  And we explicitly speak of
SPECS as a list (singular): "if SPECS is omitted or
nil..."





reply via email to

[Prev in Thread] Current Thread [Next in Thread]