]> git.eshelyaron.com Git - emacs.git/commitdiff
Correctly return passed value from widget-put
authorDavid Ponce <da_vid@orange.fr>
Sun, 2 Mar 2025 01:17:12 +0000 (02:17 +0100)
committerEshel Yaron <me@eshelyaron.com>
Tue, 4 Mar 2025 20:58:03 +0000 (21:58 +0100)
* lisp/wid-edit.el (widget-get-indirect): Return passed value to stay
consistent with old C implementation.  (Bug#76664)

(cherry picked from commit 5b13541858707a5cbb857b257e00848430d87c47)

lisp/wid-edit.el

index 6db00397baf1260995f4a938cfcbfd49dda801af..558769834df6097d9fd52ca6a5daebdbd71dea4d 100644 (file)
@@ -625,7 +625,8 @@ and saves that overlay under the :inactive property for WIDGET."
 (defun widget-put (widget property value)
   "In WIDGET, set PROPERTY to VALUE.
 The value can later be retrieved with `widget-get'."
-  (setcdr widget (plist-put (cdr widget) property value)))
+  (setcdr widget (plist-put (cdr widget) property value))
+  value)
 
 ;;;###autoload
 (defun widget-get (widget property)