emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

kbd macro fails evaluation


From: Colin Baxter
Subject: kbd macro fails evaluation
Date: Wed, 19 May 2021 08:22:26 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]