summaryrefslogtreecommitdiff
path: root/test/lisp/wid-edit-tests.el
Commit message (Collapse)AuthorAgeFilesLines
* ; Add 2024 to copyright yearsPo Lu2024-01-021-1/+1
|
* Fix `pr-interface'Robert Pluim2023-01-061-0/+16
| | | | | | | | | | | `pr-interface' specifies `inline' for its menu items, which is not necessary, but it causes `widget-choice-value-create' to bug out. (Bug#60501) * lisp/wid-edit.el (widget-choice-value-create): Allow the value to be a non-list. * test/lisp/wid-edit-tests.el (widget-test-handle-spurious-inline): Add test to ensure that unnecessary :inline is allowed.
* ; Add 2023 to copyright years.Eli Zaretskii2023-01-011-1/+1
|
* ; Add 2022 to copyright years.Eli Zaretskii2022-01-011-1/+1
|
* Add test for the widget-color-match function (Bug#45829)Mauro Aranda2021-01-191-0/+11
| | | | * test/lisp/wid-edit-tests.el (widget-test-color-match): New test.
* Don't skip widgets when moving backwardMauro Aranda2021-01-041-0/+21
| | | | | | | | * lisp/wid-edit.el (widget-move): Remove code that caused widget-backward to skip an immediate previous widget when moving backward from the start of a widget. (Bug#45623) * test/lisp/wid-edit-tests.el (widget-test-widget-backward): New test.
* Update copyright year to 2021Paul Eggert2021-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright".
* Fix matching of inline choices for the choice widgetMauro Aranda2020-11-241-0/+153
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A choice widget should be able to match either no inline values or inline values, upon request. (Bug#44579) * 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.
* Allow moving members of editable-list widget, via delete+insertMauro Aranda2020-10-221-0/+19
| | | | | | | | | | | | | | | | | * etc/NEWS (Widget): Announce the feature (bug#6419). * lisp/wid-edit.el (widget-editable-list-delete-at): Save into a new widget property, :last-deleted, the WIDGET to be deleted. Add docstring. (widget-editable-list-insert-before): If there is a recently deleted child for the editable list, insert that one, instead of a new default widget. Add docstring. (insert-button widget): Make :help-echo a function to avoid the help-echo string become too long. (delete-button widget): Tweak the :help-echo string, to document this behavior. * test/lisp/wid-edit-tests.el (widget-test-moving-editable-list-item): Test the feature.
* Allow the newline character in the character widget (Bug#15925)Mauro Aranda2020-09-231-0/+16
| | | | | | | | | | * lisp/wid-edit.el (widget-specify-field): Extend check for adding the boundary overlay. Plus, a minor comment indentation fix. (character widget): Tweak the valid-regexp to allow the newline character. * test/lisp/wid-edit-tests.el (widget-test-character-widget-value) (widget-test-editable-field-widget-value): New tests (bug#15925).
* Update copyright year to 2020Paul Eggert2020-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
* Don't indent unrelated widgets following widget of type 'otherMauro Aranda2019-09-261-0/+77
| | | | | | | | | | * lisp/wid-edit.el (widget 'other): Use \n instead of the %n escape in the :format property of this widget. If %n is used at the end of the format string, unrelated widgets get indented. (Bug#12533) * test/wid-edit-tests.el (widget-test-indentation-after-%n) (widget-test-indentation-after-newline) (widget-test-newline-and-indent-same-widget): New tests.
* Distinguish buttons from widgets (bug#34506)Basil L. Contovounesios2019-04-071-0/+39
* lisp/button.el (button-at): * lisp/wid-edit.el (widget-at): Avoid returning a false positive when looking for a button and finding a widget, or vice versa. * test/lisp/button-tests.el: * test/lisp/wid-edit-tests.el: New files.