From 42d5d91d9fa31ad0f42ece300a869a0e22343e46 Mon Sep 17 00:00:00 2001 From: Visuwesh Date: Thu, 12 Dec 2024 18:58:37 +0530 Subject: [PATCH] Show the keybinding next to command in calc's x * lisp/calc/calc-ext.el (calc-execute-extended-command): Use M-x's :affixation-function to show the keybinding of the calc command next to its name. --- lisp/calc/calc-ext.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lisp/calc/calc-ext.el b/lisp/calc/calc-ext.el index 25d2492b277..0cbd02be657 100644 --- a/lisp/calc/calc-ext.el +++ b/lisp/calc/calc-ext.el @@ -1728,8 +1728,11 @@ calc-execute-extended-command (interactive "P") (let* ((prompt (concat (calc-num-prefix-name n) "M-x ")) (cmd (intern - (completing-read prompt obarray 'commandp t "calc-" - 'calc-extended-command-history)))) + (let ((completion-extra-properties + (list :affixation-function + #'read-extended-command--affixation))) + (completing-read prompt obarray 'commandp t "calc-" + 'calc-extended-command-history))))) (setq prefix-arg n) (command-execute cmd))) -- 2.45.2