Mercurial > hg > xemacs-beta
diff lisp/prim/window.el @ 16:0293115a14e9 r19-15b91
Import from CVS: tag r19-15b91
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:49:20 +0200 |
parents | 376386a54a3c |
children | 131b0175ea99 |
line wrap: on
line diff
--- a/lisp/prim/window.el Mon Aug 13 08:48:43 2007 +0200 +++ b/lisp/prim/window.el Mon Aug 13 08:49:20 2007 +0200 @@ -17,8 +17,9 @@ ;; General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; along with XEmacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. ;;; Synched up with: FSF 19.30. @@ -293,23 +294,25 @@ ; 'menu-bar-lines params) 0))) (unwind-protect - (progn - (select-window (or window w)) + (let ((shrinkee (or window w))) + (set-buffer (window-buffer shrinkee)) (goto-char (point-min)) (while (pos-visible-in-window-p (- (point-max) - (if ignore-final-newline 1 0))) + (if ignore-final-newline 1 0)) + shrinkee) ;; defeat file locking... don't try this at home, kids! (setq buffer-file-name nil) (insert ?\n) (setq n (1+ n))) (if (> n 0) (shrink-window (min (1- n) - (- (window-height) - window-min-height))))) + (- (window-height shrinkee) + window-min-height)) + nil + shrinkee))) (delete-region (point-min) (point)) (set-buffer-modified-p modified) (goto-char p) - (select-window w) ;; Make sure we unbind buffer-read-only ;; with the proper current buffer. (set-buffer buffer))))))