GNU bug report logs -
#57499
Documentation bug in the docstring of set-face-attribute?
Previous Next
Full log
Message #79 received at 57499-done <at> debbugs.gnu.org (full text, mbox):
> Date: Thu, 01 Sep 2022 17:07:13 +0000
> From: Gregory Heytings <gregory <at> heytings.org>
> cc: 57499-done <at> debbugs.gnu.org
>
> +---
> +** The value nil is now deprecated for some face attributes.
> +The face attributes :background, :foreground and :distant-foreground
> +could be given a value nil for backward-compatibility with Emacs 20.
> +This is now deprecated, the 'unspecified value should be used instead.
It isn't deprecated, it's invalid. There's no need to have anything
like this in NEWS, because all our documentation says the color
attributes can have only string values (in addition to 'unspecified').
> +#define HANDLE_INVALID_OR_DEPRECATED_NIL_VALUE(A) \
> + if (NILP (value)) \
> + { \
> + if (EQ (frame, Qt)) \
> + add_to_log ("Warning: invalid value nil for attribute `%s' " \
> + "with frame t or nil: use 'unspecified instead of " \
> + "nil", A); \
> + else \
> + add_to_log ("Warning: using value nil for attribute `%s' is " \
> + "deprecated: use 'unspecified instead of nil", A); \
> + /* Compatibility with 20.x. */ \
> + value = Qunspecified; \
No need to differentiate between FRAME = t and the other cases.
And the message text should just say
Warning: nil value for `%s' is invalid, use 'unspecified instead.
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.