From: Glenn Morris Date: Wed, 16 Jul 2014 04:28:42 +0000 (-0700) Subject: * lisp/desktop.el (after-init-hook): Disable startup frame restoration X-Git-Tag: emacs-24.3.93~65 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=61dcf9bc85b309e1fa052eb1e76698d4789f7f72;p=emacs.git * lisp/desktop.el (after-init-hook): Disable startup frame restoration in non-graphical situations. Fixes: debbugs:17693 --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 14ed03e7570..0e82c4bbc46 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-07-16 Glenn Morris + + * desktop.el (after-init-hook): Disable startup frame restoration + in non-graphical situations. (Bug#17693) + 2014-07-14 Glenn Morris * vc/vc-dispatcher.el (vc-log-edit): Do set up the log buffer diff --git a/lisp/desktop.el b/lisp/desktop.el index 12207f3cdac..40e6b364e45 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el @@ -1516,8 +1516,15 @@ If there are no buffers left to create, kill the timer." (setq command-line-args (delete key command-line-args)) (desktop-save-mode 0))) (when desktop-save-mode - (desktop-read) - (setq inhibit-startup-screen t)))) + ;; People don't expect emacs -nw, or --daemon, + ;; to create graphical frames (bug#17693). + ;; TODO perhaps there should be a separate value + ;; for desktop-restore-frames to control this startup behavior? + (let ((desktop-restore-frames (and desktop-restore-frames + initial-window-system + (not (daemonp))))) + (desktop-read) + (setq inhibit-startup-screen t))))) ;; So we can restore vc-dir buffers. (autoload 'vc-dir-mode "vc-dir" nil t)