From: Robert Pluim <rpluim@gmail.com>
To: Mauro Aranda <maurooaranda@gmail.com>
Cc: Fernando de Morais <fernandodemorais.jf@gmail.com>,
60501@debbugs.gnu.org
Subject: bug#60501: 28.2; pr-interface: widget-default-create: Wrong type argument
Date: Wed, 04 Jan 2023 17:00:30 +0100 [thread overview]
Message-ID: <87r0wai929.fsf@gmail.com> (raw)
In-Reply-To: <dc1592e8-4562-38d9-db2b-9bdd6bec77a7@gmail.com> (Mauro Aranda's message of "Wed, 4 Jan 2023 12:21:55 -0300")
>>>>> 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 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 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))
Robert
--
next prev parent reply other threads:[~2023-01-04 16:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-02 20:08 bug#60501: 28.2; pr-interface: widget-default-create: Wrong type argument Fernando de Morais
2023-01-04 10:47 ` Robert Pluim
2023-01-04 15:21 ` Mauro Aranda
2023-01-04 16:00 ` Robert Pluim [this message]
2023-01-04 16:07 ` Mauro Aranda
2023-01-04 16:12 ` Robert Pluim
2023-01-04 17:10 ` Eli Zaretskii
2023-01-06 9:08 ` Robert Pluim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r0wai929.fsf@gmail.com \
--to=rpluim@gmail.com \
--cc=60501@debbugs.gnu.org \
--cc=fernandodemorais.jf@gmail.com \
--cc=maurooaranda@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.