branch: externals/kind-icon
commit 9a20879139a8f5497e86173eaf950430665c1d74
Author: JD Smith <[email protected]>
Commit: JD Smith <[email protected]>
Use widget-value in customize preview
---
kind-icon.el | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/kind-icon.el b/kind-icon.el
index 7716211..7d8439c 100644
--- a/kind-icon.el
+++ b/kind-icon.el
@@ -153,10 +153,10 @@ otherwise defaulting to the frame background color."
See `svg-lib-style-compute-default'."
:type 'plist)
-(defun kind-icon--preview (_w _e)
- (goto-char (field-end))
- (let ((icon (buffer-substring (point) (field-end))))
- (message "%S looks like: %s" icon
+(defun kind-icon--preview (widget _e)
+ (let* ((icon (widget-value widget)))
+ (message "%S [%s] looks like: %s" icon
+ (pp-to-string (widget- widget))
(propertize "**" 'display
(apply #'svg-lib-icon
icon nil kind-icon-default-style)))))