emacs-pretest-bug
[Top][All Lists]
Advanced

[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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]