unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#73797: [PATCH] Fix formatting of list-keyboard-macros
@ 2024-10-13 17:54 Okamsn via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-10-14 11:38 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: Okamsn via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-10-13 17:54 UTC (permalink / raw)
  To: 73797

[-- Attachment #1: Type: text/plain, Size: 337 bytes --]

Hello,

Currently, 'list-keyboard-macros' will wrap long macros onto multiple 
lines.  I did not force 'format-kbd-macro' to output single lines when 
writing the function. This patch fixes that. Please consider including 
this minor fix in Emacs 30, so that 'list-keyboard-macros' is formatted 
correctly on release.

Thank you.

[-- Attachment #2: 0001-Fix-formatting-of-long-keyboard-macros-for-list-keyb.patch --]
[-- Type: text/x-patch, Size: 1105 bytes --]

From 0d423a911e8a849a43d8ffc0d51d41fef8e44dc1 Mon Sep 17 00:00:00 2001
From: Earl Hyatt <okamsn@protonmail.com>
Date: Sun, 13 Oct 2024 13:44:18 -0400
Subject: [PATCH] Fix formatting of long keyboard macros for
 'list-keyboard-macros'.

* lisp/kmacro.el (kmacro-menu--refresh): Include the second argument of
'format-kbd-macro' so that the formatted keyboard macro is on a
single line.
---
 lisp/kmacro.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/kmacro.el b/lisp/kmacro.el
index 50ff875de52..6d43a3f680c 100644
--- a/lisp/kmacro.el
+++ b/lisp/kmacro.el
@@ -1576,7 +1576,7 @@ kmacro-menu--refresh
                                       ,(format "%d" cnt)
                                       ,fmt
                                       ,(format fmt cnt)
-                                      ,(format-kbd-macro (kmacro--keys km))])))
+                                      ,(format-kbd-macro (kmacro--keys km) 1)])))
                                (kmacro-menu--kmacros))
               kmacro-menu--deletion-flags nil
               kmacro-menu--marks nil)
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#73797: [PATCH] Fix formatting of list-keyboard-macros
  2024-10-13 17:54 bug#73797: [PATCH] Fix formatting of list-keyboard-macros Okamsn via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-10-14 11:38 ` Eli Zaretskii
  0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2024-10-14 11:38 UTC (permalink / raw)
  To: Okamsn; +Cc: 73797-done

> Date: Sun, 13 Oct 2024 17:54:34 +0000
> From:  Okamsn via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
> 
> Currently, 'list-keyboard-macros' will wrap long macros onto multiple 
> lines.  I did not force 'format-kbd-macro' to output single lines when 
> writing the function. This patch fixes that. Please consider including 
> this minor fix in Emacs 30, so that 'list-keyboard-macros' is formatted 
> correctly on release.

Thanks, installed on the emacs-30 branch, and closing the bug.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-10-14 11:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-13 17:54 bug#73797: [PATCH] Fix formatting of list-keyboard-macros Okamsn via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-14 11:38 ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).