GNU bug report logs -
#60501
28.2; pr-interface: widget-default-create: Wrong type argument
Previous Next
Full log
Message #17 received at 60501 <at> debbugs.gnu.org (full text, mbox):
Robert Pluim <rpluim <at> gmail.com> writes:
>>>>>> On Wed, 4 Jan 2023 12:21:55 -0300, Mauro Aranda
> <maurooaranda <at> gmail.com> said:
>
> Mauro> I don't have a lot of time right now, but I took a look at
> Mauro> the code in
> Mauro> printing.el and I don't really understand why its using
:inline t
> Mauro> when creating the menu-choice widget, since the values
seem to be
> Mauro> strings or symbols. That is, nothing that needs to be
inlined.
>
> OK. I canʼt comment on that, but we should try to be defensive
>
> Mauro> I wasn't aware of this breakage, of course, but it looks
like I
> Mauro> should've made the code be more defensive (i.e., use
> Mauro> car-safe instead of
> Mauro> car).
>
> How about this (using car-safe would result in nil):
>
> diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el
> index 8250316bcc7..f4a49f58bed 100644
> --- a/lisp/wid-edit.el
> +++ b/lisp/wid-edit.el
> @@ -2231,7 +2231,9 @@ widget-choice-value-create
> (if (widget-get current :inline)
> (setq val value
> fun :match-inline)
> - (setq val (car value)
> + (setq val (if (consp value)
> + (car value)
> + value)
> fun :match))
> (setq val value
> fun :match))
Yes, that should do.
Thanks for taking care of this.
This bug report was last modified 2 years and 195 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.