From: Matthew Tromp Date: Thu, 10 Aug 2023 14:41:24 +0000 (-0400) Subject: Substitute command keys in 'ielm-header' at use time X-Git-Tag: emacs-29.1.90~217 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=556cb01b48e;p=emacs.git Substitute command keys in 'ielm-header' at use time Before, command keys were substituted into the ielm-header when ielm.el was loaded, which resulted in the substitutions depending on the user's current buffer instead of the ielm buffer. For example, if the user was in an info-mode buffer, the key would appear as 'H' instead of 'C-h m'. Now, the command key is substituted after the ielm buffer has been created. * lisp/ielm.el (ielm-header): Remove substitute-command-keys. (inferior-emacs-lisp-mode): Add substitute-command-keys. (Bug#65213) Copyright-paperwork-exempt: yes --- diff --git a/lisp/ielm.el b/lisp/ielm.el index 5c370733c05..578422001a5 100644 --- a/lisp/ielm.el +++ b/lisp/ielm.el @@ -148,9 +148,8 @@ such as `edebug-defun' to work with such inputs." This variable is buffer-local.") (defvar ielm-header - (substitute-command-keys "*** Welcome to IELM *** Type (describe-mode) or press \ -\\[describe-mode] for help.\n") +\\[describe-mode] for help.\n" "Message to display when IELM is started.") (defvaralias 'inferior-emacs-lisp-mode-map 'ielm-map) @@ -615,7 +614,7 @@ Customized bindings may be defined in `ielm-map', which currently contains: (setq-local comint-inhibit-carriage-motion t) ;; Add a silly header - (insert ielm-header) + (insert (substitute-command-keys ielm-header)) (ielm-set-pm (point-max)) (unless comint-use-prompt-regexp (let ((inhibit-read-only t))