Mercurial > hg > xemacs-beta
comparison lisp/prim/frame.el @ 22:8fc7fe29b841 r19-15b94
Import from CVS: tag r19-15b94
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:50:29 +0200 |
parents | 0293115a14e9 |
children | ec9a17fef872 |
comparison
equal
deleted
inserted
replaced
21:b88636d63495 | 22:8fc7fe29b841 |
---|---|
1008 | 1008 |
1009 (if save-frame | 1009 (if save-frame |
1010 (append (list save-frame) frames) | 1010 (append (list save-frame) frames) |
1011 frames))) | 1011 frames))) |
1012 | 1012 |
1013 (defvar temp-buffer-shrink-to-fit t | |
1014 "*When non-nil resize temporary output buffers to minimize blank lines.") | |
1015 | |
1013 (defun show-temp-buffer-in-current-frame (buffer) | 1016 (defun show-temp-buffer-in-current-frame (buffer) |
1014 "For use as the value of temp-buffer-show-function: | 1017 "For use as the value of temp-buffer-show-function: |
1015 always displays the buffer in the current frame, regardless of the behavior | 1018 always displays the buffer in the current frame, regardless of the behavior |
1016 that would otherwise be introduced by the `pre-display-buffer-function', which | 1019 that would otherwise be introduced by the `pre-display-buffer-function', which |
1017 is normally set to `get-frame-for-buffer' (which see)." | 1020 is normally set to `get-frame-for-buffer' (which see)." |
1021 ;; only the pre-display-buffer-function should ever do this. | 1024 ;; only the pre-display-buffer-function should ever do this. |
1022 (error "display-buffer switched frames on its own!!")) | 1025 (error "display-buffer switched frames on its own!!")) |
1023 (setq minibuffer-scroll-window window) | 1026 (setq minibuffer-scroll-window window) |
1024 (set-window-start window 1) ; obeys narrowing | 1027 (set-window-start window 1) ; obeys narrowing |
1025 (set-window-point window 1) | 1028 (set-window-point window 1) |
1026 (shrink-window-if-larger-than-buffer window) | 1029 (when temp-buffer-shrink-to-fit |
1030 (shrink-window-if-larger-than-buffer window)) | |
1027 nil))) | 1031 nil))) |
1028 | 1032 |
1029 (setq pre-display-buffer-function 'get-frame-for-buffer) | 1033 (setq pre-display-buffer-function 'get-frame-for-buffer) |
1030 (setq temp-buffer-show-function 'show-temp-buffer-in-current-frame) | 1034 (setq temp-buffer-show-function 'show-temp-buffer-in-current-frame) |
1031 | 1035 |