* lisp/minibuffer.el (completion-pcm--optimize-pattern): New function
This fixes bug#38458 where a final `point` in the pattern prevented the expected normal behavior of point moving after the completion of the final implicit `any`. (completion-pcm--find-all-completions) (completion-substring--all-completions): Use it. (completion-basic--pattern): Don't both removing "" any more. (completion-basic-try-completion): Use it as well as `completion-basic--pattern`.