]> git.eshelyaron.com Git - emacs.git/commitdiff
Show the keybinding next to command in calc's x
authorVisuwesh <visuweshm@gmail.com>
Thu, 12 Dec 2024 13:28:37 +0000 (18:58 +0530)
committerEshel Yaron <me@eshelyaron.com>
Fri, 27 Dec 2024 15:34:18 +0000 (16:34 +0100)
* 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)

lisp/calc/calc-ext.el

index d803f776e39e75380cc83995feba86773aeea46c..a634e503cf71d4c7106e93cd8cded7df80025f54 100644 (file)
@@ -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)))