]> git.eshelyaron.com Git - emacs.git/commitdiff
(minibuffer-force-complete): Indicate number of possible completions
authorEshel Yaron <me@eshelyaron.com>
Sat, 29 Jun 2024 19:09:54 +0000 (21:09 +0200)
committerEshel Yaron <me@eshelyaron.com>
Sat, 29 Jun 2024 19:09:54 +0000 (21:09 +0200)
lisp/minibuffer.el

index cd0c3631778b109de9fba8c58587e568e2218a1b..4d8069836b164715e93b7982821ee32674ba5176 100644 (file)
@@ -2004,12 +2004,20 @@ Interactively, ARG is the prefix argument, and it defaults to 1."
         (let ((done (equal (car all) (buffer-substring-no-properties base end))))
           (unless done (completion--replace base end cur))
           (completion--done (buffer-substring-no-properties start (point))
-                            'finished (when done "Sole completion"))
+                            'finished (if done "Sole completion" "."))
           (setq completion-all-sorted-completions nil)))
        (t
         (completion--replace base end cur)
         (setq end (+ base (length cur)))
-        (completion--done (buffer-substring-no-properties start (point)) 'sole)
+        (completion--done (buffer-substring-no-properties start (point)) 'sole
+                          (propertize
+                           (concat "/" (number-to-string
+                                        (let ((all all) (n 1))
+                                          (while (consp (cdr all))
+                                            (setq n (1+ n)
+                                                  all (cdr all)))
+                                          n)))
+                           'face 'shadow))
         (minibuffer--highlight-in-completions cur)
         (let ((last (last all)))
           (setcdr last (cons cur (cdr last)))