GNU bug report logs -
#35486
26.1; insert-kbd-macro now creates unreadable list code
Previous Next
Reported by: Francesco Potortì <pot <at> gnu.org>
Date: Mon, 29 Apr 2019 09:37:01 UTC
Severity: minor
Tags: fixed, patch
Found in version 26.1
Fixed in version 27.1
Done: Noam Postavsky <npostavs <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Francesco Potortì <pot <at> gnu.org> writes:
> The insert-kbd-macro function now creates code like this:
>
> (fset 'rmail-remove-me
> (lambda (&optional arg) "Keyboard macro." (interactive "p")
> (kmacro-exec-ring-item (quote ([21 114 80 108 101 101 97 97 115 97
> 115 ...
>
> rather than this as before:
>
> (fset 'approve
> "\C-[xundigestify\C-mdd\C-xqde\M-k\M-k\M-k\M-k\C-c\C-crApproved: ...
By "before", do you mean Emacs 21? It looks like the (lambda ()
(kmacro-exec-ring-item ...)) thing was added in [1: 18d1e6c], which was
fairly long ago.
[1: 18d1e6c]: 2004-09-09 20:48:12 +0000
(kmacro-bind-to-key): Associate dedicated macro counter and format with binding.
https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=18d1e6c9fd4d8d446329ceb48a83ddca373f72c0
> This makes it impossible to understand at a glance what a given macro
> does by browsing the lisp code. I find this to be a regression. Can
> this be undone, or at least controlled by an option?
I think the kmacro-bind-to-key is important to preserve the way macro
counters work, but it seems like we should be able to add some special
casing to at least get something like this:
(fset 'approve
(lambda (&optional arg)
"Keyboard macro."
(interactive "p")
(kmacro-exec-ring-item (quote ([?\M-x ?u ?n ?d ?i ?g ?e ?s ?t ?i ?f ?y return ?d ?d ?\C-x ?q ?d ?e ?\M-k] 0 "%d")) arg)))
This bug report was last modified 6 years and 15 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.