diff options
author | Spencer Baugh <sbaugh@janestreet.com> | 2024-12-10 12:41:49 -0500 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2024-12-26 10:42:58 +0200 |
commit | 6412a5503c404bbe177879d113c2299288c76ccd (patch) | |
tree | 8ac9898dde6b18c3517d3db98e6f7a63a2dc0e87 /lisp/emacs-lisp/syntax.el | |
parent | aaacd5806c75019b052a69764ef4d193d243573c (diff) | |
download | emacs-6412a5503c404bbe177879d113c2299288c76ccd.tar.gz emacs-6412a5503c404bbe177879d113c2299288c76ccd.tar.bz2 emacs-6412a5503c404bbe177879d113c2299288c76ccd.zip |
Consistently add wildcards for completion-pcm-leading-wildcard
completion-pcm--find-all-completions has two different phases:
First we turn the minibuffer text into a regex and matches
completion alternatives against it. If that finds no matches,
then we strip some text off the completions and minibuffer text
and call ourselves recursively to find completions, then filter
the results with the removed text (converted into a regex).
Because of this, completion-pcm-leading-wildcard had
inconsistent behavior: in the second phase, the filter created
from the removed text would have a leading wildcard. That
effectively adds wildcards in the middle of the minibuffer text
at the start of each "word". But the first phrase created a
regex which had no such wildcards. Thus, the two phases could
get substantially different results.
We fix this by changing completion-pcm-leading-wildcard to
consistently add a leading wildcard for each word. This was
always my intention.
* lisp/minibuffer.el (completion-pcm--string->pattern): Include
a wildcard after each delimter with
completion-pcm-leading-wildcard. (bug#74772)
* lisp/minibuffer.el (completion-pcm-leading-wildcard): Update
docs.
* doc/emacs/mini.texi (Completion Styles): Update docs.
Diffstat (limited to 'lisp/emacs-lisp/syntax.el')
0 files changed, 0 insertions, 0 deletions