From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Leo Vivier Newsgroups: gmane.emacs.bugs Subject: bug#44579: Unintended behaviour with =?UTF-8?Q?defcustom=E2=80=99s_?= =?UTF-8?Q?=E2=80=98choice=E2=80=99?= widgets and ":inline t" & Wrong documentation on "(elisp) Splicing into Lists" Date: Tue, 17 Nov 2020 18:56:48 +0100 Message-ID: <874kln27fj.fsf@hidden> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21997"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 44579@debbugs.gnu.org To: Mauro Aranda Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 17 18:58:11 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kf5F5-0005cD-3r for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 17 Nov 2020 18:58:11 +0100 Original-Received: from localhost ([::1]:46866 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kf5F4-00062W-2s for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 17 Nov 2020 12:58:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39726) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kf5Ew-000620-I0 for bug-gnu-emacs@gnu.org; Tue, 17 Nov 2020 12:58:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49546) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kf5Ew-0005yD-8K for bug-gnu-emacs@gnu.org; Tue, 17 Nov 2020 12:58:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kf5Ew-0001g1-7g for bug-gnu-emacs@gnu.org; Tue, 17 Nov 2020 12:58:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Leo Vivier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 17 Nov 2020 17:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44579 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 44579-submit@debbugs.gnu.org id=B44579.16056358366386 (code B ref 44579); Tue, 17 Nov 2020 17:58:02 +0000 Original-Received: (at 44579) by debbugs.gnu.org; 17 Nov 2020 17:57:16 +0000 Original-Received: from localhost ([127.0.0.1]:32859 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kf5EB-0001ew-Sx for submit@debbugs.gnu.org; Tue, 17 Nov 2020 12:57:16 -0500 Original-Received: from aibo.runbox.com ([91.220.196.211]:42038) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kf5E9-0001en-11 for 44579@debbugs.gnu.org; Tue, 17 Nov 2020 12:57:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zaeph.net; s=selector2; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From; bh=AogF+eOURI3r8hVEs2my8+XromLJJ4v2i7jPB9mvLYs=; b=3BOyUALtwbpmym+MeTOj1iHF8/ GLJ0EsZJw+y/9LNRpyzfocNTCPn5SENo/TYFgFwdABJJmr2PoVndFepaOhopZmhsk5u5lDPDQEoZr qv/kwB/FDmSur32SwLurbU0R5yFmR+qUAwISZHATCiOFCkQZMDUGYor1xf2KD7yZlBM90fD9FZYMN vvpQT9QCu2iqs2u9sysBj4/rHCDShoSzSfjwvDW4boOEijPtFeXZEpNU0u5ycWWRfQQl+pQ3auEH5 UZPtK72OMF3TB3hCcZ5lnEejbWK2hObpcygOp/eDtYZ2l7PpMHFu1pWWC1nT6Uh/oMPePTD+116zC /CUbUG0A==; Original-Received: from [10.9.9.73] (helo=submission02.runbox) by mailtransmit02.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1kf5E7-0007FA-4W; Tue, 17 Nov 2020 18:57:11 +0100 Original-Received: by submission02.runbox with esmtpsa [Authenticated alias (984850)] (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) id 1kf5Dl-0004lP-NC; Tue, 17 Nov 2020 18:56:49 +0100 In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:193565 Archived-At: Hi there, Mauro Aranda 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