branch: externals/compat
commit ed62b3f9850cbda1b1e56dfb666fd9e2c0644ffc
Author: Philip Kaludercic <phil...@posteo.net>
Commit: Philip Kaludercic <phil...@posteo.net>

    Use gv-define-expander instead of gv-define-simple-setter
---
 compat-26.el | 25 ++++++++++++-------------
 1 file changed, 12 insertions(+), 13 deletions(-)

diff --git a/compat-26.el b/compat-26.el
index 92339a97ff..0aa1dd03bc 100644
--- a/compat-26.el
+++ b/compat-26.el
@@ -445,19 +445,18 @@ If VALUE is nil, PROPERTY is removed from IMAGE."
   (plist-get (cdr image) property))
 
 ;;* UNTESTED
-(gv-define-simple-setter
- image-property
- (lambda (image property value)
-   (if (null value)
-       (while (cdr image)
-         ;; IMAGE starts with the symbol `image', and the rest is a
-         ;; plist.  Decouple plist entries where the key matches
-         ;; the property.
-         (if (eq (cadr image) property)
-             (setcdr image (cdddr image))
-           (setq image (cddr image))))
-     ;; Just enter the new value.
-     (setcdr image (plist-put (cdr image) property value)))))
+(gv-define-expander image-property
+  (lambda (image property value)
+    (if (null value)
+        (while (cdr image)
+          ;; IMAGE starts with the symbol `image', and the rest is a
+          ;; plist.  Decouple plist entries where the key matches
+          ;; the property.
+          (if (eq (cadr image) property)
+              (setcdr image (cdddr image))
+            (setq image (cddr image))))
+      ;; Just enter the new value.
+      (setcdr image (plist-put (cdr image) property value)))))
 
 (provide 'compat-26)
 ;;; compat-26.el ends here

Reply via email to