]> code.delx.au - gnu-emacs/blobdiff - lisp/icomplete.el
Fix spelling errors.
[gnu-emacs] / lisp / icomplete.el
index ca94ca0d3db0fba2c62e426734d3de988cea6c72..f53ef7c91d17c93dac17a25fd88a541f8d8f59e5 100644 (file)
@@ -1,7 +1,7 @@
 ;;; icomplete.el --- minibuffer completion incremental feedback
 
-;; Copyright (C) 1992, 1993, 1994, 1997, 1999, 2001, 2005
-;;   Free Software Foundation, Inc.
+;; Copyright (C) 1992, 1993, 1994, 1997, 1999, 2001, 2002, 2003,
+;;   2004, 2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Ken Manheimer <klm@i.am>
 ;; Maintainer: Ken Manheimer <klm@i.am>
@@ -23,8 +23,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Commentary:
 
@@ -146,7 +146,7 @@ is minibuffer."
   (if (commandp func-name)
     (save-excursion
       (let* ((sym (intern func-name))
-            (buf (other-buffer))
+            (buf (other-buffer nil t))
             (map (save-excursion (set-buffer buf) (current-local-map)))
             (keys (where-is-internal sym map)))
        (if keys
@@ -243,13 +243,15 @@ and `minibuffer-setup-hook'."
                ;; embarking on computing completions:
                (sit-for icomplete-compute-delay)))
          (let ((text (while-no-input
-                       (icomplete-completions
-                        (field-string)
-                        minibuffer-completion-table
-                        minibuffer-completion-predicate
-                        (not minibuffer-completion-confirm))))
+                       (list
+                        (icomplete-completions
+                         (field-string)
+                         minibuffer-completion-table
+                         minibuffer-completion-predicate
+                         (not minibuffer-completion-confirm)))))
                (buffer-undo-list t))
-           (if text (insert text)))))))
+           ;; Do nothing if while-no-input was aborted.
+           (if (consp text) (insert (car text))))))))
 
 ;;;_ > icomplete-completions (name candidates predicate require-match)
 (defun icomplete-completions (name candidates predicate require-match)
@@ -323,7 +325,7 @@ are exhibited within the square braces.)"
 
 ;;;_* Local emacs vars.
 ;;;Local variables:
-;;;outline-layout: (-2 :)
+;;;allout-layout: (-2 :)
 ;;;End:
 
 ;; arch-tag: 339ec25a-0741-4eb6-be63-997532e89b0f