diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2009-11-19 22:05:40 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2009-11-19 22:05:40 +0000 |
commit | d2c9fc42316b567f20f59747a7aec940256517b8 (patch) | |
tree | 72df1ee57703d39829e1cc99a42a27027870a2c0 /lisp/minibuffer.el | |
parent | 31a1c4779ebf070fe4fabe06383b84a1938f900f (diff) | |
download | emacs-d2c9fc42316b567f20f59747a7aec940256517b8.tar.gz |
* window.el (display-buffer-mark-dedicated): New var.
(display-buffer): Obey it.
* minibuffer.el (minibuffer-completion-help): Use it.
Diffstat (limited to 'lisp/minibuffer.el')
-rw-r--r-- | lisp/minibuffer.el | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 472fd95ece2..fdf57f9a2f8 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -1004,9 +1004,14 @@ variables.") (if (and completions (or (consp (cdr completions)) (not (equal (car completions) string)))) - (with-output-to-temp-buffer "*Completions*" - (let* ((last (last completions)) - (base-size (cdr last))) + (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)) + (with-output-to-temp-buffer "*Completions*" ;; Remove the base-size tail because `sort' requires a properly ;; nil-terminated list. (when last (setcdr last nil)) @@ -1019,11 +1024,11 @@ variables.") (if ann (list s ann) s))) completions))) (with-current-buffer standard-output - (set (make-local-variable 'completion-base-position) - ;; FIXME: We should provide the END part as well, but - ;; currently completion-all-completions does not give - ;; us the necessary information. - (list (+ start base-size) nil))) + (set (make-local-variable 'completion-base-position) + ;; FIXME: We should provide the END part as well, but + ;; currently completion-all-completions does not give + ;; us the necessary information. + (list (+ start base-size) nil))) (display-completion-list completions))) ;; If there are no completions, or if the current input is already the |