Commit 162660c3 authored by Juri Linkov's avatar Juri Linkov

Avoid duplicate calls of window-height in with-displayed-buffer-window

* lisp/minibuffer.el (minibuffer-completion-help):
Use shrink-window-if-larger-than-buffer in window-height
when temp-buffer-resize-mode is nil.

* lisp/window.el (with-displayed-buffer-window): Remove window-height
from the action alist in the temp-buffer-window-show call
when window-height is handled explicitly afterwards.

Fixes: debbugs:19355
parent d5145924
2014-12-27 Juri Linkov <juri@linkov.net>
* minibuffer.el (minibuffer-completion-help):
Use shrink-window-if-larger-than-buffer in window-height
when temp-buffer-resize-mode is nil.
* window.el (with-displayed-buffer-window): Remove window-height
from the action alist in the temp-buffer-window-show call
when window-height is handled explicitly afterwards (bug#19355).
2014-12-27 Juri Linkov <juri@linkov.net>
Support subdirectories when saving places in dired.
......
......@@ -1818,8 +1818,9 @@ variables.")
,(if (eq (selected-window) (minibuffer-window))
'display-buffer-at-bottom
'display-buffer-below-selected))
,(when temp-buffer-resize-mode
'(window-height . resize-temp-buffer-window))
,(if temp-buffer-resize-mode
'(window-height . resize-temp-buffer-window)
'(window-height . shrink-window-if-larger-than-buffer))
,(when temp-buffer-resize-mode
'(preserve-size . (nil . t))))
nil
......
......@@ -237,7 +237,12 @@ displays the buffer specified by BUFFER-OR-NAME before running BODY."
(standard-output ,buffer)
,window ,value)
(with-current-buffer ,buffer
(setq ,window (temp-buffer-window-show ,buffer ,vaction)))
(setq ,window (temp-buffer-window-show
,buffer
;; Remove window-height when it's handled below.
(if (functionp (cdr (assq 'window-height (cdr ,vaction))))
(assq-delete-all 'window-height (copy-sequence ,vaction))
,vaction))))
(let ((inhibit-read-only t)
(inhibit-modification-hooks t))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment