emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/kind-icon 9a20879 30/51: Use widget-value in customize


From: ELPA Syncer
Subject: [elpa] externals/kind-icon 9a20879 30/51: Use widget-value in customize preview
Date: Wed, 17 Nov 2021 15:57:44 -0500 (EST)

branch: externals/kind-icon
commit 9a20879139a8f5497e86173eaf950430665c1d74
Author: JD Smith <93749+jdtsmith@users.noreply.github.com>
Commit: JD Smith <93749+jdtsmith@users.noreply.github.com>

    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)))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]