From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stephen J. Turnbull" Newsgroups: gmane.emacs.devel Subject: Re: Return Date: Fri, 10 Dec 2010 17:28:23 +0900 Message-ID: <87y67yrpzs.fsf@uwakimon.sk.tsukuba.ac.jp> References: <87mxojwu15.fsf@uwakimon.sk.tsukuba.ac.jp> <87k4jnweng.fsf@uwakimon.sk.tsukuba.ac.jp> <87sjya2b7d.fsf@lola.goethe.zz> <87aaketne9.fsf@uwakimon.sk.tsukuba.ac.jp> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1291969817 26102 80.91.229.12 (10 Dec 2010 08:30:17 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 10 Dec 2010 08:30:17 +0000 (UTC) Cc: David Kastrup , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 10 09:30:13 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PQyMm-0006d6-JL for ged-emacs-devel@m.gmane.org; Fri, 10 Dec 2010 09:30:12 +0100 Original-Received: from localhost ([127.0.0.1]:54369 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQyMl-0003xd-RL for ged-emacs-devel@m.gmane.org; Fri, 10 Dec 2010 03:30:11 -0500 Original-Received: from [140.186.70.92] (port=57201 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQyMg-0003xY-TU for emacs-devel@gnu.org; Fri, 10 Dec 2010 03:30:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PQyMg-0007UQ-06 for emacs-devel@gnu.org; Fri, 10 Dec 2010 03:30:06 -0500 Original-Received: from imss12.cc.tsukuba.ac.jp ([130.158.254.161]:38752) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PQyMd-0007SK-DP; Fri, 10 Dec 2010 03:30:03 -0500 Original-Received: from imss12.cc.tsukuba.ac.jp (imss12.cc.tsukuba.ac.jp [127.0.0.1]) by postfix.imss71 (Postfix) with ESMTP id AC0C92AF543; Fri, 10 Dec 2010 17:30:00 +0900 (JST) Original-Received: from mgmt1.sk.tsukuba.ac.jp (unknown [130.158.97.223]) by imss12.cc.tsukuba.ac.jp (Postfix) with ESMTP id 9E6952AF542; Fri, 10 Dec 2010 17:30:00 +0900 (JST) Original-Received: from uwakimon.sk.tsukuba.ac.jp (uwakimon.sk.tsukuba.ac.jp [130.158.99.156]) by mgmt1.sk.tsukuba.ac.jp (Postfix) with ESMTP id 9AA7B3FA04FB; Fri, 10 Dec 2010 17:30:00 +0900 (JST) Original-Received: by uwakimon.sk.tsukuba.ac.jp (Postfix, from userid 1000) id 033DE129CBF; Fri, 10 Dec 2010 17:28:23 +0900 (JST) In-Reply-To: X-Mailer: VM undefined under 21.5 (beta29) "garbanzo" ed3b274cc037 XEmacs Lucid (x86_64-unknown-linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:133567 Archived-At: Stefan Monnier writes: > >> > There are lots of reasons for doing a defun inside of a function. > >> Give me examples and I'll tell you if I consider them as > >> valuable enough. > > Anything you would use `require' for inside a function. Betcha find a > > dozen or more instances of require-in-a-function in Gnus alone. > > Irrelevant: the defuns in the loaded file are defined at the top-level > even if the require is called from within a function. Irrelevant: the defuns in the function are defined at the top-level even though defun is called from within a function. My point is that you could just as well do the defuns inside the function as in a require'd file. Much of the time it makes sense to split them out into a file, of course, but I don't see any good reason why that should be enforced if the author would prefer to put her defuns in a function. defun is always at top level, right? If I want a local function (which I do quite frequently) I use flet.