]> code.delx.au - gnu-emacs/blobdiff - lisp/icomplete.el
Merge from emacs-24; up to 2012-12-06T01:39:03Z!monnier@iro.umontreal.ca
[gnu-emacs] / lisp / icomplete.el
index 08d8c28816f88a1e732ccdd26310c414b7cc3093..0493a5b49e87c58b8b1dda1f6095f5838a5c834d 100644 (file)
@@ -1,7 +1,7 @@
 ;;; icomplete.el --- minibuffer completion incremental feedback
 
-;; Copyright (C) 1992-1994, 1997, 1999, 2001-2012
-;;   Free Software Foundation, Inc.
+;; Copyright (C) 1992-1994, 1997, 1999, 2001-2013 Free Software
+;; Foundation, Inc.
 
 ;; Author: Ken Manheimer <klm@i.am>
 ;; Maintainer: Ken Manheimer <klm@i.am>
@@ -337,8 +337,10 @@ are exhibited within the square braces.)"
                                ((= compare (length name))
                                  ;; Typical case: name is a prefix.
                                 (substring most compare))
-                               ((< compare 5) most)
-                               (t (concat "..." (substring most compare))))
+                                ;; Don't bother truncating if it doesn't gain
+                                ;; us at least 2 columns.
+                               ((< compare 3) most)
+                               (t (concat "…" (substring most compare))))
                               close-bracket)))
             ;;"-prospects" - more than one candidate
             (prospects-len (+ (length determ) 6 ;; take {,...} into account