diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-27 12:55:58 -0400 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-27 12:55:58 -0400 |
| commit | a7c2c3a98e1e193e348bf3f918ba49763acb339b (patch) | |
| tree | a4e02c803fa71ea90558703d4bc4c2a48675d495 /modules/config-utilities.el | |
| parent | f69ab2e215397183c5d7832629ab4430f62589da (diff) | |
| download | dotemacs-a7c2c3a98e1e193e348bf3f918ba49763acb339b.tar.gz dotemacs-a7c2c3a98e1e193e348bf3f918ba49763acb339b.zip | |
feat(completion): tag four pickers with categories for marginalia
Add cj/completion-table (and an annotated variant) to system-lib: a wrapper that tags any collection with a completion category so marginalia, embark, consult, and sorting can recognize the candidates. None of the config's completing-reads declared a category, so the rich-candidate pickers showed bare. This applies it to the four whose candidates match a standard category and so need no custom annotator: benchmark-method (function), ERC buffer switch (buffer), ai-term close (buffer), and theme switch (theme). Each now annotates for free.
Diffstat (limited to 'modules/config-utilities.el')
| -rw-r--r-- | modules/config-utilities.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/config-utilities.el b/modules/config-utilities.el index f448327c1..0c98a896c 100644 --- a/modules/config-utilities.el +++ b/modules/config-utilities.el @@ -114,11 +114,14 @@ Signals `user-error' if METHOD-SYMBOL is nil or not fboundp." (with-timer title (funcall method-symbol))) +(require 'system-lib) + (defun cj/benchmark-this-method () "Prompt for a title and method name, then time the execution of the method." (interactive) (let* ((title (read-string "Enter the title for the timing: ")) - (method-name (completing-read "Enter the method name to time: " obarray + (method-name (completing-read "Enter the method name to time: " + (cj/completion-table 'function obarray) #'fboundp t)) (method-symbol (intern-soft method-name))) (condition-case err |
