From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jonathan Rockway Newsgroups: gmane.emacs.devel Subject: [patch] Re: On the new startup and scratch buffer Date: Wed, 13 Feb 2008 22:18:17 -0600 Message-ID: <87r6fgmara.fsf_-_@bar.jrock.us> References: <47B319AD.3030804@alice.it> <87zlu4oi48.fsf@bar.jrock.us> <47B3320C.8060800@alice.it> <878x1owk4v.fsf@jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1202962712 3786 80.91.229.12 (14 Feb 2008 04:18:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 14 Feb 2008 04:18:32 +0000 (UTC) Cc: Juri Linkov , emacs-devel@gnu.org, Angelo Graziosi To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 14 05:18:55 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JPVYi-0001LM-Nu for ged-emacs-devel@m.gmane.org; Thu, 14 Feb 2008 05:18:53 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JPVYE-0002RI-K7 for ged-emacs-devel@m.gmane.org; Wed, 13 Feb 2008 23:18:22 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JPVYB-0002RD-5n for emacs-devel@gnu.org; Wed, 13 Feb 2008 23:18:19 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JPVYA-0002Qt-DD for emacs-devel@gnu.org; Wed, 13 Feb 2008 23:18:18 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JPVYA-0002Qq-8J for emacs-devel@gnu.org; Wed, 13 Feb 2008 23:18:18 -0500 Original-Received: from dsl092-134-091.chi1.dsl.speakeasy.net ([66.92.134.91] helo=bar.jrock.us) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JPVY9-0006VZ-TG for emacs-devel@gnu.org; Wed, 13 Feb 2008 23:18:18 -0500 Original-Received: from jon by bar.jrock.us with local (Exim 4.69) (envelope-from ) id 1JPVY9-0008Fd-6M; Wed, 13 Feb 2008 22:18:17 -0600 In-Reply-To: (Stefan Monnier's message of "Wed, 13 Feb 2008 20:37:22 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:89041 Archived-At: --=-=-= >>>> If people are interested in a change to this behavior (always add text >>>> to *scratch* if initial-scratch-message isn't nil), I'll supply a patch. >>> >>> I think it would be a good thing, so I vote for it: +1. > >> I agree that `inhibit-startup-screen' is irrelevant to adding the >> text from `initial-scratch-message' to the *scratch* buffer. > > +1 Hi, the patch for this is attached. I'm not sure if `emacs-quick-startup' should affect insertion of the message or not (it did before) -- this patch will always insert the message if `initial-scratch-message' is non-nil. Regards, Jonathan Rockway --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=always-show-scratch-message.patch Content-Description: show initial-scratch-message in *scratch* even if inhibit-startup-screen is non-nil Index: lisp/startup.el =================================================================== RCS file: /sources/emacs/emacs/lisp/startup.el,v retrieving revision 1.477 diff -C 2 -r1.477 startup.el *** lisp/startup.el 12 Feb 2008 23:41:08 -0000 1.477 --- lisp/startup.el 14 Feb 2008 04:08:15 -0000 *************** *** 57,61 **** (defcustom inhibit-startup-screen nil "Non-nil inhibits the startup screen. - It also inhibits display of the initial message in the `*scratch*' buffer. This is for use in your personal init file (but NOT site-start.el), once --- 57,60 ---- *************** *** 1151,1157 **** ") "Initial message displayed in *scratch* buffer at startup. ! If this is nil, no message will be displayed. ! If `inhibit-startup-screen' is non-nil, then no message is displayed, ! regardless of the value of this variable." :type '(choice (text :tag "Message") (const :tag "none" nil)) --- 1150,1154 ---- ") "Initial message displayed in *scratch* buffer at startup. ! If this is nil, no message will be displayed." :type '(choice (text :tag "Message") (const :tag "none" nil)) *************** *** 2181,2184 **** --- 2178,2189 ---- (find-file initial-buffer-choice)))) + ;; 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 (or inhibit-startup-screen initial-buffer-choice *************** *** 2226,2237 **** ;; (setq menubar-bindings-done t)) - ;; 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 (> file-count 0) (display-startup-screen t) --- 2231,2234 ---- --=-=-=--