Subject: bug#71419: 30.0.50; Completion does not always highlight the "common part" corresponding to suffix

From: Stefan Monnier <[email-masked]>
Date: Sun, 09 Jun 2024 17:06:42 -0400

> diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
> index f62cb2566b2..144cda8cfdc 100644
> --- a/lisp/minibuffer.el
> +++ b/lisp/minibuffer.el
> @@ -3816,7 +3816,7 @@ completion-basic-all-completions
>                              'point
>                              (substring afterpoint 0 (cdr bounds)))))
>           (all (completion-pcm--all-completions prefix pattern table pred)))
> -    (completion-hilit-commonality all point (car bounds))))
> +    (completion-pcm--hilit-commonality pattern all)))
>
>  ;;; Partial-completion-mode style completion.

Thanks for tracking it down.  It matches my expectation.

> But it would have been nice to be able to use it in the "progressive
>  improvement" kind of fashion: when the suffix and the other parts are
>  highlighted correctly, we do the right thing; if the style missed the
>  suffix highlighting, we do the other thing - and put the responsibility on
> the third party.

🙂

        Stefan