From 62f33baed9e37213dc5164b27a968c42bb60b4a7 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Wed, 14 Aug 2013 15:30:13 +0200 Subject: [PATCH] lisp/frameset.el: Use gv-setter declaration. (frameset--prop-setter): New function. (frameset-prop): Add gv-setter declaration. --- lisp/ChangeLog | 5 +++++ lisp/frameset.el | 16 ++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ac7a87deb5f..b83a752f2eb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2013-08-14 Juanma Barranquero + + * frameset.el (frameset--prop-setter): New function. + (frameset-prop): Add gv-setter declaration. + 2013-08-14 Martin Rudalics * window.el (window-make-atom): Don't overwrite parameter diff --git a/lisp/frameset.el b/lisp/frameset.el index e334b4cb1fd..74432db892c 100644 --- a/lisp/frameset.el +++ b/lisp/frameset.el @@ -156,7 +156,13 @@ FRAMESET is copied with `copy-tree'." (let ((states (frameset-states object))) (and (listp states) (cl-every #'consp (frameset-states object)))) - (frameset-version object))) ; And VERSION is non-nil. + (frameset-version object))) ; And VERSION is non-nil. + +(defun frameset--prop-setter (frameset property value) + "Setter function for `frameset-prop'. Internal use only." + (setf (frameset-properties frameset) + (plist-put (frameset-properties frameset) property value)) + value) ;; A setf'able accessor to the frameset's properties (defun frameset-prop (frameset property) @@ -165,15 +171,9 @@ FRAMESET is copied with `copy-tree'." Properties can be set with (setf (frameset-prop FRAMESET PROPERTY) NEW-VALUE)" + (declare (gv-setter frameset--prop-setter)) (plist-get (frameset-properties frameset) property)) -(gv-define-setter frameset-prop (val fs prop) - (macroexp-let2 nil v val - `(progn - (setf (frameset-properties ,fs) - (plist-put (frameset-properties ,fs) ,prop ,v)) - ,v))) - ;; Filtering -- 2.39.2