Subject: Re: bug#44579: Unintended behaviour with defcustom’s ‘choice’widgets and ":inline t" & Wrong documentation on "(elisp) Splicing into Lists"

From: Leo Vivier <[email-masked]>
Date: Tue, 17 Nov 2020 18:56:48 +0100

Hi there,

Mauro Aranda <[email-masked]> writes:

> * lisp/wid-edit.el (choice): New property, :inline-bubbles-p.  A
> predicate that returns non-nil if the choice widget can act as an
> inline widget.  Document it.
> (widget-choice-inline-bubbles-p): New function, for the
> :inline-bubbles-p property of the choice widget.
> (widget-inline-p): New function.  Use the :inline-bubbles-p property
> of the widget, if any.
> (widget-match-inline): Use the above to see if the widget can act like
> an inline widget.  Document it.
> (widget-choice-value-create): Account for the case of a choice widget
> that has inline members.
> (widget-checklist-add-item, widget-editable-list-value-create)
> (widget-group-value-create): Use widget-inline-p rather than just
> checking for a non-nil :inline property, allowing these functions to
> pass the complete information to widgets like the choice widget to
> create their values.
>
> * test/lisp/wid-edit-tests.el (widget-test-choice-match-no-inline)
> (widget-test-choice-match-all-inline)
> widget-test-choice-match-some-inline): New tests, to check that choice
> widgets can match its choices, inline or not.
> (widget-test-inline-p): New test, for the new function
> widget-inline-p.
> (widget-test-repeat-can-handle-choice)
> (widget-test-repeat-can-handle-inlinable-choice)
> (widget-test-list-can-handle-choice)
> (widget-test-list-can-handle-inlinable-choice)
> (widget-test-option-can-handle-choice)
> (widget-test-option-can-handle-inlinable-choice): New tests.  This
> grouping widgets need to be able to create a choice widget regardless
> if it has inline choices or not.

Thank you for your work and for the patch.

Best,

-- 
Leo Vivier
Freelance Software Engineer
Website: www.leovivier.com | Blog: www.zaeph.net