emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 0ffa349: Better check for displaying completions ne


From: Juri Linkov
Subject: [Emacs-diffs] master 0ffa349: Better check for displaying completions near the minibuffer.
Date: Fri, 05 Dec 2014 23:42:19 +0000

branch: master
commit 0ffa34951a2c45afa7857b7a970459d0189b4313
Author: Juri Linkov <address@hidden>
Commit: Juri Linkov <address@hidden>

    Better check for displaying completions near the minibuffer.
    
    * lisp/minibuffer.el (minibuffer-completion-help): Compare
    selected-window with minibuffer-window to check whether
    completions should be displayed near the minibuffer.
    http://lists.gnu.org/archive/html/emacs-devel/2014-12/msg00311.html
    
    Fixes: debbugs:17809
---
 lisp/ChangeLog     |    7 +++++++
 lisp/minibuffer.el |   10 +++-------
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 7cbacec..5cc530c 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
+2014-12-05  Juri Linkov  <address@hidden>
+
+       * minibuffer.el (minibuffer-completion-help): Compare
+       selected-window with minibuffer-window to check whether
+       completions should be displayed near the minibuffer.  (Bug#17809)
+       http://lists.gnu.org/archive/html/emacs-devel/2014-12/msg00311.html
+
 2014-12-05  Michael Albinus  <address@hidden>
 
        * vc/vc-mtn.el (vc-mtn-root):
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index 0bee13b..ee97174 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -1815,13 +1815,9 @@ variables.")
              ;; Use `display-buffer-below-selected' for inline completions,
              ;; but not in the minibuffer (e.g. in `eval-expression')
              ;; for which `display-buffer-at-bottom' is used.
-             ;; Compare `this-command' with `completion-at-point'
-             ;; since `completion--in-region-1' sets `this-command'
-             ;; to this value for region completion commands.
-             ,(if (and (eq this-command 'completion-at-point)
-                       (not (minibuffer-selected-window)))
-                  'display-buffer-below-selected
-                'display-buffer-at-bottom))
+             ,(if (eq (selected-window) (minibuffer-window))
+                  'display-buffer-at-bottom
+                'display-buffer-below-selected))
             (window-height . fit-window-to-buffer))
           nil
           ;; Remove the base-size tail because `sort' requires a properly



reply via email to

[Prev in Thread] Current Thread [Next in Thread]