]> git.eshelyaron.com Git - emacs.git/commitdiff
Revert "Nudge icomplete-mode a little closer to fido-mode"
authorJoão Távora <joaotavora@gmail.com>
Sat, 9 Nov 2019 14:54:09 +0000 (14:54 +0000)
committerJoão Távora <joaotavora@gmail.com>
Sat, 9 Nov 2019 14:55:42 +0000 (14:55 +0000)
Fixes bug#38131.

This is not the best way to have fido-mdoe emulate that particular bit
of ido-mode.

This reverts commit 5761a1a3939e23d8e8c725241dd9398a12f191b0.

lisp/icomplete.el

index 879068e4e95b73ac03880db554669f9a76e2050d..f7e08fe13586cf8b598c75d4724a016d85d9ed59 100644 (file)
@@ -572,13 +572,6 @@ matches exist."
             (compare (compare-strings name nil nil
                                       most nil nil completion-ignore-case))
             (ellipsis (if (char-displayable-p ?…) "…" "..."))
-             ;; `determ' is what we "determined" to be the thing that
-             ;; TAB will complete to.  Also, if we're working with a
-             ;; large prefix (like when finding files), we want to
-             ;; truncate the common prefix away.  `determ-ellipsis'
-             ;; says if we should do it with an `ellipsis'.  Icomplete
-             ;; uses one, Ido doesn't.
-             (determ-ellipsis (if fido-mode "" ellipsis))
             (determ (unless (or (eq t compare) (eq t most-try)
                                 (= (setq compare (1- (abs compare)))
                                    (length most)))
@@ -589,10 +582,8 @@ matches exist."
                                 (substring most compare))
                                 ;; Don't bother truncating if it doesn't gain
                                 ;; us at least 2 columns.
-                               ((< compare (+ 2 (string-width determ-ellipsis)))
-                                most)
-                               (t (concat determ-ellipsis
-                                          (substring most compare))))
+                               ((< compare (+ 2 (string-width ellipsis))) most)
+                               (t (concat ellipsis (substring most compare))))
                               close-bracket)))
             ;;"-prospects" - more than one candidate
             (prospects-len (+ (string-width
@@ -673,8 +664,6 @@ matches exist."
                    (mapconcat 'identity prospects icomplete-separator)
                    (and limit (concat icomplete-separator ellipsis))
                    "}")
-          (put-text-property 1 (1- (length determ))
-                             'face 'icomplete-first-match determ)
          (concat determ " [Matched]"))))))
 
 ;;; Iswitchb compatibility