]> git.eshelyaron.com Git - emacs.git/commit
Preserve an explicit * in pcm-try-completion
authorSpencer Baugh <sbaugh@janestreet.com>
Mon, 18 Nov 2024 17:26:55 +0000 (12:26 -0500)
committerEshel Yaron <me@eshelyaron.com>
Tue, 8 Apr 2025 19:43:16 +0000 (21:43 +0200)
commitf3922261723c055ecc0877d6971310f0211d5b3d
tree6e86a854b3f34faad2e205176fd5a2fdeb5d3944
parent281d0de091106d2702b5a7d01f025015c5c44688
Preserve an explicit * in pcm-try-completion

An explicitly typed * has different semantics from automatically
inserted PCM wildcards, so it should be preserved on try-completion.  We
already do this in some cases, but now we do it more.

This is especially significant for filename completion: removing an
explicit * can take us from

~/src/emacs/trunk/*/minibuf

to

~/src/emacs/trunk//minibuf

The explicit double slash is interpreted by the file name completion
table to mean "start completing from the root directory", so deleting
the * here substantially changes semantics.

* lisp/minibuffer.el (completion-pcm--merge-completions): Don't drop
important wildcards. (bug#74420)
* test/lisp/minibuffer-tests.el (completion-pcm-test-7): Add tests.

(cherry picked from commit 0fbba16387513e7692b46885833e4a9c218251f0)
lisp/minibuffer.el
test/lisp/minibuffer-tests.el