changeset 4136:db22824aa020

[xemacs-hg @ 2007-08-22 07:15:24 by michaels] 2007-08-20 Mike Sperber <mike@xemacs.org> * window-xemacs.el (root-window->saved-window): (restore-saved-window-parameters): Don't save the point of the current buffer, as per the docstring.
author michaels
date Wed, 22 Aug 2007 07:15:29 +0000
parents cee641a27bba
children 1ce0622a56a3
files lisp/ChangeLog lisp/window-xemacs.el
diffstat 2 files changed, 13 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Tue Aug 21 21:51:14 2007 +0000
+++ b/lisp/ChangeLog	Wed Aug 22 07:15:29 2007 +0000
@@ -1,3 +1,9 @@
+2007-08-20  Mike Sperber  <mike@xemacs.org>
+
+	* window-xemacs.el (root-window->saved-window): 
+	(restore-saved-window-parameters): Don't save the point of the
+	current buffer, as per the docstring.
+
 2007-08-21  Aidan Kehoe  <kehoea@parhasard.net>
 
 	* mule/vietnamese.el ("Vietnamese"): Remove vscii and viqr from
--- a/lisp/window-xemacs.el	Tue Aug 21 21:51:14 2007 +0000
+++ b/lisp/window-xemacs.el	Wed Aug 22 07:15:29 2007 +0000
@@ -278,11 +278,10 @@
 	      (let ((marker (make-marker)))
 		(set-marker marker (window-start window) buffer)
 		(setf (saved-window-start-marker saved-window) marker))
-	      (let ((marker (make-marker)))
-		(if (eq window (selected-window))
-		    (set-marker marker (point buffer) buffer)
-		  (set-marker marker (window-point window) buffer))
-		(setf (saved-window-point-marker saved-window) marker))
+	      (if (not (eq buffer (current-buffer)))
+		  (let ((marker (make-marker)))
+		    (set-marker marker (window-point window) buffer)
+		    (setf (saved-window-point-marker saved-window) marker)))
 	      (setf (saved-window-mark-marker saved-window)
 		    (copy-marker (mark-marker t buffer)))))
 	saved-window))))
@@ -417,8 +416,9 @@
 	  (set-window-start window
 			    (marker-position (saved-window-start-marker saved-window))
 			    t)
-	  (set-window-point window
-			    (marker-position (saved-window-point-marker saved-window)))
+	  (if (markerp (saved-window-point-marker saved-window))
+	      (set-window-point window
+				(marker-position (saved-window-point-marker saved-window))))
 	  (set-marker (mark-marker t buffer)
 		      (marker-position (saved-window-mark-marker saved-window))
 		      buffer)