unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Robert Weiner <rsw@gnu.org>
To: emacs-devel <emacs-devel@gnu.org>
Cc: 23873@debbugs.gnu.org, Stephen Berman <stephen.berman@gmx.net>
Subject: 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	[thread overview]
Message-ID: <CA+OMD9hkVxVptH5Y_FyVKpHn7yDz++=DOY=1B_AxfnqdZ2tMow@mail.gmail.com> (raw)

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	other threads:[~2016-06-30 14:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <871t3edfd9.fsf@gmx.net>
2016-06-30 14:11 ` Robert Weiner [this message]
2016-06-30 14:51   ` Emacs 24.0.94: With function argdesc bitstring, Elisp manual does not say how to get arg list Drew Adams
2016-06-30 15:46   ` bug#23873: " Robert Weiner
2016-06-30 23:20     ` Richard Stallman
2016-07-01 12:14       ` Robert Weiner
2016-07-01 14:01         ` Drew Adams
2016-07-01 22:04         ` Richard Stallman
2016-07-01 22:43           ` Robert Weiner
2016-06-30 16:30   ` Robert Weiner
2016-07-06 21:57   ` bug#23873: " Robert Weiner
2016-07-06 23:32     ` Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CA+OMD9hkVxVptH5Y_FyVKpHn7yDz++=DOY=1B_AxfnqdZ2tMow@mail.gmail.com' \
    --to=rsw@gnu.org \
    --cc=23873@debbugs.gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=rswgnu@gmail.com \
    --cc=stephen.berman@gmx.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).