Change SET-BUFFER-POINT! to change the first window that the buffer is
authorChris Hanson <org/chris-hanson/cph>
Sun, 18 May 1997 07:53:03 +0000 (07:53 +0000)
committerChris Hanson <org/chris-hanson/cph>
Sun, 18 May 1997 07:53:03 +0000 (07:53 +0000)
shown in if it is not the selected buffer.

v7/src/edwin/curren.scm

index e0401cf815d856291cedcea97ee03ec62727a6a4..4e8ff9f5fefd634aae367249395952497b364f96 100644 (file)
@@ -1,8 +1,8 @@
 ;;; -*-Scheme-*-
 ;;;
-;;;    $Id: curren.scm,v 1.121 1996/04/24 01:49:03 cph Exp $
+;;;    $Id: curren.scm,v 1.122 1997/05/18 07:53:03 cph Exp $
 ;;;
-;;;    Copyright (c) 1986, 1989-96 Massachusetts Institute of Technology
+;;;    Copyright (c) 1986, 1989-97 Massachusetts Institute of Technology
 ;;;
 ;;;    This material was developed by the Scheme project at the
 ;;;    Massachusetts Institute of Technology, Department of
@@ -536,7 +536,10 @@ The buffer is guaranteed to be selected at that time."
   (let ((window (selected-window)))
     (if (eq? buffer (window-buffer window))
        (set-window-point! window mark)
-       (%set-buffer-point! buffer mark))))
+       (let ((windows (buffer-windows buffer)))
+         (if (pair? windows)
+             (set-window-point! (car windows) mark)
+             (%set-buffer-point! buffer mark))))))
 
 (define (with-current-point point thunk)
   (let ((old-point))