Subject: bug#14206: 24.3.50; doc string of `execute-kbd-macro'

From: Eli Zaretskii <[email-masked]>
Date: Fri, 29 Apr 2016 09:56:11 +0300

> From: Lars Ingebrigtsen <[email-masked]>
> Date: Fri, 29 Apr 2016 01:29:17 +0200
> Cc: [email-masked]
> 
> Lars Ingebrigtsen <[email-masked]> writes:
> 
> > Kevin Rodgers <[email-masked]> writes:
> >
> >>> (defun foo () "foo")
> >>>
> >>> (execute-kbd-macro 'foo)
> >>>
> >>> ->
> >>>
> >>> Debugger entered--Lisp error: (error "Keyboard macros must be
> >>> strings or vectors")
> >>>    execute-kbd-macro(foo)
> >>>    eval((execute-kbd-macro (quote foo)) nil)
> >
> > So is the "If MACRO is a symbol, its function definition is used." thing
> > wrong?
> 
> This is what Fexecute_kbd_macro does:
> 
>   final = indirect_function (macro);
>   if (!STRINGP (final) && !VECTORP (final))
>     error ("Keyboard macros must be strings or vectors");
> 
> In what contexts can a function end up being a string?  Uhm...  If
> somebody has said
> 
> (fset 'foo "bar")
> 
> ?

No, I think (fset 'foo "\M-:").

IOW, an indirect function could produce a macro, right?

In general, keyboard macros produce strings like that, which I'm sure
you know, so I'm not sure if I understand your question.