Mercurial > emacs
comparison lisp/rsz-mini.el @ 18418:da941474d947
Update copyright year.
Put back RCS version comment string, which rms keeps removing.
Don't call resize-minibuffer-mode at load time.
Don't modify minibuffer-setup-hook at load time.
(resize-minibuffer-mode): Add resize-minibuffer-setup to
minibuffer-setup-hook.
author | Noah Friedman <friedman@splode.com> |
---|---|
date | Mon, 23 Jun 1997 08:21:26 +0000 |
parents | 43e483167dd3 |
children | 9b78b337e8bf |
comparison
equal
deleted
inserted
replaced
18417:9a272a7dae12 | 18418:da941474d947 |
---|---|
1 ;;; rsz-mini.el --- dynamically resize minibuffer to display entire contents | 1 ;;; rsz-mini.el --- dynamically resize minibuffer to display entire contents |
2 | 2 |
3 ;; Copyright (C) 1990, 1993, 1994, 1995 Free Software Foundation, Inc. | 3 ;; Copyright (C) 1990, 1993, 1994, 1995, 1997 Free Software Foundation, Inc. |
4 | 4 |
5 ;; Author: Noah Friedman <friedman@prep.ai.mit.edu> | 5 ;; Author: Noah Friedman <friedman@prep.ai.mit.edu> |
6 ;; Roland McGrath <roland@prep.ai.mit.edu> | 6 ;; Roland McGrath <roland@prep.ai.mit.edu> |
7 ;; Maintainer: friedman@prep.ai.mit.edu | 7 ;; Maintainer: friedman@prep.ai.mit.edu |
8 ;; Keywords: minibuffer, window, frame, display | 8 ;; Keywords: minibuffer, window, frame, display |
9 | |
10 ;; $Id$ | |
9 | 11 |
10 ;; This file is part of GNU Emacs. | 12 ;; This file is part of GNU Emacs. |
11 | 13 |
12 ;; GNU Emacs is free software; you can redistribute it and/or modify | 14 ;; GNU Emacs is free software; you can redistribute it and/or modify |
13 ;; it under the terms of the GNU General Public License as published by | 15 ;; it under the terms of the GNU General Public License as published by |
56 | 58 |
57 | 59 |
58 (defgroup resize-minibuffer nil | 60 (defgroup resize-minibuffer nil |
59 "Dynamically resize minibuffer to display entire contents" | 61 "Dynamically resize minibuffer to display entire contents" |
60 :group 'frames) | 62 :group 'frames) |
61 | |
62 | 63 |
63 ;;;###autoload | 64 ;;;###autoload |
64 (defcustom resize-minibuffer-mode nil | 65 (defcustom resize-minibuffer-mode nil |
65 "*If non-`nil', resize the minibuffer so its entire contents are visible." | 66 "*If non-`nil', resize the minibuffer so its entire contents are visible." |
66 :type 'boolean | 67 :type 'boolean |
141 (or prefix (setq prefix 0)) | 142 (or prefix (setq prefix 0)) |
142 (cond | 143 (cond |
143 ((>= prefix 0) | 144 ((>= prefix 0) |
144 (setq resize-minibuffer-mode t)) | 145 (setq resize-minibuffer-mode t)) |
145 (t | 146 (t |
146 (setq resize-minibuffer-mode nil)))) | 147 (setq resize-minibuffer-mode nil))) |
148 (add-hook 'minibuffer-setup-hook 'resize-minibuffer-setup)) | |
147 | 149 |
148 (defun resize-minibuffer-setup () | 150 (defun resize-minibuffer-setup () |
149 (cond | 151 (cond |
150 (resize-minibuffer-mode | 152 (resize-minibuffer-mode |
151 (cond | 153 (cond |
258 (defun resize-minibuffer-frame-restore () | 260 (defun resize-minibuffer-frame-restore () |
259 (set-frame-size (window-frame (minibuffer-window)) | 261 (set-frame-size (window-frame (minibuffer-window)) |
260 (frame-width) | 262 (frame-width) |
261 resize-minibuffer-frame-original-height)) | 263 resize-minibuffer-frame-original-height)) |
262 | 264 |
263 | |
264 (provide 'rsz-mini) | 265 (provide 'rsz-mini) |
265 | 266 |
266 (add-hook 'minibuffer-setup-hook 'resize-minibuffer-setup) | |
267 (resize-minibuffer-mode) | |
268 | |
269 ;; rsz-mini.el ends here | 267 ;; rsz-mini.el ends here |