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

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

bug#31309: 26.1; Customize widget :type 'text reports "bad format"


From: Lars Ingebrigtsen
Subject: bug#31309: 26.1; Customize widget :type 'text reports "bad format"
Date: Sat, 13 Jul 2019 17:24:14 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Phil Sainty <psainty@orcon.net.nz> writes:

> If I redefine `text' as follows (by copying the :format from `string')
> then the widget seems to work correctly.
>
> (define-widget 'text 'editable-field
>   "A multiline text area."
>   :format "%{%t%}: %v"
>   :keymap widget-text-keymap)

I've now done this change on the Emacs trunk.

> I'm not familiar with the internals of widgets, so I don't know if
> this is the best fix, but I see that all the other `define-widget'
> derivatives of `editable-field' do have explicit :format strings.
>
> However I would have thought that in the absence of an explicit
> :format, a *valid* default would be used, so I think the main bug
> is in `editable-field' itself, which does not follow its own rule
> when defining its own :format, which is simply "%v" (testing confirms
> that this value is used by default for derivative widgets which do
> not override :format).

Yes, the widget code is a bit convoluted...  I think what you're saying
makes sense, but I'm not sure of the ramifications, so I think the
minimal fix is perhaps best here.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

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