Fix checkbox's child creation
authorMauro Aranda <maurooaranda@gmail.com>
Wed, 1 Jan 2025 11:22:45 +0000 (08:22 -0300)
committerEli Zaretskii <eliz@gnu.org>
Sat, 11 Jan 2025 11:54:15 +0000 (13:54 +0200)
* lisp/wid-edit.el (widget-checklist-add-item): Swap function
calls so that child is actually a widget.  (Bug#72156)

lisp/wid-edit.el

index 3a7413f943ca6efa86c3e81910d5c6254717d495..8e6d0ed3664ea30c2f72c6bc9c7731e23c954e27 100644 (file)
@@ -2550,12 +2550,9 @@ If the item is checked, CHOSEN is a cons whose cdr is the value."
                             (widget-create-child-value
                              widget type (cdr chosen)))
                            (t
-                            (widget-create-child-value
-                             widget type (car (cdr chosen)))
-                             ;; This somehow breaks :options and other
-                             ;; Custom features.
-                             ;; (widget-specify-selected child)
-                             ))))
+                             (widget-specify-selected child)
+                             (widget-create-child-value
+                              widget type (car (cdr chosen)))))))
               (t
                (error "Unknown escape `%c'" escape)))))
      ;; Update properties.