1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-22 07:09:54 +00:00

lisp/frameset.el: Use gv-setter declaration.

(frameset--prop-setter): New function.
(frameset-prop): Add gv-setter declaration.
This commit is contained in:
Juanma Barranquero 2013-08-14 15:30:13 +02:00
parent 6c195442ea
commit 62f33baed9
2 changed files with 13 additions and 8 deletions

View File

@ -1,3 +1,8 @@
2013-08-14 Juanma Barranquero <lekktu@gmail.com>
* frameset.el (frameset--prop-setter): New function.
(frameset-prop): Add gv-setter declaration.
2013-08-14 Martin Rudalics <rudalics@gmx.at>
* window.el (window-make-atom): Don't overwrite parameter

View File

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