# HG changeset patch # User Chong Yidong # Date 1174154347 0 # Node ID 6f3e13b2e1ce9c944b7ca62de737a324470f5662 # Parent 31e546ba143c3f99dbf94aa77d27c5e896e900c8 (command-line-1): Make insertion of initial-scratch-message not depend on scratch being selected. diff -r 31e546ba143c -r 6f3e13b2e1ce lisp/startup.el --- a/lisp/startup.el Sat Mar 17 17:57:38 2007 +0000 +++ b/lisp/startup.el Sat Mar 17 17:59:07 2007 +0000 @@ -1995,13 +1995,13 @@ (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 *scratch* exists and is empty, insert initial-scratch-message. + (and initial-scratch-message + (get-buffer "*scratch*") + (with-current-buffer "*scratch*" + (when (zerop (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.