* bug#65213: [PATCH] Substitute command keys in ielm-header at use time
@ 2023-08-10 15:21 matthewktromp
2023-08-12 7:16 ` Eli Zaretskii
0 siblings, 1 reply; 2+ messages in thread
From: matthewktromp @ 2023-08-10 15:21 UTC (permalink / raw)
To: 65213
[-- Attachment #1: Type: text/plain, Size: 547 bytes --]
Tags: patch
Tags: patch
Fixes an ielm bug
In GNU Emacs 29.1 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo
version 1.16.0, Xaw3d scroll bars)
Repository revision: b28d44d4226497c4b2582bc15a59fc817eb3ce0a
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101008
System Description: NixOS 23.05 (Stoat)
Configured using:
'configure
--prefix=/nix/store/ri7x0w6iqs38vr7vgwc76i9dwy5ikd8i-emacs-git-20230503.0
--disable-build-details --with-modules --with-x-toolkit=lucid
--with-xft --with-cairo'
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Substitute-command-keys-in-ielm-header-at-use-time.patch --]
[-- Type: text/patch, Size: 1662 bytes --]
From 4a09a067bd09987291081b5b42a3ba0125765f60 Mon Sep 17 00:00:00 2001
From: Matthew Tromp <matthewktromp@gmail.com>
Date: Thu, 10 Aug 2023 10:41:24 -0400
Subject: [PATCH] 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.
---
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))
--
2.31.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* bug#65213: [PATCH] Substitute command keys in ielm-header at use time
2023-08-10 15:21 bug#65213: [PATCH] Substitute command keys in ielm-header at use time matthewktromp
@ 2023-08-12 7:16 ` Eli Zaretskii
0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2023-08-12 7:16 UTC (permalink / raw)
To: matthewktromp; +Cc: 65213-done
> From: matthewktromp@gmail.com
> Date: Thu, 10 Aug 2023 11:21:22 -0400
>
> >From 4a09a067bd09987291081b5b42a3ba0125765f60 Mon Sep 17 00:00:00 2001
> From: Matthew Tromp <matthewktromp@gmail.com>
> Date: Thu, 10 Aug 2023 10:41:24 -0400
> Subject: [PATCH] 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.
Thanks, installed on the emacs-29 branch and closing the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-08-12 7:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-10 15:21 bug#65213: [PATCH] Substitute command keys in ielm-header at use time matthewktromp
2023-08-12 7:16 ` Eli Zaretskii
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.