;; GNU Emacs is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
"Where is command: ")
obarray 'commandp t))
(list (if (equal val "") fn (intern val)) current-prefix-arg)))
+ (unless definition (error "No command"))
(let ((func (indirect-function definition))
(defs nil)
(standard-output (if insert (current-buffer) t)))
(list
key
(prefix-numeric-value current-prefix-arg)
- ;; If KEY is a down-event, read and discard the
+ ;; If KEY is a down-event, read and include the
;; corresponding up-event. Note that there are also
;; down-events on scroll bars and mode lines: the actual
;; event then is in the second element of the vector.
(remove-hook 'temp-buffer-show-hook 'resize-temp-buffer-window)))
(defun resize-temp-buffer-window ()
- "Resize the current window to fit its contents.
+ "Resize the selected window to fit its contents.
Will not make it higher than `temp-buffer-max-height' nor smaller than
`window-min-height'. Do nothing if it is the only window on its frame, if it
is not as wide as the frame or if some of the window's contents are scrolled
out of view."
(unless (or (one-window-p 'nomini)
(not (pos-visible-in-window-p (point-min)))
- (/= (frame-width) (window-width)))
+ (not (window-full-width-p)))
(fit-window-to-buffer
(selected-window)
(if (functionp temp-buffer-max-height)