GNU bug report logs -
#57499
Documentation bug in the docstring of set-face-attribute?
Previous Next
Full log
View this message in rfc822 format
> Date: Thu, 01 Sep 2022 13:15:42 +0000
> From: Gregory Heytings <gregory <at> heytings.org>
> cc: 57499-done <at> debbugs.gnu.org
>
> >> Would a warning in *Messages* be okay then?
> >
> > We could try that, yes. But it has to be only in *Messages*, not an
> > actual warning, since faces get merged and realized as part of
> > redisplay, when signaling an error is a bad idea.
> >
>
> Like this? I just checked, it passes make bootstrap and make check.
Not exactly what I had in mind.
> +char warning_attribute_nil[] =
> + "Warning: using :%s nil with frame t has no effect.";
I thought you wanted to warn about using nil where nil is not a valid
value. The calls to the macro are all in the case where the actual
problem is that nil is not a valid value, so the warning text is not
what we want to convey (or so I thought).
> + if (redisplaying_p) \
> + CALLN (Fmessage, \
> + build_string (warning_attribute_nil), \
> + build_string (S)); \
There's no need to use Fmessage, just add_to_log should be enough.
> + else \
> + Fsignal (Quser_error, \
> + list1 (CALLN (Fformat, \
> + build_string (warning_attribute_nil), \
> + build_string (S)))); \
And I don't agree with signaling a user-error for these cases, when
they are outside redisplay. For starters, the face code could be
called during C-n or C-v or some other command that uses the display
code internally. Signaling an error is only TRT if we stop supporting
this back-compatibility shim.
This bug report was last modified 2 years and 289 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.