]> git.eshelyaron.com Git - emacs.git/commit
Allow completion tables to designate normal/exceptional candidates
authorEshel Yaron <me@eshelyaron.com>
Sun, 3 Mar 2024 15:57:26 +0000 (16:57 +0100)
committerEshel Yaron <me@eshelyaron.com>
Sun, 3 Mar 2024 15:57:26 +0000 (16:57 +0100)
commit3aae4bce55382b32a9666bd214b87e449171e3d6
treec9f95bf9cf32b01e8c08c9f88e3b622d8f289eb8
parentdc2b79a184971658809472848f1aced089d42da5
Allow completion tables to designate normal/exceptional candidates

Completion tables can now provide a "normal predicate" via the new
'normal-predicate' metadata entry.  The normal predicate determines
which candidates are normal and which are not.  Non-normal candidates
are called exceptional candidates, and, by default, they are excluded.
However, if all possible completions are exceptional, we make an
exception, and include exceptional completions, as they are all that
remains.

This generalizes and subsumes the existing mechanisms of
'completion-ignored-extensions' and the internal buffer-name filtering
that read-buffer performs.

We also provide a new minibuffer command 'C-x ~' to toggle inclusion of
exceptional candidates interactively during completion.  When
exceptional candidates are included among normal candidates, we
highlight the exceptions with a dedicated face.
lisp/bindings.el
lisp/cus-start.el
lisp/files.el
lisp/minibuffer.el
src/dired.c
src/minibuf.c