]> code.delx.au - gnu-emacs/blobdiff - lisp/icomplete.el
In vc actions use quit-windows-on instead of delete-windows-on.
[gnu-emacs] / lisp / icomplete.el
index 7f395019825a38df662555c46d51c1a7c9f4d6b6..bdd19194c22b1a0a67db05e761e368dbb830ea8c 100644 (file)
@@ -1,7 +1,7 @@
 ;;; icomplete.el --- minibuffer completion incremental feedback
 
-;; Copyright (C) 1992, 1993, 1994, 1997, 1999, 2001, 2002, 2003,
-;;   2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+;; Copyright (C) 1992-1994, 1997, 1999, 2001-2011
+;;   Free Software Foundation, Inc.
 
 ;; Author: Ken Manheimer <klm@i.am>
 ;; Maintainer: Ken Manheimer <klm@i.am>
@@ -78,7 +78,8 @@
   (+ 1 (/ (+ icomplete-prospects-length 20) (window-width)))
   "Maximum number of lines to use in the minibuffer."
   :type 'integer
-  :group 'icomplete)
+  :group 'icomplete
+  :version "23.1")
 
 (defcustom icomplete-compute-delay .3
   "Completions-computation stall, used only with large-number completions.
@@ -205,6 +206,7 @@ Conditions are:
   "Run in minibuffer on activation to establish incremental completion.
 Usually run by inclusion in `minibuffer-setup-hook'."
   (when (and icomplete-mode (icomplete-simple-completing-p))
+    (set (make-local-variable 'completion-show-inline-help) nil)
     (add-hook 'pre-command-hook
              (lambda () (run-hooks 'icomplete-pre-command-hook))
              nil t)
@@ -282,7 +284,9 @@ The displays for unambiguous matches have ` [Matched]' appended
 matches exist.  \(Keybindings for uniquely matched commands
 are exhibited within the square braces.)"
 
-  (let* ((comps (completion-all-sorted-completions))
+  (let* ((non-essential t)
+         (md (completion--field-metadata (field-beginning)))
+        (comps (completion-all-sorted-completions))
          (last (if (consp comps) (last comps)))
          (base-size (cdr last))
          (open-bracket (if require-match "(" "["))
@@ -294,11 +298,11 @@ are exhibited within the square braces.)"
       (let* ((most-try
               (if (and base-size (> base-size 0))
                   (completion-try-completion
-                   name candidates predicate (length name))
+                   name candidates predicate (length name) md)
                 ;; If the `comps' are 0-based, the result should be
                 ;; the same with `comps'.
                 (completion-try-completion
-                 name comps nil (length name))))
+                 name comps nil (length name) md)))
             (most (if (consp most-try) (car most-try)
                      (if most-try (car comps) "")))
              ;; Compare name and most, so we can determine if name is
@@ -374,5 +378,4 @@ are exhibited within the square braces.)"
 ;;allout-layout: (-2 :)
 ;;End:
 
-;; arch-tag: 339ec25a-0741-4eb6-be63-997532e89b0f
 ;;; icomplete.el ends here