emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-29 556cb01b48e: Substitute command keys in 'ielm-header' at use ti


From: Eli Zaretskii
Subject: emacs-29 556cb01b48e: Substitute command keys in 'ielm-header' at use time
Date: Sat, 12 Aug 2023 03:15:42 -0400 (EDT)

branch: emacs-29
commit 556cb01b48e2db6baa6c8793c45358b578724bfe
Author: Matthew Tromp <matthewktromp@gmail.com>
Commit: Eli Zaretskii <eliz@gnu.org>

    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
---
 lisp/ielm.el | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]