diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2007-03-17 17:59:07 +0000 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2007-03-17 17:59:07 +0000 |
commit | d08b487bb11f5bbd99c8acd1e77eaf41b6351da1 (patch) | |
tree | 08fdf846387706d4a94bd2e99733d853f6a87a31 /lisp/startup.el | |
parent | b97c803b44ab627443fa0f5e249c7ac0ffa82096 (diff) | |
download | emacs-d08b487bb11f5bbd99c8acd1e77eaf41b6351da1.tar.gz |
(command-line-1): Make insertion of initial-scratch-message not depend
on scratch being selected.
Diffstat (limited to 'lisp/startup.el')
-rw-r--r-- | lisp/startup.el | 14 |
1 files 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. |