diff options
| author | Eli Zaretskii | 2016-12-17 19:05:21 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2016-12-17 19:05:21 +0200 |
| commit | 3d94931cec5850fc4dc5ffc9f1bf88a291aa3a5b (patch) | |
| tree | 754aba67960d882912c63176beb22d63c25d1cef | |
| parent | 43022f9860d00b0f1baad34c6ea7ffd51f3cfc1d (diff) | |
| download | emacs-3d94931cec5850fc4dc5ffc9f1bf88a291aa3a5b.tar.gz emacs-3d94931cec5850fc4dc5ffc9f1bf88a291aa3a5b.zip | |
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.el | 4 |
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." | |||
| 1157 | ;; ---------------------------------------------------------------------------- | 1157 | ;; ---------------------------------------------------------------------------- |
| 1158 | (defun desktop-restoring-frameset-p () | 1158 | (defun desktop-restoring-frameset-p () |
| 1159 | "True if calling `desktop-restore-frameset' will actually restore it." | 1159 | "True if calling `desktop-restore-frameset' will actually restore it." |
| 1160 | (and desktop-restore-frames desktop-saved-frameset t)) | 1160 | (and desktop-restore-frames desktop-saved-frameset (display-graphic-p) t)) |
| 1161 | 1161 | ||
| 1162 | (defun desktop-restore-frameset () | 1162 | (defun desktop-restore-frameset () |
| 1163 | "Restore the state of a set of frames. | 1163 | "Restore the state of a set of frames. |
| 1164 | This function depends on the value of `desktop-saved-frameset' | 1164 | This function depends on the value of `desktop-saved-frameset' |
| 1165 | being set (usually, by reading it from the desktop)." | 1165 | being set (usually, by reading it from the desktop)." |
| 1166 | (when (and (display-graphic-p) (desktop-restoring-frameset-p)) | 1166 | (when (desktop-restoring-frameset-p) |
| 1167 | (frameset-restore desktop-saved-frameset | 1167 | (frameset-restore desktop-saved-frameset |
| 1168 | :reuse-frames (eq desktop-restore-reuses-frames t) | 1168 | :reuse-frames (eq desktop-restore-reuses-frames t) |
| 1169 | :cleanup-frames (not (eq desktop-restore-reuses-frames 'keep)) | 1169 | :cleanup-frames (not (eq desktop-restore-reuses-frames 'keep)) |