From: Stefan Monnier Date: Mon, 17 Dec 2012 19:43:55 +0000 (-0500) Subject: * lisp/icomplete.el (icomplete-completions): Also use … to truncate prefix. X-Git-Tag: emacs-24.3.90~173^2~7^2~561 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2387610d2bf5f6da3f3f7dc9e2f86f72405be78c;p=emacs.git * lisp/icomplete.el (icomplete-completions): Also use … to truncate prefix. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 464ff7e084a..9d05f2fcc26 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2012-12-17 Stefan Monnier + + * icomplete.el (icomplete-completions): Also use … to truncate prefix. + 2012-12-17 Kevin Ryde * files.el (auto-save-file-name-p): Use \` and \' (bug#13186). diff --git a/lisp/icomplete.el b/lisp/icomplete.el index 08d8c28816f..5882accad85 100644 --- a/lisp/icomplete.el +++ b/lisp/icomplete.el @@ -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