From: Ted Zlatanov <tzz@lifelogs.com>
To: emacs-devel@gnu.org
Subject: ELisp function prototypes and local function name
Date: Wed, 06 Apr 2011 08:36:38 -0500 [thread overview]
Message-ID: <87ei5fqz6h.fsf@lifelogs.com> (raw)
I often find myself needing to know the prototype of a function I'm
calling dynamically. Is there a way to get that? The ELisp reference
manual doesn't have the info AFAICT.
Also I'd like to have a simple way (tracing backwards through frames is
not it, because every form and its cousin get in there) to get the
symbol of the currently running function. So I could say:
(defun blah ()
(format "running in function %s" __FUNCTION_NAME__))
=> "running in function blah"
(defun info (function-name)
(format "called from function %s" function-name))
(defun blah ()
(info __FUNCTION_NAME__))
=> "called from function blah"
Is that possible?
Thanks
Ted
next reply other threads:[~2011-04-06 13:36 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-06 13:36 Ted Zlatanov [this message]
2011-04-06 15:19 ` ELisp function prototypes and local function name Robert Pluim
2011-04-06 15:58 ` Ted Zlatanov
2011-04-07 0:25 ` Stephen J. Turnbull
2011-04-07 2:27 ` Ted Zlatanov
2011-04-07 3:27 ` Stephen J. Turnbull
2011-04-07 3:55 ` Jambunathan K
2011-04-07 5:43 ` Stephen J. Turnbull
2011-04-07 20:51 ` Ted Zlatanov
2011-04-08 4:01 ` Stephen J. Turnbull
2011-04-08 5:43 ` Ted Zlatanov
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=87ei5fqz6h.fsf@lifelogs.com \
--to=tzz@lifelogs.com \
--cc=emacs-devel@gnu.org \
/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).