diff options
| author | João Távora | 2019-11-09 14:54:09 +0000 |
|---|---|---|
| committer | João Távora | 2019-11-09 14:55:42 +0000 |
| commit | afe4969a3b3b38014387a828b66f5dbc3a462a57 (patch) | |
| tree | ca8a2072392d6dbb846393bf781d119de0219424 | |
| parent | 5c74b806a6fb0a4cb237300ab0a5418a109ced5e (diff) | |
| download | emacs-afe4969a3b3b38014387a828b66f5dbc3a462a57.tar.gz emacs-afe4969a3b3b38014387a828b66f5dbc3a462a57.zip | |
Revert "Nudge icomplete-mode a little closer to fido-mode"
Fixes bug#38131.
This is not the best way to have fido-mdoe emulate that particular bit
of ido-mode.
This reverts commit 5761a1a3939e23d8e8c725241dd9398a12f191b0.
| -rw-r--r-- | lisp/icomplete.el | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/lisp/icomplete.el b/lisp/icomplete.el index 879068e4e95..f7e08fe1358 100644 --- a/lisp/icomplete.el +++ b/lisp/icomplete.el | |||
| @@ -572,13 +572,6 @@ matches exist." | |||
| 572 | (compare (compare-strings name nil nil | 572 | (compare (compare-strings name nil nil |
| 573 | most nil nil completion-ignore-case)) | 573 | most nil nil completion-ignore-case)) |
| 574 | (ellipsis (if (char-displayable-p ?…) "…" "...")) | 574 | (ellipsis (if (char-displayable-p ?…) "…" "...")) |
| 575 | ;; `determ' is what we "determined" to be the thing that | ||
| 576 | ;; TAB will complete to. Also, if we're working with a | ||
| 577 | ;; large prefix (like when finding files), we want to | ||
| 578 | ;; truncate the common prefix away. `determ-ellipsis' | ||
| 579 | ;; says if we should do it with an `ellipsis'. Icomplete | ||
| 580 | ;; uses one, Ido doesn't. | ||
| 581 | (determ-ellipsis (if fido-mode "" ellipsis)) | ||
| 582 | (determ (unless (or (eq t compare) (eq t most-try) | 575 | (determ (unless (or (eq t compare) (eq t most-try) |
| 583 | (= (setq compare (1- (abs compare))) | 576 | (= (setq compare (1- (abs compare))) |
| 584 | (length most))) | 577 | (length most))) |
| @@ -589,10 +582,8 @@ matches exist." | |||
| 589 | (substring most compare)) | 582 | (substring most compare)) |
| 590 | ;; Don't bother truncating if it doesn't gain | 583 | ;; Don't bother truncating if it doesn't gain |
| 591 | ;; us at least 2 columns. | 584 | ;; us at least 2 columns. |
| 592 | ((< compare (+ 2 (string-width determ-ellipsis))) | 585 | ((< compare (+ 2 (string-width ellipsis))) most) |
| 593 | most) | 586 | (t (concat ellipsis (substring most compare)))) |
| 594 | (t (concat determ-ellipsis | ||
| 595 | (substring most compare)))) | ||
| 596 | close-bracket))) | 587 | close-bracket))) |
| 597 | ;;"-prospects" - more than one candidate | 588 | ;;"-prospects" - more than one candidate |
| 598 | (prospects-len (+ (string-width | 589 | (prospects-len (+ (string-width |
| @@ -673,8 +664,6 @@ matches exist." | |||
| 673 | (mapconcat 'identity prospects icomplete-separator) | 664 | (mapconcat 'identity prospects icomplete-separator) |
| 674 | (and limit (concat icomplete-separator ellipsis)) | 665 | (and limit (concat icomplete-separator ellipsis)) |
| 675 | "}") | 666 | "}") |
| 676 | (put-text-property 1 (1- (length determ)) | ||
| 677 | 'face 'icomplete-first-match determ) | ||
| 678 | (concat determ " [Matched]")))))) | 667 | (concat determ " [Matched]")))))) |
| 679 | 668 | ||
| 680 | ;;; Iswitchb compatibility | 669 | ;;; Iswitchb compatibility |