From: Romain Francoise Date: Tue, 29 Aug 2006 16:11:26 +0000 (+0000) Subject: (normal-splash-screen, fancy-splash-screens): Make buffer read-only and X-Git-Tag: emacs-pretest-22.0.90~830 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0832681690ad4705cc57d6c490d0175d699bd6f6;p=emacs.git (normal-splash-screen, fancy-splash-screens): Make buffer read-only and arrange to enter view mode if necessary. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c14eb65d15e..b628594097d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2006-08-29 Romain Francoise + + * 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 * hl-line.el (hl-line): New face. @@ -47,7 +52,7 @@ 2006-08-28 Kim F. Storm - * 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. diff --git a/lisp/startup.el b/lisp/startup.el index 9cff91077b0..2ef216892b4 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -1391,6 +1391,7 @@ mouse." (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 @@ Warning Warning!!! Pure space overflow !!!Warning Warning (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 @@ we put it on this frame." (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 @@ Type \\[describe-distribution] for information on getting the latest version.")) ;; 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)))