From ec0527d8e9a7f12898c8fe9fdb6daec21c1d2ba8 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Sat, 18 Sep 2021 14:54:04 +0200 Subject: [PATCH] Use command substitution for exit-recursive-edit * lisp/bindings.el (mode-line-modes): * lisp/emacs-lisp/checkdoc.el (checkdoc-recursive-edit): Use command substitution for 'exit-recursive-edit'. --- lisp/bindings.el | 4 +++- lisp/emacs-lisp/checkdoc.el | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lisp/bindings.el b/lisp/bindings.el index 4dfc9a908cf..51566370656 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el @@ -381,7 +381,9 @@ Keymap to display on major mode.") Keymap to display on minor modes.") (defvar mode-line-modes - (let ((recursive-edit-help-echo "Recursive edit, type C-M-c to get out")) + (let ((recursive-edit-help-echo + (substitute-command-keys + "Recursive edit, type \\[exit-recursive-edit] to get out"))) (list (propertize "%[" 'help-echo recursive-edit-help-echo) "(" `(:propertize ("" mode-name) diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index 9a37941313e..099b1585537 100644 --- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el @@ -828,7 +828,8 @@ MSG is the error that was found, which is displayed in a help buffer." "\n\nEdit to fix this problem, and press C-M-c to continue."))) (shrink-window-if-larger-than-buffer (get-buffer-window "*Checkdoc Help*")) - (message "When you're done editing press C-M-c to continue.") + (message (substitute-command-keys + "When you're done editing press \\[exit-recursive-edit] to continue.")) (unwind-protect (recursive-edit) (if (get-buffer-window "*Checkdoc Help*") -- 2.39.5