unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Joost Diepenmaat <joost@zeekat.nl>
To: help-gnu-emacs@gnu.org
Subject: Re: Looking up the source of a builtin function (subroutine)
Date: Mon, 03 Nov 2008 17:25:57 +0100	[thread overview]
Message-ID: <87prlcpyi2.fsf@zeekat.nl> (raw)
In-Reply-To: e6d0a722-d2ef-467c-ba8e-103e4ee02cff@d36g2000prf.googlegroups.com

Nordlöw <per.nordlow@gmail.com> writes:

> On 3 Nov, 16:59, Paul R <paul.r...@gmail.com> wrote:
>> Nordlöw> How do I lookup the C source file for a builtin function
>> Nordlöw> (sub-routine) like symbol-file() does for emacs lisp?
>>
>> I assume you want to do so interactively, then :
>>
>> C-h f your-function-name RET
>>
>> You will need to have emacs sources installed, obviously. If you did not
>> build emacs from source, you probably have to find a package that
>> provides them.
>>
>> --
>>   Paul
>
> How do I do it from emacs lisp code?

Looking at the source for describe-function and describe-function-1:

(find-lisp-object-file-name 'car (symbol-function 'car))

replace 'car with any symbol denoting a function

-- 
Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/


      reply	other threads:[~2008-11-03 16:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-03 13:47 Looking up the source of a builtin function (subroutine) Nordlöw
2008-11-03 15:59 ` Paul R
     [not found] ` <mailman.2778.1225728006.25473.help-gnu-emacs@gnu.org>
2008-11-03 16:03   ` Nordlöw
2008-11-03 16:25     ` Joost Diepenmaat [this message]

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=87prlcpyi2.fsf@zeekat.nl \
    --to=joost@zeekat.nl \
    --cc=help-gnu-emacs@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.
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).