]> git.eshelyaron.com Git - sweep.git/commit
Add grouping and affixation functions for module completion
authorEshel Yaron <me@eshelyaron.com>
Tue, 27 Jun 2023 18:36:45 +0000 (21:36 +0300)
committerEshel Yaron <me@eshelyaron.com>
Tue, 27 Jun 2023 18:41:21 +0000 (21:41 +0300)
commit89daa53a16c3aa2d2d779834c7193709f885d51c
treed2d39e56882e82ebfcc91ec828f2ba9ee7a14dbb
parent114482c71585b5260863feb36bba1e1bec545cfb
Add grouping and affixation functions for module completion

This adds a 'group-function' and an 'affixation-function' to
'sweeprolog-module-completion-table', for Emacs 28+

The affixation API allows us to compute the appropriate padding to
insert before annotations in a cleaner way.  Modules are group
according to their classes.

* sweep.pl (sweep_module_class/2): New predicate.

* sweeprolog.el (sweeprolog-module-minibuffer-annotation-1):
Extract helper function from...
(sweeprolog-module-minibuffer-annotation): ...here. Adapt.
(sweeprolog-module-minibuffer-affixation)
(sweeprolog-module-minibuffer-group): New functions.
(sweeprolog-module-completion-table): Use them.
sweep.pl
sweeprolog.el