[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r105966: Insert initial-scratch-messa
From: |
martin rudalics |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r105966: Insert initial-scratch-message before displaying *scratch*. (Bug#9636) |
Date: |
Fri, 30 Sep 2011 15:21:29 +0200 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 105966
committer: martin rudalics <address@hidden>
branch nick: trunk
timestamp: Fri 2011-09-30 15:21:29 +0200
message:
Insert initial-scratch-message before displaying *scratch*. (Bug#9636)
* startup.el (command-line-1): Fix last fix by inserting
initial-scratch-message into *scratch* before displaying it.
(Bug#9626) and (Bug#9636)
modified:
lisp/ChangeLog
lisp/startup.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2011-09-29 13:03:42 +0000
+++ b/lisp/ChangeLog 2011-09-30 13:21:29 +0000
@@ -1,3 +1,9 @@
+2011-09-30 Martin Rudalics <address@hidden>
+
+ * startup.el (command-line-1): Fix last fix by inserting
+ initial-scratch-message into *scratch* before displaying it.
+ (Bug#9626) and (Bug#9636)
+
2011-09-29 Eli Zaretskii <address@hidden>
* simple.el (line-move): If auto-hscroll-mode is disabled and the
=== modified file 'lisp/startup.el'
--- a/lisp/startup.el 2011-09-29 08:16:15 +0000
+++ b/lisp/startup.el 2011-09-30 13:21:29 +0000
@@ -2307,23 +2307,26 @@
;; abort later.
(unless (frame-live-p (selected-frame)) (kill-emacs nil))))))
- (when initial-buffer-choice
- (cond ((eq initial-buffer-choice t)
- (switch-to-buffer (get-buffer-create "*scratch*")))
- ((stringp initial-buffer-choice)
- (find-file initial-buffer-choice))))
+ (when (eq initial-buffer-choice t)
+ ;; When initial-buffer-choice equals t make sure that *scratch*
+ ;; exists.
+ (get-buffer-create "*scratch*"))
;; If *scratch* exists and is empty, insert initial-scratch-message.
+ ;; Do this before switching to *scratch* below to handle bug#9605.
(and initial-scratch-message
(get-buffer "*scratch*")
(with-current-buffer "*scratch*"
(when (zerop (buffer-size))
- ;; Insert before markers to make sure that window-point
- ;; appears at end of buffer when *scratch* is displayed
- ;; (Bug#9605).
- (insert-before-markers initial-scratch-message)
+ (insert initial-scratch-message)
(set-buffer-modified-p nil))))
+ (when initial-buffer-choice
+ (cond ((eq initial-buffer-choice t)
+ (switch-to-buffer (get-buffer-create "*scratch*")))
+ ((stringp initial-buffer-choice)
+ (find-file initial-buffer-choice))))
+
(if (or inhibit-startup-screen
initial-buffer-choice
noninteractive
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r105966: Insert initial-scratch-message before displaying *scratch*. (Bug#9636),
martin rudalics <=