From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Nordl=F6w?= Newsgroups: gmane.emacs.help Subject: Re: Checking if a function is built-in Date: Tue, 10 Jun 2008 16:11:22 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1213141249 27212 80.91.229.12 (10 Jun 2008 23:40:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 10 Jun 2008 23:40:49 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jun 11 01:41:32 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1K6DT1-0000FM-S8 for geh-help-gnu-emacs@m.gmane.org; Wed, 11 Jun 2008 01:41:32 +0200 Original-Received: from localhost ([127.0.0.1]:39099 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K6DSE-0001l9-I8 for geh-help-gnu-emacs@m.gmane.org; Tue, 10 Jun 2008 19:40:42 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!8g2000hse.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 25 Original-NNTP-Posting-Host: 81.170.250.228 Original-X-Trace: posting.google.com 1213139482 10442 127.0.0.1 (10 Jun 2008 23:11:22 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Tue, 10 Jun 2008 23:11:22 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: 8g2000hse.googlegroups.com; posting-host=81.170.250.228; posting-account=ytJKAgoAAAA1tg4ScoRszebXiIldA5vg User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; sv-SE; rv:1.9) Gecko/2008060309 Firefox/3.0,gzip(gfe),gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:159343 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:54698 Archived-At: On 11 Juni, 00:51, "Drew Adams" wrote: > > > > Is there a predicate that can check if a function is built-in? > > > > subrp > > > I thought this was the way to use it (subrp 'cons) > > but it returns nil even though cons is a built-in function. > > Have I missed something? > > (subrp (symbol-function 'cons)) > > `cons' is just a symbol. What you want to test is the function that the sy= mbol > refers to. > > This is not the value of the symbol but the value of its function cell, wh= ich is > a function (a subr, in this case). Great! Now I got it! Many Thanks, Nordl=F6w