1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-27 15:52:00 -08:00

* lisp/kmacro.el (kmacro-lambda-form): Fix bug#48523

Re-add `counter` and `format` arguments, since they are used in
`insert-kbd-macro`.
This commit is contained in:
Stefan Monnier 2021-05-19 11:19:10 -04:00
parent 5e1a8d5654
commit b4e1fdfe21

View file

@ -782,8 +782,14 @@ If kbd macro currently being defined end it before activating it."
;; executing the macro later on (but that's controversial...)
;;;###autoload
(defun kmacro-lambda-form (mac)
(defun kmacro-lambda-form (mac &optional counter format)
"Create lambda form for macro bound to symbol or key."
;; Apparently, there are two different ways this is called:
;; either `counter' and `format' are both provided and `mac' is a vector,
;; or only `mac' is provided, as a list (MAC COUNTER FORMAT).
;; The first is used from `insert-kbd-macro' and `edmacro-finish-edit',
;; while the second is used from within this file.
(let ((mac (if counter (list mac counter format) mac)))
;; FIXME: This should be a "funcallable struct"!
(lambda (&optional arg)
"Keyboard macro."
@ -792,7 +798,7 @@ If kbd macro currently being defined end it before activating it."
(interactive "pkmacro")
(if (eq arg 'kmacro--extract-lambda)
(cons 'kmacro--extract-lambda mac)
(kmacro-exec-ring-item mac arg))))
(kmacro-exec-ring-item mac arg)))))
(defun kmacro-extract-lambda (mac)
"Extract kmacro from a kmacro lambda form."