GNU bug report logs - #33713
26.1; Error on list-colors-display

Previous Next

Package: emacs;

Reported by: Vincent Zhang <vincent_chueng <at> hotmail.com>

Date: Wed, 12 Dec 2018 06:12:02 UTC

Severity: normal

Merged with 33833

Found in version 26.1

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

Full log


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

From: Stefan Kangas <stefan <at> marxist.se>
To: martin rudalics <rudalics <at> gmx.at>
Cc: Vincent Zhang <vincent_chueng <at> hotmail.com>, 33713 <at> debbugs.gnu.org
Subject: Re: bug#33713: 26.1; Error on list-colors-display
Date: Fri, 21 Aug 2020 00:36:15 -0700
martin rudalics <rudalics <at> gmx.at> writes:

>> I got this error while using `list-colors-display` with `emcees -Q`.
>
> What is 'emcees'?
>
>> Debugger entered--Lisp error: (wrong-number-of-arguments #<subr max> 0)
>>    max()
>>    apply(max nil)
>>    list-colors-print((("LightGreen") ("DarkRed") ("DarkMagenta") ("DarkCyan")
[...]
> Can you please try the attached patch?

So the code seems to have changed and I see no call to 'max in
facemenu.el.  So this error can't happen anymore, at least.

But this bug was merged with another bug, so I will wait with closing
this until we get a response there before I close this bug.

If there is any information missing or incorrect in the reasoning above,
or if you're still seeing this issue on Emacs 27.1, please reply back
and we can reconsider.

Thanks.

> diff --git a/lisp/facemenu.el b/lisp/facemenu.el
> index 7c10d60..6a941ab 100644
> --- a/lisp/facemenu.el
> +++ b/lisp/facemenu.el
> @@ -622,8 +622,9 @@ list-colors-print
>  	(setq color (list color)))
>        (let* ((opoint (point))
>  	     (color-values (color-values (car color)))
> -	     (light-p (>= (apply 'max color-values)
> -			  (* (car (color-values "white")) .5))))
> +	     (light-p (and color-values
> +                           (>= (apply 'max color-values)
> +			       (* (car (color-values "white")) .5)))))
>  	(insert (car color))
>  	(indent-to 22)
>  	(put-text-property opoint (point) 'face `(:background ,(car color)))

Best regards,
Stefan Kangas




This bug report was last modified 4 years and 229 days ago.

Previous Next


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