summaryrefslogtreecommitdiff
path: root/lisp/desktop.el
diff options
context:
space:
mode:
authorJuanma Barranquero <lekktu@gmail.com>2014-03-11 01:46:07 +0100
committerJuanma Barranquero <lekktu@gmail.com>2014-03-11 01:46:07 +0100
commit4538c058d073cedeff92a50211b415a2e57c3469 (patch)
treee7c8b9beaa515042c850052ab37a789e21ba26f4 /lisp/desktop.el
parentf38145ba81691d60f3a8e3198e4754359c8b8a55 (diff)
downloademacs-4538c058d073cedeff92a50211b415a2e57c3469.tar.gz
emacs-4538c058d073cedeff92a50211b415a2e57c3469.tar.bz2
emacs-4538c058d073cedeff92a50211b415a2e57c3469.zip
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.
Diffstat (limited to 'lisp/desktop.el')
-rw-r--r--lisp/desktop.el11
1 files changed, 6 insertions, 5 deletions
diff --git a/lisp/desktop.el b/lisp/desktop.el
index 0677b8c85dd..dbddfb7c1d3 100644
--- a/lisp/desktop.el
+++ b/lisp/desktop.el
@@ -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)))