1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-29 07:58:28 +00:00

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
This commit is contained in:
Juri Linkov 2014-12-27 02:54:56 +02:00
parent d51459246b
commit 162660c363
3 changed files with 19 additions and 3 deletions

View File

@ -1,3 +1,13 @@
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.

View File

@ -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

View File

@ -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))