GNU bug report logs -
#48523
27.2; kbd macro fails evaluation
Previous Next
Reported by: Colin Baxter <m43cap <at> yandex.com>
Date: Wed, 19 May 2021 14:03:01 UTC
Severity: normal
Found in version 27.2
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
Full log
Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):
>>>>> Bug reports for GNU Emacs, the Swiss army knife of text editors <Stefan> writes:
>> This gives:
>>
>> #+begin_src elisp (fset 'myfullstop (kmacro-lambda-form [?\C-x ?8
>> return ?F ?U ?L ?L ?W ?I ?D ?T ?H ? ?F ?U ?L ?L ? ?S ?T ?O ?P
>> return] 0 "%d")) #+end_src
>>
>>
>> An eval (C-j with point at end) of the above expression gives the
>> error:
>>
>> ----- Begin --------
>>
>> Debugger entered--Lisp error: (wrong-number-of-arguments (1 . 1)
>> 3)
> I installed the patch below which should fix this blunder, thanks.
> Stefan
> diff --git a/lisp/kmacro.el b/lisp/kmacro.el index
> 3700a1964a6..afc486f4edc 100644 --- a/lisp/kmacro.el +++
> b/lisp/kmacro.el @@ -782,17 +782,23 @@ kmacro-end-call-mouse ;;
> 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." - ;; FIXME: This should
> be a "funcallable struct"! - (lambda (&optional arg) - "Keyboard
> macro." - ;; We put an "unused prompt" as a special marker so -
> ;; `kmacro-extract-lambda' can see it's "one of us". -
> (interactive "pkmacro") - (if (eq arg 'kmacro--extract-lambda) -
> (cons 'kmacro--extract-lambda mac) - (kmacro-exec-ring-item mac
> arg)))) + ;; 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." + ;; We put an
> "unused prompt" as a special marker so + ;;
> `kmacro-extract-lambda' can see it's "one of us". + (interactive
> "pkmacro") + (if (eq arg 'kmacro--extract-lambda) + (cons
> 'kmacro--extract-lambda mac) + (kmacro-exec-ring-item mac arg)))))
> (defun kmacro-extract-lambda (mac) "Extract kmacro from a kmacro
> lambda form."
Yes, this appears fixed for me. Thank you.
Best wishes,
This bug report was last modified 4 years and 3 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.