diff options
author | Karoly Lorentey <lorentey@elte.hu> | 2005-12-29 04:41:02 +0000 |
---|---|---|
committer | Karoly Lorentey <lorentey@elte.hu> | 2005-12-29 04:41:02 +0000 |
commit | e583523a108624f7fd0c28294010b19daae5ab97 (patch) | |
tree | 6bbb60c1f603809ca8980a459e0c4ed6d2c02378 /lisp/emacs-lisp/lisp.el | |
parent | da8e8fc14f3166ec596e34f43fbfea866d1176df (diff) | |
parent | d52c26e925297a2d1663e2293d46ce95e91c4689 (diff) | |
download | emacs-e583523a108624f7fd0c28294010b19daae5ab97.tar.gz emacs-e583523a108624f7fd0c28294010b19daae5ab97.tar.bz2 emacs-e583523a108624f7fd0c28294010b19daae5ab97.zip |
Merged from miles@gnu.org--gnu-2005 (patch 678-680)
Patches applied:
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-678
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-679
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-680
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-468
Diffstat (limited to 'lisp/emacs-lisp/lisp.el')
-rw-r--r-- | lisp/emacs-lisp/lisp.el | 55 |
1 files changed, 32 insertions, 23 deletions
diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el index 7aeb33a648e..30505c95223 100644 --- a/lisp/emacs-lisp/lisp.el +++ b/lisp/emacs-lisp/lisp.el @@ -569,28 +569,37 @@ 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 out of date. + (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<)) - (or (eq predicate 'fboundp) - (let (new) - (while list - (setq new (cons (if (fboundp (intern (car list))) - (list (car list) " <f>") - (car list)) - new)) - (setq list (cdr list))) - (setq list (nreverse new)))) - (if (> (length list) 1) - (with-output-to-temp-buffer "*Completions*" - (display-completion-list list pattern)) - (delete-windows-on "*Completions*"))) - (message "Making completion list...%s" "done"))))))) - -;;; arch-tag: aa7fa8a4-2e6f-4e9b-9cd9-fef06340e67e + (let ((minibuf-is-in-use + (eq (minibuffer-window) (selected-window)))) + (unless minibuf-is-in-use + (message "Making completion list...")) + (let ((list (all-completions pattern obarray predicate))) + (setq list (sort list 'string<)) + (or (eq predicate 'fboundp) + (let (new) + (while list + (setq new (cons (if (fboundp (intern (car list))) + (list (car list) " <f>") + (car list)) + new)) + (setq list (cdr list))) + (setq list (nreverse new)))) + (if (> (length list) 1) + (with-output-to-temp-buffer "*Completions*" + (display-completion-list list pattern)) + ;; Don't leave around a completions buffer that's + ;; out of date. + (let ((win (get-buffer-window "*Completions*" 0))) + (if win (with-selected-window win (bury-buffer)))))) + (unless minibuf-is-in-use + (message "Making completion list...%s" "done"))))))))) + +;; arch-tag: aa7fa8a4-2e6f-4e9b-9cd9-fef06340e67e ;;; lisp.el ends here |