From e05d3d589f5b28efaed0e6b2c433bcedb73e7eb4 Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Sat, 29 Jun 2024 21:09:54 +0200 Subject: [PATCH] (minibuffer-force-complete): Indicate number of possible completions --- lisp/minibuffer.el | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index cd0c3631778..4d8069836b1 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -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))) -- 2.39.2