comparison lisp/modes/rsz-minibuf.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 ec9a17fef872
comparison
equal deleted inserted replaced
15:ad457d5f7d04 16:0293115a14e9
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.1.1.1 1996/12/18 03:30:55 steve Exp $ 13 ;;; $Id: rsz-minibuf.el,v 1.2 1997/02/02 05:05:42 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.
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)))))
163 (t 166 (t
164 (make-local-hook 'post-command-hook) 167 (make-local-hook 'post-command-hook)
165 (add-hook 'post-command-hook 'resize-minibuffer-window nil t)))))) 168 (add-hook 'post-command-hook 'resize-minibuffer-window nil t)
169 (unless (and (boundp 'icomplete-mode)
170 icomplete-mode)
171 (resize-minibuffer-window)))))))
166 172
167 (defun resize-minibuffer-count-window-lines (&optional start end) 173 (defun resize-minibuffer-count-window-lines (&optional start end)
168 "Return number of window lines occupied by text in region. 174 "Return number of window lines occupied by text in region.
169 The number of window lines may be greater than the number of actual lines 175 The number of window lines may be greater than the number of actual lines
170 in the buffer if any wrap on the display due to their length. 176 in the buffer if any wrap on the display due to their length.