From 2a30c37b66712b0b700af1d097bdf91bbf37924b Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 17 Mar 2007 17:59:07 +0000 Subject: [PATCH] (command-line-1): Make insertion of initial-scratch-message not depend on scratch being selected. --- lisp/startup.el | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lisp/startup.el b/lisp/startup.el index 9192222ec88..7e6b4f9ac36 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -1995,13 +1995,13 @@ With a prefix argument, any user input hides the splash screen." (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. -- 2.39.5