[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Initial scratch message missing with desktop-save-mode on
From: |
Glenn Morris |
Subject: |
Re: Initial scratch message missing with desktop-save-mode on |
Date: |
Thu, 08 Mar 2007 02:59:59 -0500 |
User-agent: |
Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) |
Oliver Scholz wrote:
> The initial scratch message (from `initial-scratch-message') is missing
> *iff* `desktop-save-mode' is on and at least one file is actually
> visited automatically.
I belive this is because command-line-1 only inserts the
initial-scratch-message if the scratch buffer is selected. Restoring a
desktop buries the scratch buffer. The following patch would fix this.
It reverts the behaviour to what it was before rev 1.270 of
startup.el.
*** startup.el 4 Mar 2007 17:49:56 -0000 1.431
--- startup.el 8 Mar 2007 07:55:36 -0000
***************
*** 1995,2007 ****
(with-no-warnings
(setq menubar-bindings-done t))
! ;; If *scratch* is selected and it is empty, insert an
! ;; initial message saying not to create a file there.
! (when (and initial-scratch-message
! (equal (buffer-name) "*scratch*")
! (= 0 (buffer-size)))
(insert initial-scratch-message)
! (set-buffer-modified-p nil))
;; If user typed input during all that work,
;; abort the startup screen. Otherwise, display it now.
--- 1995,2008 ----
(with-no-warnings
(setq menubar-bindings-done t))
! ;; If *scratch* exists and is empty, insert an initial message
! ;; saying not to create a file there.
! (and initial-scratch-message
! (get-buffer "*scratch*")
! (with-current-buffer "*scratch*"
! (when (= 0 (buffer-size))
(insert initial-scratch-message)
! (set-buffer-modified-p nil))))
;; If user typed input during all that work,
;; abort the startup screen. Otherwise, display it now.
- Initial scratch message missing with desktop-save-mode on, Oliver Scholz, 2007/03/07
- Re: Initial scratch message missing with desktop-save-mode on,
Glenn Morris <=
- Re: Initial scratch message missing with desktop-save-mode on, Richard Stallman, 2007/03/08
- Re: Initial scratch message missing with desktop-save-mode on, Glenn Morris, 2007/03/08
- Re: Initial scratch message missing with desktop-save-mode on, Richard Stallman, 2007/03/09
- Re: Initial scratch message missing with desktop-save-mode on, Kim F. Storm, 2007/03/09
- Re: Initial scratch message missing with desktop-save-mode on, Juanma Barranquero, 2007/03/09
- Re: Initial scratch message missing with desktop-save-mode on, Kim F. Storm, 2007/03/09
- Re: Initial scratch message missing with desktop-save-mode on, Oliver Scholz, 2007/03/09
- Re: Initial scratch message missing with desktop-save-mode on, Richard Stallman, 2007/03/10
- Re: Initial scratch message missing with desktop-save-mode on, Glenn Morris, 2007/03/09
- Re: Initial scratch message missing with desktop-save-mode on, Richard Stallman, 2007/03/10