Commit 4538c058 authored by Juanma Barranquero's avatar Juanma Barranquero

lisp/frameset.el: Separate frame reusing from cleaning up.

* lisp/desktop.el (desktop-restore-forces-onscreen)
  (desktop-restore-reuses-frames): Use non-keyword values.
  (desktop-restore-frameset): Use CLEANUP-FRAMES arg of frameset-restore.

* lisp/frameset.el: Separate options for reusing frames and cleaning up.
  (frameset--reuse-list): Remove definition; declare.
  (frameset--action-map): Declare.
  (frameset--find-frame-if): Doc fix.
  (frameset--restore-frame): Cache frame action.
  (frameset-restore): New keyword arg CLEANUP-FRAMES, allows to select
  how to clean up the frame list after restoring.  Remove cleaning
  options from REUSE-FRAMES.  Change all keyword values to symbols.
  (frameset--jump-to-register): Simplify by using CLEANUP-FRAMES.
parent f38145ba
2014-03-11 Juanma Barranquero <lekktu@gmail.com>
* frameset.el: Separate options for reusing frames and cleaning up.
(frameset--reuse-list): Remove definition; declare.
(frameset--action-map): Declare.
(frameset--find-frame-if): Doc fix.
(frameset--restore-frame): Cache frame action.
(frameset-restore): New keyword arg CLEANUP-FRAMES, allows to select
how to clean up the frame list after restoring. Remove cleaning
options from REUSE-FRAMES. Change all keyword values to symbols.
(frameset--jump-to-register): Simplify by using CLEANUP-FRAMES.
* desktop.el (desktop-restore-forces-onscreen)
(desktop-restore-reuses-frames): Use non-keyword values.
(desktop-restore-frameset): Use CLEANUP-FRAMES arg of frameset-restore.
2014-03-10 Glenn Morris <rgm@gnu.org>
* files.el (find-file): Doc fix: update info node name.
......
......@@ -404,12 +404,12 @@ If `delete', frames on other displays are deleted instead of restored."
(defcustom desktop-restore-forces-onscreen t
"If t, offscreen frames are restored onscreen instead.
If `:all', frames that are partially offscreen are also forced onscreen.
If `all', frames that are partially offscreen are also forced onscreen.
NOTE: Checking of frame boundaries is only approximate and can fail
to reliably detect frames whose onscreen/offscreen state depends on a
few pixels, especially near the right / bottom borders of the screen."
:type '(choice (const :tag "Only fully offscreen frames" t)
(const :tag "Also partially offscreen frames" :all)
(const :tag "Also partially offscreen frames" all)
(const :tag "Do not force frames onscreen" nil))
:group 'desktop
:version "24.4")
......@@ -417,7 +417,7 @@ few pixels, especially near the right / bottom borders of the screen."
(defcustom desktop-restore-reuses-frames t
"If t, restoring frames reuses existing frames.
If nil, existing frames are deleted.
If `:keep', existing frames are kept and not reused."
If `keep', existing frames are kept and not reused."
:type '(choice (const :tag "Reuse existing frames" t)
(const :tag "Delete existing frames" nil)
(const :tag "Keep existing frames" :keep))
......@@ -692,7 +692,7 @@ if different)."
(frame-parameter frame 'desktop-dont-clear))
(delete-frame frame))
(error
(delay-warning 'desktop (error-message-string err))))))))
(delay-warning 'desktop (error-message-string err))))))))
;; ----------------------------------------------------------------------------
(unless noninteractive
......@@ -1058,7 +1058,8 @@ This function depends on the value of `desktop-saved-frameset'
being set (usually, by reading it from the desktop)."
(when (desktop-restoring-frameset-p)
(frameset-restore desktop-saved-frameset
:reuse-frames desktop-restore-reuses-frames
:reuse-frames (eq desktop-restore-reuses-frames t)
:cleanup-frames (not (eq desktop-restore-reuses-frames 'keep))
:force-display desktop-restore-in-current-display
:force-onscreen desktop-restore-forces-onscreen)))
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment