Subject: Re: bug#12855: 24.2; The Messages buffer stops following the appended lines.

From: martin rudalics <[email-masked]>
Date: Mon, 12 Nov 2012 18:32:01 +0100

>> -	(let ((start (window-start window))
 >> -	      (point (window-point window)))
 >> -	  (setq entry
 >> -		(cons buffer
 >> -		      (if entry
 >> -			  ;; We have an entry, update marker positions.
 >> -			  (list (set-marker (nth 1 entry) start)
 >> -				(set-marker (nth 2 entry) point))
 >> -			;; Make new markers.
 >> -			(list (copy-marker start)
 >> -			      (copy-marker point)))))
 >> -
 >> +	(let* ((start
 >> +		(if entry
 >> +		    (set-marker (nth 1 entry) (window-start window))
 >> +		  (copy-marker (window-start window))))
 >> +	       (point
 >> +		(if entry
 >> +		    (set-marker (nth 2 entry) (window-point window))
 >> +		  (copy-marker
 >> +		   ;; Preserve window-point-insertion-type (Bug#12855).
 >> +		   (window-point) window-point-insertion-type))))
 >>  	  (set-window-prev-buffers
 >> -	   window (cons entry (window-prev-buffers window))))))))
 >> +	   window
 >> +	   (cons (list buffer start point)
 >> +		 (window-prev-buffers window))))))))
 >
 > I don't understand why you massaged the code this way instead of just
 > adding window-point-insertion-type to the last copy-marker call, but
 > I presume there's a good reason.

Probably not.  Do you think the old version was more readable?

martin