emacs-pretest-bug
[Top][All Lists]
Advanced

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

lisp-complete-symbol is too loquacious in minibuffer


From: Katsumi Yamaoka
Subject: lisp-complete-symbol is too loquacious in minibuffer
Date: Wed, 21 Dec 2005 15:10:43 +0900
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

Hi,

When I perform eval-expression in the minibuffer and complete
some lisp symbol using the M-TAB key, the result is hidden by
the message "Making completion list...done" for a while.  That
is annoying.  It doesn't occur when I perform find-file, etc.
Could it be modified as the following?  Thanks in advance.

--- lisp.el~    2005-12-10 11:39:24 +0000
+++ lisp.el     2005-12-21 06:08:50 +0000
@@ -574,23 +574,27 @@
                 (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")))))))
+              (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))
+                    (delete-windows-on "*Completions*")))
+                (unless minibuf-is-in-use
+                  (message "Making completion list...%s" "done")))))))))
 
 ;;; arch-tag: aa7fa8a4-2e6f-4e9b-9cd9-fef06340e67e
 ;;; lisp.el ends here




reply via email to

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