;;; frameset.el --- save and restore frame and window setup -*- lexical-binding: t -*-
-;; Copyright (C) 2013-2014 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2016 Free Software Foundation, Inc.
;; Author: Juanma Barranquero <lekktu@gmail.com>
;; Keywords: convenience
;; Now, what about the filter alist variables? There are three of them,
;; though only two sets of parameters:
;;
-;; - `frameset-session-filter-alist' contains these filters that allow to
-;; save and restore framesets in-session, without the need to serialize
-;; the frameset or save it to disk (for example, to save a frameset in a
-;; register and restore it later). Filters in this list do not remove
-;; live objects, except in `minibuffer', which is dealt especially by
-;; `frameset-save' / `frameset-restore'.
+;; - `frameset-session-filter-alist' contains these filters that allow
+;; saving and restoring framesets in-session, without the need to
+;; serialize the frameset or save it to disk (for example, to save a
+;; frameset in a register and restore it later). Filters in this
+;; list do not remove live objects, except in `minibuffer', which is
+;; dealt especially by `frameset-save' / `frameset-restore'.
;;
;; - `frameset-persistent-filter-alist' is the whole deal. It does all
;; the filtering described above, and the result is ready to be saved on
;; Set the display parameter after filtering, so that filter functions
;; have access to its original value.
(when frameset--target-display
- (let ((display (assq 'display filtered)))
- (if display
- (setcdr display (cdr frameset--target-display))
- (push frameset--target-display filtered))))
+ (setf (alist-get 'display filtered) (cdr frameset--target-display)))
filtered))
\f
(defun frameset-keep-original-display-p (force-display)
"True if saved frames' displays should be honored.
For the meaning of FORCE-DISPLAY, see `frameset-restore'."
- (cond ((daemonp) t)
- ((eq system-type 'windows-nt) nil) ;; Does ns support more than one display?
+ (cond ((eq system-type 'windows-nt) nil) ;; Does ns support more than one display?
+ ((daemonp) t)
(t (not force-display))))
(defun frameset-minibufferless-first-p (frame1 _frame2)
- a list (LEFT TOP WIDTH HEIGHT), describing the workarea.
It must return non-nil to force the frame onscreen, nil otherwise.
-CLEANUP-FRAMES allows to \"clean up\" the frame list after restoring a frameset:
+CLEANUP-FRAMES allows \"cleaning up\" the frame list after restoring a frameset:
t Delete all frames that were not created or restored upon.
nil Keep all frames.
FUNC A function called with two arguments: