all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Colin Baxter <m43cap@yandex.com>
To: 48523@debbugs.gnu.org
Cc: monnier@iro.umontreal.ca
Subject: bug#48523: 27.2; kbd macro fails evaluation
Date: Wed, 19 May 2021 17:49:15 +0100	[thread overview]
Message-ID: <87lf8azn1w.fsf@yandex.com> (raw)
In-Reply-To: <jwv7djulpim.fsf-monnier+emacs@gnu.org> (Stefan Monnier via's message of "Wed, 19 May 2021 11:20:53 -0400")

>>>>> 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,





  reply	other threads:[~2021-05-19 16:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-19 14:01 bug#48523: 27.2; kbd macro fails evaluation Colin Baxter
2021-05-19 15:20 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-05-19 16:49   ` Colin Baxter [this message]
2021-05-19 19:10     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lf8azn1w.fsf@yandex.com \
    --to=m43cap@yandex.com \
    --cc=48523@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.