]> git.eshelyaron.com Git - emacs.git/commitdiff
In command-line-1 insert initial-scratch-message before markers (Bug#9605).
authorMartin Rudalics <rudalics@gmx.at>
Thu, 29 Sep 2011 08:16:15 +0000 (10:16 +0200)
committerMartin Rudalics <rudalics@gmx.at>
Thu, 29 Sep 2011 08:16:15 +0000 (10:16 +0200)
* startup.el (command-line-1): Use insert-before-markers when
inserting initial-scratch-message.  (Bug#9605)
* help.el (help-window): Remove variable.

lisp/ChangeLog
lisp/help.el
lisp/startup.el

index c8db50ac3bd57a54b66bbf7aa93c6551d2c30aba..a5d048247a7c65ff7f733718b7c34b0024ab9721 100644 (file)
@@ -1,3 +1,9 @@
+2011-09-29  Martin Rudalics  <rudalics@gmx.at>
+
+       * startup.el (command-line-1): Use insert-before-markers when
+       inserting initial-scratch-message.  (Bug#9605)
+       * help.el (help-window): Remove variable.
+
 2011-09-29  Glenn Morris  <rgm@gnu.org>
 
        * pcmpl-cvs.el (pcomplete/cvs): Add "status" handler.
index f4338c28ffbaf7675416b7b352ebc6db950e2985..e2af0759a65928698c9630bb51b15d7692dd70c0 100644 (file)
 (add-hook 'temp-buffer-setup-hook 'help-mode-setup)
 (add-hook 'temp-buffer-show-hook 'help-mode-finish)
 
-;; The variable `help-window' below is used by `help-mode-finish' to
-;; communicate the window displaying help (the "help window") to the
-;; macro `with-help-window'.  The latter sets `help-window' to t before
-;; invoking `with-output-to-temp-buffer'.  If and only if `help-window'
-;; is eq to t, `help-mode-finish' (called by `temp-buffer-setup-hook')
-;; sets `help-window' to the window selected by `display-buffer'.
-;; Exiting `with-help-window' and calling `help-print-return-message'
-;; reset `help-window' to nil.
-(defvar help-window nil
-  "Window chosen for displaying help.")
-
 ;; `help-window-point-marker' is a marker you can move to a valid
 ;; position of the buffer shown in the help window in order to override
 ;; the standard positioning mechanism (`point-min') chosen by
index 6c3bb397e9a1477626397d988a6ca2be5e439b8b..4e6f0af036892b8df897a617f2d6a39a58daba5d 100644 (file)
@@ -2318,7 +2318,10 @@ A fancy display is used on graphic displays, normal otherwise."
         (get-buffer "*scratch*")
         (with-current-buffer "*scratch*"
           (when (zerop (buffer-size))
-            (insert initial-scratch-message)
+            ;; 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)
             (set-buffer-modified-p nil))))
 
     (if (or inhibit-startup-screen