unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* kbd macro fails evaluation
@ 2021-05-19  7:22 Colin Baxter
  2021-05-19 13:15 ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: Colin Baxter @ 2021-05-19  7:22 UTC (permalink / raw)
  To: emacs-devel


With emacs-28

1. emacs -Q
2. <f3> <RET>
3. C-x 8 <RET> FULLWIDTH FULL STOP <RET>
4. <f4> <RET>
5. C-x C-k n <RET>
6. myfullstop <RET>
7. Change to scratch buffer if necessary.
8. M-x insert-kbd-macro <RET>
9. myfullstop <RET>

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)
  kmacro-lambda-form([24 56 return 70 85 76 76 87 73 68 84 72 32 70 85 76 76 32 83 84 79 80 return] 0 "%d")
  (fset 'myfullstop (kmacro-lambda-form [24 56 return 70 85 76 76 87 73 68 84 72 32 70 85 76 76 32 83 84 79 80 return] 0 "%d"))
  (progn (fset 'myfullstop (kmacro-lambda-form [24 56 return 70 85 76 76 87 73 68 84 72 32 70 85 76 76 32 83 84 79 80 return] 0 "%d")))
  eval((progn (fset 'myfullstop (kmacro-lambda-form [24 56 return 70 85 76 76 87 73 68 84 72 32 70 85 76 76 32 83 84 79 80 return] 0 "%d"))) t)
  elisp--eval-last-sexp(t)
  eval-last-sexp(t)
  eval-print-last-sexp(nil)
  funcall-interactively(eval-print-last-sexp nil)
  call-interactively(eval-print-last-sexp nil nil)
  command-execute(eval-print-last-sexp)

----- End ----------

An error does not occur with emacs-27, which evaluates successfully with
the output:

#+begin_src elisp
(lambda (&optional arg) "Keyboard macro." (interactive "p") (kmacro-exec-ring-item '([24 56 return 70 85 76 76 87 73 68 84 72 ...] 0 "%d") arg))
#+end_src


Best wishes,

Colin Baxter.



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

* Re: kbd macro fails evaluation
  2021-05-19  7:22 kbd macro fails evaluation Colin Baxter
@ 2021-05-19 13:15 ` Stefan Monnier
  2021-05-19 14:02   ` Colin Baxter
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2021-05-19 13:15 UTC (permalink / raw)
  To: Colin Baxter; +Cc: emacs-devel

Colin Baxter [2021-05-19 08:22:26] wrote:

> With emacs-28
>
> 1. emacs -Q
> 2. <f3> <RET>
> 3. C-x 8 <RET> FULLWIDTH FULL STOP <RET>
> 4. <f4> <RET>
> 5. C-x C-k n <RET>
> 6. myfullstop <RET>
> 7. Change to scratch buffer if necessary.
> 8. M-x insert-kbd-macro <RET>
> 9. myfullstop <RET>
>
> 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:

Oh, sorry I didn't see that those `0 "%d"` arg could occur so
I mistakenly removed them.
Could you `M-x report-emacs-bug` so I have a bug number to point to in the commit?


        Stefan




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

* Re: kbd macro fails evaluation
  2021-05-19 13:15 ` Stefan Monnier
@ 2021-05-19 14:02   ` Colin Baxter
  0 siblings, 0 replies; 3+ messages in thread
From: Colin Baxter @ 2021-05-19 14:02 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

>>>>> Stefan Monnier <monnier@iro.umontreal.ca> writes:

    > Colin Baxter [2021-05-19 08:22:26] wrote:
    >> With emacs-28
    >> 
    >> 1. emacs -Q 2. <f3> <RET> 3. C-x 8 <RET> FULLWIDTH FULL STOP
    >> <RET> 4. <f4> <RET> 5. C-x C-k n <RET> 6. myfullstop <RET>
    >> 7. Change to scratch buffer if necessary.  8. M-x
    >> insert-kbd-macro <RET> 9. myfullstop <RET>
    >> 
    >> 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:

    > Oh, sorry I didn't see that those `0 "%d"` arg could occur so I
    > mistakenly removed them.  Could you `M-x report-emacs-bug` so I
    > have a bug number to point to in the commit?

Done.



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

end of thread, other threads:[~2021-05-19 14:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-19  7:22 kbd macro fails evaluation Colin Baxter
2021-05-19 13:15 ` Stefan Monnier
2021-05-19 14:02   ` Colin Baxter

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).