From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Barry Margolin Newsgroups: gmane.emacs.help Subject: Re: nested defsubst? Date: Mon, 10 Aug 2015 02:15:50 -0500 Organization: A noiseless patient Spider Message-ID: References: NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1439191219 24561 80.91.229.3 (10 Aug 2015 07:20:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 10 Aug 2015 07:20:19 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Aug 10 09:20:18 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZOhNY-0006a3-T0 for geh-help-gnu-emacs@m.gmane.org; Mon, 10 Aug 2015 09:20:17 +0200 Original-Received: from localhost ([::1]:57232 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZOhNY-0004CH-4f for geh-help-gnu-emacs@m.gmane.org; Mon, 10 Aug 2015 03:20:16 -0400 Original-Path: usenet.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!feeds.phibee-telecom.net!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!barmar.motzarella.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 36 Injection-Info: barmar.motzarella.org; posting-host="fe5f2cc61fef7c699db91cb9d217e15e"; logging-data="30174"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Df10kWtNLVcVUPUh3Yg3z" User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) Cancel-Lock: sha1:z8bCc7hBRcg5bXxCH7kEEO3i+O8= Original-Xref: usenet.stanford.edu gnu.emacs.help:214150 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:106434 Archived-At: In article , Ian Zimmerman wrote: > Is it useful? That is, if I do this: > > (defsubst foo () > "foo") > > (defsubst foobar () > (concat (foo) "bar")) > > will foobar contain an inlined copy of foo, _and_ will subsequent calls > to foobar be inlined? Yes to both. To determine this, compile them and then use M-x disassemble to see whether it's inlined. (defun use-foobar () (foobar)) M-x compile-defun M-x disassemble use-foobar byte code for use-foobar: args: nil 0 constant "foo" 1 constant "bar" 2 concat2 3 return -- Barry Margolin, barmar@alum.mit.edu Arlington, MA *** PLEASE post questions in newsgroups, not directly to me ***