]> git.eshelyaron.com Git - emacs.git/commitdiff
Use quit-restore-window to leave completions window.
authorMartin Rudalics <rudalics@gmx.at>
Mon, 15 Nov 2010 16:33:28 +0000 (17:33 +0100)
committerMartin Rudalics <rudalics@gmx.at>
Mon, 15 Nov 2010 16:33:28 +0000 (17:33 +0100)
* minibuffer.el (minibuffer-completion-help): Don't mark window
as dedicated, the quit-restore parameter should take care of
deleting the window.
(minibuffer-hide-completions): Use quit-restore-window instead
of bury-buffer.

lisp/ChangeLog
lisp/minibuffer.el

index 0ce03b5988e644736e51a3a9ee425b50ec5c4918..43dfa195cc688ffe75de160d6012a3955376e681 100644 (file)
@@ -1,5 +1,11 @@
 2010-11-15  Martin Rudalics  <rudalics@gmx.at>
 
+       * minibuffer.el (minibuffer-completion-help): Don't mark window
+       as dedicated, the quit-restore parameter should take care of
+       deleting the window.
+       (minibuffer-hide-completions): Use quit-restore-window instead
+       of bury-buffer.
+
        * window.el (display-buffer-split-window-1): Remove max-size
        argument and corresponding code.
        (display-buffer-split-window): Remove handling of max-height and
index 0275dc1923b5ce9fe6599f4e5907b73b42e1aca9..a122292bdb98bf8210fa1969ebea553173ae5f15 100644 (file)
@@ -1145,12 +1145,7 @@ variables.")
              (or (consp (cdr completions))
                  (not (equal (car completions) string))))
         (let* ((last (last completions))
-               (base-size (cdr last))
-               ;; If the *Completions* buffer is shown in a new
-               ;; window, mark it as softly-dedicated, so bury-buffer in
-               ;; minibuffer-hide-completions will know whether to
-               ;; delete the window or not.
-               (display-buffer-mark-dedicated 'soft))
+               (base-size (cdr last)))
           (with-output-to-temp-buffer "*Completions*"
             ;; Remove the base-size tail because `sort' requires a properly
             ;; nil-terminated list.
@@ -1186,7 +1181,7 @@ variables.")
   ;; FIXME: We could/should use minibuffer-scroll-window here, but it
   ;; can also point to the minibuffer-parent-window, so it's a bit tricky.
   (let ((win (get-buffer-window "*Completions*" 0)))
-    (if win (with-selected-window win (bury-buffer)))))
+    (if win (quit-restore-window win))))
 
 (defun exit-minibuffer ()
   "Terminate this minibuffer argument."