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 | f9d9e003a208c22cd4d390125d990b79a4c0a0e7 (patch) | |
| tree | e2b414ec00c04a5a30d0292770cefc861eace14f /modules/config-utilities.el | |
| parent | fd2fb02ab77eca1b7a75fe40aac33d5fedd3dac0 (diff) | |
| download | dotemacs-f9d9e003a208c22cd4d390125d990b79a4c0a0e7.tar.gz dotemacs-f9d9e003a208c22cd4d390125d990b79a4c0a0e7.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 |
