From: Visuwesh Date: Thu, 12 Dec 2024 13:28:37 +0000 (+0530) Subject: Show the keybinding next to command in calc's x X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=648856d8673a77b42426c8740edd3487ccb7724a;p=emacs.git 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. (Bug#74829) (cherry picked from commit aaacd5806c75019b052a69764ef4d193d243573c) --- diff --git a/lisp/calc/calc-ext.el b/lisp/calc/calc-ext.el index d803f776e39..a634e503cf7 100644 --- a/lisp/calc/calc-ext.el +++ b/lisp/calc/calc-ext.el @@ -1728,8 +1728,11 @@ calc-kill calc-kill-region calc-yank)))) (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)))