aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2012-12-17 14:43:55 -0500
committerStefan Monnier2012-12-17 14:43:55 -0500
commit2387610d2bf5f6da3f3f7dc9e2f86f72405be78c (patch)
tree9f7b97f54540b77f032f5823dda497bc3e4749a1
parent1e101a4be420878653f42a9f5e105adfb6690229 (diff)
downloademacs-2387610d2bf5f6da3f3f7dc9e2f86f72405be78c.tar.gz
emacs-2387610d2bf5f6da3f3f7dc9e2f86f72405be78c.zip
* lisp/icomplete.el (icomplete-completions): Also use … to truncate prefix.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/icomplete.el6
2 files changed, 8 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 464ff7e084a..9d05f2fcc26 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
12012-12-17 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * icomplete.el (icomplete-completions): Also use … to truncate prefix.
4
12012-12-17 Kevin Ryde <user42@zip.com.au> 52012-12-17 Kevin Ryde <user42@zip.com.au>
2 6
3 * files.el (auto-save-file-name-p): Use \` and \' (bug#13186). 7 * 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.)"
337 ((= compare (length name)) 337 ((= compare (length name))
338 ;; Typical case: name is a prefix. 338 ;; Typical case: name is a prefix.
339 (substring most compare)) 339 (substring most compare))
340 ((< compare 5) most) 340 ;; Don't bother truncating if it doesn't gain
341 (t (concat "..." (substring most compare)))) 341 ;; us at least 2 columns.
342 ((< compare 3) most)
343 (t (concat "…" (substring most compare))))
342 close-bracket))) 344 close-bracket)))
343 ;;"-prospects" - more than one candidate 345 ;;"-prospects" - more than one candidate
344 (prospects-len (+ (length determ) 6 ;; take {,...} into account 346 (prospects-len (+ (length determ) 6 ;; take {,...} into account