diff options
| author | Juri Linkov | 2024-01-09 19:57:50 +0200 |
|---|---|---|
| committer | Juri Linkov | 2024-01-09 19:57:50 +0200 |
| commit | aff1d53cd466b64ded08d5cf12f83e5746704c07 (patch) | |
| tree | ad65a89f8e6f32e84501f32dd5f3cdb24d24703e /test | |
| parent | 29e59b835c86e1ebac12adcb28ab7e1d0c275b2f (diff) | |
| download | emacs-aff1d53cd466b64ded08d5cf12f83e5746704c07.tar.gz emacs-aff1d53cd466b64ded08d5cf12f83e5746704c07.zip | |
Support more metadata properties in completion-extra-properties (bug#68214)
* doc/lispref/minibuf.texi (Completion Variables): Add
to the table of completion-extra-properties new items:
`group-function', `display-sort-function', `cycle-sort-function'.
* lisp/icomplete.el (icomplete--augment): Remove unnecessary
plist-get from completion-extra-properties since now
completion-metadata-get does this.
* lisp/minibuffer.el (completion-metadata-get): Use plist-get to
get prop from completion-extra-properties and cache the keyword.
Thanks to Daniel Mendler <mail@daniel-mendler.de>.
(completion-extra-properties): Mention new properties in docstring.
(minibuffer-completion-help): Remove unnecessary
plist-get from completion-extra-properties since now
completion-metadata-get does this.
* lisp/net/eww.el (eww-switch-to-buffer):
* test/lisp/minibuffer-tests.el (completions-affixation-navigation-test):
Unquote lambda in completion-extra-properties.
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/minibuffer-tests.el | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/lisp/minibuffer-tests.el b/test/lisp/minibuffer-tests.el index 6dc15d0801f..c1fe3032cb5 100644 --- a/test/lisp/minibuffer-tests.el +++ b/test/lisp/minibuffer-tests.el | |||
| @@ -505,11 +505,11 @@ | |||
| 505 | 505 | ||
| 506 | (ert-deftest completions-affixation-navigation-test () | 506 | (ert-deftest completions-affixation-navigation-test () |
| 507 | (let ((completion-extra-properties | 507 | (let ((completion-extra-properties |
| 508 | '(:affixation-function | 508 | `(:affixation-function |
| 509 | (lambda (completions) | 509 | ,(lambda (completions) |
| 510 | (mapcar (lambda (c) | 510 | (mapcar (lambda (c) |
| 511 | (list c "prefix " " suffix")) | 511 | (list c "prefix " " suffix")) |
| 512 | completions))))) | 512 | completions))))) |
| 513 | (completing-read-with-minibuffer-setup | 513 | (completing-read-with-minibuffer-setup |
| 514 | '("aa" "ab" "ac") | 514 | '("aa" "ab" "ac") |
| 515 | (insert "a") | 515 | (insert "a") |