emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Thoughts on Refactoring In-Buffer Completion In message.el


From: Stefan Monnier
Subject: Re: Thoughts on Refactoring In-Buffer Completion In message.el
Date: Tue, 16 Aug 2022 21:54:44 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

> - figure out, and implement how to add completion category metadata to
>   completion tables;

We really should provide a `completion-table-with-metadata` function to
do that, but basically it can start with something like:

    (defun completion-table-with-metadata (table metadata)
      (lambda (string pred action)
        (if (eq action 'metadata)
            metadata
          (complete-with-action action table string pred))))

[ You may want to make spice it up in case you want to handle the case
  where `table` already provides some metadata which you'd then want
  to augment. ]


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]