diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2005-12-22 01:48:20 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2005-12-22 01:48:20 +0000 |
commit | c1b5a260d6b2625ada26904724294f5ff6ddac14 (patch) | |
tree | 6d40f6c11e83cdc1281aee479f27606c09910cf9 /lisp/emacs-lisp | |
parent | f29cf2b134b3f0492e552ca7b068b57da8e0b524 (diff) | |
download | emacs-c1b5a260d6b2625ada26904724294f5ff6ddac14.tar.gz emacs-c1b5a260d6b2625ada26904724294f5ff6ddac14.tar.bz2 emacs-c1b5a260d6b2625ada26904724294f5ff6ddac14.zip |
(lisp-complete-symbol): Mostly undo the change by Kevin Rodgers.
Instead, just hide the completions buffer if we don't need to show it.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/lisp.el | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el index 5d593ecb9fd..f8a5b0b019e 100644 --- a/lisp/emacs-lisp/lisp.el +++ b/lisp/emacs-lisp/lisp.el @@ -569,11 +569,13 @@ considered." ((null completion) (message "Can't find completion for \"%s\"" pattern) (ding)) + ((not (string= pattern completion)) + (delete-region beg end) + (insert completion) + ;; Don't leave around a completions buffer that's outofdate. + (let ((win (get-buffer-window "*Completions*" 0))) + (if win (with-selected-window win (bury-buffer))))) (t - (unless (string= completion pattern) - (delete-region beg end) - (insert completion) - (setq pattern completion)) (message "Making completion list...") (let ((list (all-completions pattern obarray predicate))) (setq list (sort list 'string<)) @@ -589,8 +591,9 @@ considered." (if (> (length list) 1) (with-output-to-temp-buffer "*Completions*" (display-completion-list list pattern)) - (if (get-buffer "*Completions*") - (delete-windows-on "*Completions*")))) + ;; Don't leave around a completions buffer that's outofdate. + (let ((win (get-buffer-window "*Completions*" 0))) + (if win (with-selected-window win (bury-buffer)))))) (message "Making completion list...%s" "done"))))))) ;; arch-tag: aa7fa8a4-2e6f-4e9b-9cd9-fef06340e67e |