summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2016-12-17 19:05:21 +0200
committerEli Zaretskii <eliz@gnu.org>2016-12-17 19:05:21 +0200
commit3d94931cec5850fc4dc5ffc9f1bf88a291aa3a5b (patch)
tree754aba67960d882912c63176beb22d63c25d1cef
parent43022f9860d00b0f1baad34c6ea7ffd51f3cfc1d (diff)
downloademacs-3d94931cec5850fc4dc5ffc9f1bf88a291aa3a5b.tar.gz
Repair desktop restoration on text terminals
* lisp/desktop.el (desktop-restoring-frameset-p): Test for the GUI frame here, instead of in desktop-restoring-frameset. That's because desktop-read wants to know whether frameset will actually be restored, and has fallback procedures up its sleeve when it won't be; these fallbacks need to be invoked when the frameset is not going to be restored. (Bug#24298)
-rw-r--r--lisp/desktop.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/desktop.el b/lisp/desktop.el
index 1f460b7a3ed..e83891bf05d 100644
--- a/lisp/desktop.el
+++ b/lisp/desktop.el
@@ -1157,13 +1157,13 @@ This function also sets `desktop-dirname' to nil."
;; ----------------------------------------------------------------------------
(defun desktop-restoring-frameset-p ()
"True if calling `desktop-restore-frameset' will actually restore it."
- (and desktop-restore-frames desktop-saved-frameset t))
+ (and desktop-restore-frames desktop-saved-frameset (display-graphic-p) t))
(defun desktop-restore-frameset ()
"Restore the state of a set of frames.
This function depends on the value of `desktop-saved-frameset'
being set (usually, by reading it from the desktop)."
- (when (and (display-graphic-p) (desktop-restoring-frameset-p))
+ (when (desktop-restoring-frameset-p)
(frameset-restore desktop-saved-frameset
:reuse-frames (eq desktop-restore-reuses-frames t)
:cleanup-frames (not (eq desktop-restore-reuses-frames 'keep))