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

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

bug#60501: 28.2; pr-interface: widget-default-create: Wrong type argumen


From: Mauro Aranda
Subject: bug#60501: 28.2; pr-interface: widget-default-create: Wrong type argument
Date: Wed, 4 Jan 2023 13:07:21 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2

Robert Pluim <rpluim@gmail.com> writes:

>>>>>> On Wed, 4 Jan 2023 12:21:55 -0300, Mauro Aranda
> <maurooaranda@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.







reply via email to

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