changeset 72574:1b6faf513fc3

(normal-splash-screen, fancy-splash-screens): Make buffer read-only and arrange to enter view mode if necessary.
author Romain Francoise <romain@orebokech.com>
date Tue, 29 Aug 2006 16:11:26 +0000
parents fd926d483a42
children 2cc5d85e63a1
files lisp/ChangeLog lisp/startup.el
diffstat 2 files changed, 14 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Tue Aug 29 14:00:27 2006 +0000
+++ b/lisp/ChangeLog	Tue Aug 29 16:11:26 2006 +0000
@@ -1,3 +1,8 @@
+2006-08-29  Romain Francoise  <romain@orebokech.com>
+
+	* startup.el (normal-splash-screen, fancy-splash-screens): Make
+	buffer read-only and arrange to enter view mode if necessary.
+
 2006-08-29  Chong Yidong  <cyd@stupidchicken.com>
 
 	* hl-line.el (hl-line): New face.
@@ -47,7 +52,7 @@
 
 2006-08-28  Kim F. Storm  <storm@cua.dk>
 
-	* find-dired.el	(find-dired): Use shell-quote-argument to properly
+	* find-dired.el (find-dired): Use shell-quote-argument to properly
 	escape ( and ) args.  Also use it on {} and ; args in default
 	value of find-ls-option string.
 	(find-grep-dired): Use shell-quote-argument on {} and ; args.
--- a/lisp/startup.el	Tue Aug 29 14:00:27 2006 +0000
+++ b/lisp/startup.el	Tue Aug 29 16:11:26 2006 +0000
@@ -1391,6 +1391,7 @@
 	    (window-dedicated-p (selected-window)))
 	(pop-to-buffer (current-buffer))
       (switch-to-buffer "GNU Emacs"))
+    (setq buffer-read-only nil)
     (erase-buffer)
     (if pure-space-overflow
 	(insert "\
@@ -1402,6 +1403,9 @@
 	(apply #'fancy-splash-insert text))
       (fancy-splash-tail)
       (set-buffer-modified-p nil)
+      (setq buffer-read-only t)
+      (if (and view-read-only (not view-mode))
+	  (view-mode-enter nil 'kill-buffer))
       (goto-char (point-min)))))
 
 (defun fancy-splash-frame ()
@@ -1438,6 +1442,7 @@
   (let ((prev-buffer (current-buffer)))
     (unwind-protect
 	(with-current-buffer (get-buffer-create "GNU Emacs")
+	  (setq buffer-read-only nil)
 	  (erase-buffer)
 	  (set (make-local-variable 'tab-width) 8)
 	  (if hide-on-input
@@ -1577,6 +1582,9 @@
 
           ;; Display the input that we set up in the buffer.
           (set-buffer-modified-p nil)
+	  (setq buffer-read-only t)
+	  (if (and view-read-only (not view-mode))
+	      (view-mode-enter nil 'kill-buffer))
           (goto-char (point-min))
 	  (if (or (window-minibuffer-p)
 		  (window-dedicated-p (selected-window)))