[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[patch] Re: On the new startup and scratch buffer
From: |
Jonathan Rockway |
Subject: |
[patch] Re: On the new startup and scratch buffer |
Date: |
Wed, 13 Feb 2008 22:18:17 -0600 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
>>>> 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
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 ----
- On the new startup and scratch buffer, Angelo Graziosi, 2008/02/13
- Re: On the new startup and scratch buffer, Jonathan Rockway, 2008/02/13
- Re: On the new startup and scratch buffer, Sascha Wilde, 2008/02/21
- Re: On the new startup and scratch buffer, Jonathan Rockway, 2008/02/21
- Re: On the new startup and scratch buffer, Angelo Graziosi, 2008/02/21
- Re: On the new startup and scratch buffer, Juri Linkov, 2008/02/28
- Re: On the new startup and scratch buffer, Juri Linkov, 2008/02/28
- Re: On the new startup and scratch buffer, Eli Zaretskii, 2008/02/29
- Re: On the new startup and scratch buffer, Juri Linkov, 2008/02/29
- Re: On the new startup and scratch buffer, Eli Zaretskii, 2008/02/29
- Re: On the new startup and scratch buffer, Chong Yidong, 2008/02/29