[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r113670: lisp/frameset.el (frameset-prop): New funct
From: |
Juanma Barranquero |
Subject: |
[Emacs-diffs] trunk r113670: lisp/frameset.el (frameset-prop): New function and setter. |
Date: |
Sat, 03 Aug 2013 09:57:20 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 113670
revision-id: address@hidden
parent: address@hidden
committer: Juanma Barranquero <address@hidden>
branch nick: trunk
timestamp: Sat 2013-08-03 11:57:07 +0200
message:
lisp/frameset.el (frameset-prop): New function and setter.
(frameset-save): Do not modify frame list passed by the caller.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/frameset.el frameset.el-20130802043218-tfwraxv1c2zlibpw-1
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-08-03 02:34:22 +0000
+++ b/lisp/ChangeLog 2013-08-03 09:57:07 +0000
@@ -1,3 +1,8 @@
+2013-08-03 Juanma Barranquero <address@hidden>
+
+ * frameset.el (frameset-prop): New function and setter.
+ (frameset-save): Do not modify frame list passed by the caller.
+
2013-08-03 Stefan Monnier <address@hidden>
* emacs-lisp/package.el (package-desc-from-define): Ignore unknown keys.
=== modified file 'lisp/frameset.el'
--- a/lisp/frameset.el 2013-08-02 16:03:13 +0000
+++ b/lisp/frameset.el 2013-08-03 09:57:07 +0000
@@ -78,6 +78,21 @@
(and (eq (car-safe frameset) 'frameset)
(plist-get (cl-second frameset) :version)))
+;; A setf'able accessor to the frameset's properties
+(defun frameset-prop (frameset prop)
+ "Return the value of the PROP property of FRAMESET.
+
+Properties other than :version can be set with
+
+ (setf (frameset-prop FRAMESET PROP) NEW-VALUE)"
+ (plist-get (frameset-properties frameset) prop))
+
+(gv-define-setter frameset-prop (v fs prop)
+ `(progn
+ (cl-assert (not (eq ,prop :version)) t ":version can not be set")
+ (setf (frameset-properties ,fs)
+ (plist-put (frameset-properties ,fs) ,prop ,v))))
+
;; Filtering
@@ -294,8 +309,9 @@
should be saved; it defaults to saving all frames from FRAME-LIST.
PROPERTIES is a user-defined property list to add to the frameset."
(let ((frames (cl-delete-if-not #'frame-live-p
- (cl-remove-if-not (or predicate #'framep)
- (or frame-list
(frame-list))))))
+ (cl-delete-if-not (or predicate #'framep)
+ (or (copy-sequence
frame-list)
+ (frame-list))))))
(frameset--process-minibuffer-frames frames)
(make-frameset :properties (append '(:version 1) properties)
:states (mapcar
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r113670: lisp/frameset.el (frameset-prop): New function and setter.,
Juanma Barranquero <=