]> git.eshelyaron.com Git - emacs.git/commit
Improve env var handling in read-file-name
authorSpencer Baugh <sbaugh@janestreet.com>
Mon, 14 Apr 2025 20:01:38 +0000 (16:01 -0400)
committerEshel Yaron <me@eshelyaron.com>
Tue, 29 Apr 2025 07:33:29 +0000 (09:33 +0200)
commitb3cbaa4ad5d66003c53609a784e22f8c1148b674
treedb0cc7bc9b664d0ba4286fb78ace33b90f3a1d6b
parente0dce7dc5b0429c9ab28f8d3c6885cf27ccd0e70
Improve env var handling in read-file-name

Fix various bugs, including bug#77718, by rewriting the way file
name completion handles environment variable expansion.  Instead
of using completion-table-with-quoting to manipulate the string
being completed on, simply make the completion table itself
understand substitute-in-file-name.

Tests are updated: partial-completion now preserves unexpanded
environment variables.  However, partial-completion no longer
works across environment variables containing delimiters; that's
an acceptable sacrifice.

* lisp/minibuffer.el (completion--sifn-boundaries): Add.
(completion--file-name-table): Rewrite to use
substitute-in-file-name explicitly. (bug#77718)
* test/lisp/minibuffer-tests.el (completion-table-test-quoting):
Update.

(cherry picked from commit 509cbe1c35b3dd005a53ac041f9c87ee53b8e115)
lisp/minibuffer.el
test/lisp/minibuffer-tests.el