Mercurial > hg > xemacs-beta
comparison lisp/prim/window.el @ 82:6a378aca36af r20-0b91
Import from CVS: tag r20-0b91
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:07:36 +0200 |
parents | 131b0175ea99 |
children | 538048ae2ab8 |
comparison
equal
deleted
inserted
replaced
81:ebca3d831cea | 82:6a378aca36af |
---|---|
292 (> (nth 1 edges) | 292 (> (nth 1 edges) |
293 ;FSFmacs (frame-property (window-frame window) | 293 ;FSFmacs (frame-property (window-frame window) |
294 ; 'menu-bar-lines params) | 294 ; 'menu-bar-lines params) |
295 0))) | 295 0))) |
296 (unwind-protect | 296 (unwind-protect |
297 (progn | 297 (let ((shrinkee (or window w))) |
298 (select-window (or window w)) | 298 (set-buffer (window-buffer shrinkee)) |
299 (goto-char (point-min)) | 299 (goto-char (point-min)) |
300 (while (pos-visible-in-window-p | 300 (while (pos-visible-in-window-p |
301 (- (point-max) | 301 (- (point-max) |
302 (if ignore-final-newline 1 0))) | 302 (if ignore-final-newline 1 0)) |
303 shrinkee) | |
303 ;; defeat file locking... don't try this at home, kids! | 304 ;; defeat file locking... don't try this at home, kids! |
304 (setq buffer-file-name nil) | 305 (setq buffer-file-name nil) |
305 (insert ?\n) (setq n (1+ n))) | 306 (insert ?\n) (setq n (1+ n))) |
306 (if (> n 0) | 307 (if (> n 0) |
307 (shrink-window (min (1- n) | 308 (shrink-window (min (1- n) |
308 (- (window-height) | 309 (- (window-height shrinkee) |
309 window-min-height))))) | 310 window-min-height)) |
311 nil | |
312 shrinkee))) | |
310 (delete-region (point-min) (point)) | 313 (delete-region (point-min) (point)) |
311 (set-buffer-modified-p modified) | 314 (set-buffer-modified-p modified) |
312 (goto-char p) | 315 (goto-char p) |
313 (select-window w) | |
314 ;; Make sure we unbind buffer-read-only | 316 ;; Make sure we unbind buffer-read-only |
315 ;; with the proper current buffer. | 317 ;; with the proper current buffer. |
316 (set-buffer buffer)))))) | 318 (set-buffer buffer)))))) |
317 | 319 |
318 (defun backward-other-window (arg &optional all-frames device) | 320 (defun backward-other-window (arg &optional all-frames device) |