projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2ef6f94
)
Require custom values of `boolean` type to be nil or t
author
Mattias Engdegård
<mattiase@acm.org>
Mon, 24 Apr 2023 14:03:47 +0000
(16:03 +0200)
committer
Mattias Engdegård
<mattiase@acm.org>
Mon, 24 Apr 2023 14:03:47 +0000
(16:03 +0200)
This helps detecting mistakes in types and/or initial values.
* lisp/wid-edit.el (boolean): Add :match function.
lisp/wid-edit.el
patch
|
blob
|
history
diff --git
a/lisp/wid-edit.el
b/lisp/wid-edit.el
index 60bd2baa6fb442e0f8b4720e3050d3667db3fc83..8b035224c9bdb972e2792504eb121895e746f39c 100644
(file)
--- a/
lisp/wid-edit.el
+++ b/
lisp/wid-edit.el
@@
-4038,6
+4038,7
@@
is inline."
:button-prefix 'widget-push-button-prefix
:button-suffix 'widget-push-button-suffix
:format "%{%t%}: %[Toggle%] %v\n"
+ :match (lambda (_widget value) (booleanp value))
:on "on (non-nil)"
:off "off (nil)")