bug-hyperbole
[Top][All Lists]
Advanced

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

bug#23873: Emacs 24.0.94: With function argdesc bitstring, Elisp manual


From: Robert Weiner
Subject: bug#23873: Emacs 24.0.94: With function argdesc bitstring, Elisp manual does not say how to get arg list
Date: Thu, 30 Jun 2016 10:11:34 -0400

Is there a Lisp function to extract the argument list of a byte-coded
function when it uses the bitstring arg descriptor in its first
element (see below for the Elisp manual doc on this)?

I would suggest that the documentation be updated to describe how to
get the argument signature in this situation, as it is silent on that.

This has come up when a standard function was advised and we need to
get its argument list for some code handling.

Thanks,

Bob

---------

   Internally, a byte-code function object is much like a vector; its
elements can be accessed using ‘aref’.  Its printed representation is
like that for a vector, with an additional ‘#’ before the opening ‘[’.
It must have at least four elements; there is no maximum number, but
only the first six elements have any normal use.  They are:

ARGDESC
     The descriptor of the arguments.  This can either be a list of
     arguments, as described in *note Argument List::, or an integer
     encoding the required number of arguments.  In the latter case, the
     value of the descriptor specifies the minimum number of arguments
     in the bits zero to 6, and the maximum number of arguments in bits
     8 to 14.  If the argument list uses ‘&rest’, then bit 7 is set;
     otherwise it’s cleared.

     If ARGDESC is a list, the arguments will be dynamically bound
     before executing the byte code.  If ARGDESC is an integer, the
     arguments will be instead pushed onto the stack of the byte-code
     interpreter, before executing the code.





reply via email to

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