Mercurial > hg > xemacs-beta
comparison lisp/modes/rsz-minibuf.el @ 70:131b0175ea99 r20-0b30
Import from CVS: tag r20-0b30
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:02:59 +0200 |
parents | ec9a17fef872 |
children | 6a378aca36af |
comparison
equal
deleted
inserted
replaced
69:804d1389bcd6 | 70:131b0175ea99 |
---|---|
8 ;;; Modified for Lucid Emacs By: Peter Stout <pds@cs.cmu.edu> | 8 ;;; Modified for Lucid Emacs By: Peter Stout <pds@cs.cmu.edu> |
9 ;;; Maintainer: friedman@prep.ai.mit.edu | 9 ;;; Maintainer: friedman@prep.ai.mit.edu |
10 ;;; Keywords: minibuffer, window, frames, display | 10 ;;; Keywords: minibuffer, window, frames, display |
11 ;;; Status: Known to work in FSF GNU Emacs 19.23 and Lucid Emacs 19.9. | 11 ;;; Status: Known to work in FSF GNU Emacs 19.23 and Lucid Emacs 19.9. |
12 | 12 |
13 ;;; $Id: rsz-minibuf.el,v 1.3 1997/03/09 02:37:22 steve Exp $ | 13 ;;; $Id: rsz-minibuf.el,v 1.1.1.1 1996/12/18 22:42:48 steve Exp $ |
14 | 14 |
15 ;;; This program is free software; you can redistribute it and/or modify | 15 ;;; This program is free software; you can redistribute it and/or modify |
16 ;;; it under the terms of the GNU General Public License as published by | 16 ;;; it under the terms of the GNU General Public License as published by |
17 ;;; the Free Software Foundation; either version 2, or (at your option) | 17 ;;; the Free Software Foundation; either version 2, or (at your option) |
18 ;;; any later version. | 18 ;;; any later version. |
110 | 110 |
111 The variable `resize-minibuffer-window-exactly' determines whether the | 111 The variable `resize-minibuffer-window-exactly' determines whether the |
112 minibuffer window should ever be shrunk to make it no larger than needed to | 112 minibuffer window should ever be shrunk to make it no larger than needed to |
113 display its contents. | 113 display its contents. |
114 | 114 |
115 When using a window system, it is possible for a minibuffer to be the sole | 115 When using a window system, it is possible for a minibuffer to tbe the sole |
116 window in a frame. Since that window is already its maximum size, the only | 116 window in a frame. Since that window is already its maximum size, the only |
117 way to make more text visible at once is to increase the size of the frame. | 117 way to make more text visible at once is to increase the size of the frame. |
118 The variable `resize-minibuffer-frame' controls whether this should be | 118 The variable `resize-minibuffer-frame' controls whether this should be |
119 done. The variables `resize-minibuffer-frame-max-height' and | 119 done. The variables `resize-minibuffer-frame-max-height' and |
120 `resize-minibuffer-frame-exactly' are analogous to their window | 120 `resize-minibuffer-frame-exactly' are analogous to their window |
157 (progn | 157 (progn |
158 (make-local-hook 'minibuffer-exit-hook) | 158 (make-local-hook 'minibuffer-exit-hook) |
159 (add-hook 'minibuffer-exit-hook 'resize-minibuffer-frame-restore | 159 (add-hook 'minibuffer-exit-hook 'resize-minibuffer-frame-restore |
160 nil t) | 160 nil t) |
161 (make-local-hook 'post-command-hook) | 161 (make-local-hook 'post-command-hook) |
162 (add-hook 'post-command-hook 'resize-minibuffer-frame nil t) | 162 (add-hook 'post-command-hook 'resize-minibuffer-frame nil t)))) |
163 (unless (and (boundp 'icomplete-mode) | |
164 icomplete-mode) | |
165 (resize-minibuffer-frame))))) | |
166 (t | 163 (t |
167 (make-local-hook 'post-command-hook) | 164 (make-local-hook 'post-command-hook) |
168 (add-hook 'post-command-hook 'resize-minibuffer-window nil t) | 165 (add-hook 'post-command-hook 'resize-minibuffer-window nil t)))))) |
169 (unless (and (boundp 'icomplete-mode) | |
170 icomplete-mode) | |
171 (resize-minibuffer-window))))))) | |
172 | 166 |
173 (defun resize-minibuffer-count-window-lines (&optional start end) | 167 (defun resize-minibuffer-count-window-lines (&optional start end) |
174 "Return number of window lines occupied by text in region. | 168 "Return number of window lines occupied by text in region. |
175 The number of window lines may be greater than the number of actual lines | 169 The number of window lines may be greater than the number of actual lines |
176 in the buffer if any wrap on the display due to their length. | 170 in the buffer if any wrap on the display due to their length. |