[Top][All Lists]

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

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

From: Lars Ingebrigtsen
Subject: bug#14206: 24.3.50; doc string of `execute-kbd-macro'
Date: Fri, 29 Apr 2016 01:29:17 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Lars Ingebrigtsen <address@hidden> writes:

> Kevin Rodgers <address@hidden> 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")


Is this a useful thing?  Should it be documented?  I can't see any
callers in the Emacs code base calling `execute-kbd-macro' with a symbol
after grepping a bit...

(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no

reply via email to

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