diff options
| author | Stefan Monnier | 2013-12-14 09:24:36 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2013-12-14 09:24:36 -0500 |
| commit | aa2bddd73d8359ad944fde7c424d2d89c0ccf0d9 (patch) | |
| tree | ea48729c3004ca89943f882efdb5c8e652efb5a5 | |
| parent | 660efa1a1442306aa34378a5b0392075e9415d35 (diff) | |
| download | emacs-aa2bddd73d8359ad944fde7c424d2d89c0ccf0d9.tar.gz emacs-aa2bddd73d8359ad944fde7c424d2d89c0ccf0d9.zip | |
* lisp/icomplete.el (icomplete-completions): Make sure the prefix is already
displayed elsewhere before hiding it.
| -rw-r--r-- | lisp/ChangeLog | 20 | ||||
| -rw-r--r-- | lisp/icomplete.el | 22 |
2 files changed, 25 insertions, 17 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 62045b9cb64..129dde734ab 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2013-12-14 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * icomplete.el (icomplete-completions): Make sure the prefix is already | ||
| 4 | displayed elsewhere before hiding it. | ||
| 5 | |||
| 1 | 2013-12-14 Dmitry Gutov <dgutov@yandex.ru> | 6 | 2013-12-14 Dmitry Gutov <dgutov@yandex.ru> |
| 2 | 7 | ||
| 3 | * progmodes/ruby-mode.el (ruby-smie-rules): Return nil before | 8 | * progmodes/ruby-mode.el (ruby-smie-rules): Return nil before |
| @@ -9,12 +14,11 @@ | |||
| 9 | 2013-12-13 Teodor Zlatanov <tzz@lifelogs.com> | 14 | 2013-12-13 Teodor Zlatanov <tzz@lifelogs.com> |
| 10 | 15 | ||
| 11 | * progmodes/cfengine.el: Fix `add-hook' doc. | 16 | * progmodes/cfengine.el: Fix `add-hook' doc. |
| 12 | (cfengine-mode-syntax-functions-regex): | 17 | (cfengine-mode-syntax-functions-regex): Initialize sensibly. |
| 13 | Initialize sensibly. | ||
| 14 | (cfengine3--current-word): Fix parameters. | 18 | (cfengine3--current-word): Fix parameters. |
| 15 | (cfengine3-make-syntax-cache): Simplify further. | 19 | (cfengine3-make-syntax-cache): Simplify further. |
| 16 | (cfengine3-completion-function, cfengine3--current-function): Use | 20 | (cfengine3-completion-function, cfengine3--current-function): |
| 17 | `assq' for symbols. | 21 | Use `assq' for symbols. |
| 18 | (cfengine3--current-function): Fix `cfengine3--current-word' call. | 22 | (cfengine3--current-function): Fix `cfengine3--current-word' call. |
| 19 | 23 | ||
| 20 | 2013-12-13 Glenn Morris <rgm@gnu.org> | 24 | 2013-12-13 Glenn Morris <rgm@gnu.org> |
| @@ -31,8 +35,8 @@ | |||
| 31 | cf-promises doesn't run. | 35 | cf-promises doesn't run. |
| 32 | (cfengine3--current-word): Reimplement using | 36 | (cfengine3--current-word): Reimplement using |
| 33 | `cfengine-mode-syntax-functions-regex'. | 37 | `cfengine-mode-syntax-functions-regex'. |
| 34 | (cfengine3-completion-function, cfengine3--current-function): Use | 38 | (cfengine3-completion-function, cfengine3--current-function): |
| 35 | `cfengine3-make-syntax-cache' directly. | 39 | Use `cfengine3-make-syntax-cache' directly. |
| 36 | (cfengine3-clear-syntax-cache): New function. | 40 | (cfengine3-clear-syntax-cache): New function. |
| 37 | (cfengine3-make-syntax-cache): Simplify and create | 41 | (cfengine3-make-syntax-cache): Simplify and create |
| 38 | `cfengine-mode-syntax-functions-regex' on demand. | 42 | `cfengine-mode-syntax-functions-regex' on demand. |
| @@ -85,8 +89,8 @@ | |||
| 85 | 89 | ||
| 86 | 2013-12-12 Fabián Ezequiel Gallina <fgallina@gnu.org> | 90 | 2013-12-12 Fabián Ezequiel Gallina <fgallina@gnu.org> |
| 87 | 91 | ||
| 88 | * progmodes/python.el (python-indent-calculate-indentation): Fix | 92 | * progmodes/python.el (python-indent-calculate-indentation): |
| 89 | de-denters cornercase. (Bug#15731) | 93 | Fix de-denters cornercase. (Bug#15731) |
| 90 | 94 | ||
| 91 | 2013-12-12 Stefan Monnier <monnier@iro.umontreal.ca> | 95 | 2013-12-12 Stefan Monnier <monnier@iro.umontreal.ca> |
| 92 | 96 | ||
diff --git a/lisp/icomplete.el b/lisp/icomplete.el index 7620adb3c9c..fccb2644ccb 100644 --- a/lisp/icomplete.el +++ b/lisp/icomplete.el | |||
| @@ -416,18 +416,22 @@ are exhibited within the square braces.)" | |||
| 416 | ;; one line, increase the allowable space accordingly. | 416 | ;; one line, increase the allowable space accordingly. |
| 417 | (/ prospects-len (window-width))) | 417 | (/ prospects-len (window-width))) |
| 418 | (window-width))) | 418 | (window-width))) |
| 419 | ;; Find the common prefix among `comps'. | ||
| 420 | ;; We can't use the optimization below because its assumptions | ||
| 421 | ;; aren't always true, e.g. when completion-cycling (bug#10850): | ||
| 422 | ;; (if (eq t (compare-strings (car comps) nil (length most) | ||
| 423 | ;; most nil nil completion-ignore-case)) | ||
| 424 | ;; ;; Common case. | ||
| 425 | ;; (length most) | ||
| 426 | ;; Else, use try-completion. | ||
| 419 | (prefix (when icomplete-hide-common-prefix | 427 | (prefix (when icomplete-hide-common-prefix |
| 420 | (try-completion "" comps))) | 428 | (try-completion "" comps))) |
| 421 | (prefix-len | 429 | (prefix-len |
| 422 | ;; Find the common prefix among `comps'. | 430 | (and (stringp prefix) |
| 423 | ;; We can't use the optimization below because its assumptions | 431 | ;; Only hide the prefix if the corresponding info |
| 424 | ;; aren't always true, e.g. when completion-cycling (bug#10850): | 432 | ;; is already displayed via `most'. |
| 425 | ;; (if (eq t (compare-strings (car comps) nil (length most) | 433 | (string-prefix-p prefix most t) |
| 426 | ;; most nil nil completion-ignore-case)) | 434 | (length prefix))) ;;) |
| 427 | ;; ;; Common case. | ||
| 428 | ;; (length most) | ||
| 429 | ;; Else, use try-completion. | ||
| 430 | (and (stringp prefix) (length prefix))) ;;) | ||
| 431 | prospects comp limit) | 435 | prospects comp limit) |
| 432 | (if (or (eq most-try t) (not (consp (cdr comps)))) | 436 | (if (or (eq most-try t) (not (consp (cdr comps)))) |
| 433 | (setq prospects nil) | 437 | (setq prospects nil) |