From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Gauthier_=D6stervall?= Newsgroups: gmane.emacs.help Subject: Re: sending function arguments to recursive function calls Date: Thu, 9 May 2013 10:35:36 +0200 Message-ID: References: <0F54256BD7B94384AC4DDA919D502C20@us.oracle.com> <4D1DF48A7223443FA454C07B20B80E21@us.oracle.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1368088578 11692 80.91.229.3 (9 May 2013 08:36:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 9 May 2013 08:36:18 +0000 (UTC) To: Stefan Monnier , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu May 09 10:36:18 2013 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 1UaMKn-0004tZ-GC for geh-help-gnu-emacs@m.gmane.org; Thu, 09 May 2013 10:36:17 +0200 Original-Received: from localhost ([::1]:57710 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UaMKm-0005Lb-IC for geh-help-gnu-emacs@m.gmane.org; Thu, 09 May 2013 04:36:16 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:35128) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UaMKX-0005KS-Tg for help-gnu-emacs@gnu.org; Thu, 09 May 2013 04:36:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UaMKU-0005MF-TO for help-gnu-emacs@gnu.org; Thu, 09 May 2013 04:36:01 -0400 Original-Received: from mail-we0-x22f.google.com ([2a00:1450:400c:c03::22f]:48606) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UaMKU-0005Lr-Ix for help-gnu-emacs@gnu.org; Thu, 09 May 2013 04:35:58 -0400 Original-Received: by mail-we0-f175.google.com with SMTP id p57so2626338wes.6 for ; Thu, 09 May 2013 01:35:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:x-originating-ip:in-reply-to:references :from:date:message-id:subject:to:content-type:x-gm-message-state; bh=gG3N9vo0Z0nyqEfH8R9PBb9cFRjtVb5IoCk5L0d9TQw=; b=dAtTeK4CjADPhZL4MNFzPdg5vH3JLHbyUmu16tCBrPReoq4DC6Sacr4Hxp4Y/tssZ1 7Uqy1wMlkbiHiqfGnbQkRQ2WPxG5ekCyvwE3ltl+a+HtSvtAgZFvdM5UXpw6W7BQ7WD7 iM8NLaOFt4+eh7U8ro0/4Y/nO2ySAxHq9cy1QgAhmI+PPHMk9y5S6YnuF0Ramy7NijH8 OnW9wOBPRd7VmD2k2S0KQIlrmEH3DQR7CK3dV/pKBFmXpPCZUgH/ZO+wIlvam370Q3Mt T4lUKBtccBdo3Mzm4voicJTAxkpvZncoDR1DEmOGSysl8DIm0QRb5SX+up8Goe2DuJF0 i9XA== X-Received: by 10.180.160.134 with SMTP id xk6mr19380540wib.21.1368088556746; Thu, 09 May 2013 01:35:56 -0700 (PDT) Original-Received: by 10.180.11.74 with HTTP; Thu, 9 May 2013 01:35:36 -0700 (PDT) X-Originating-IP: [83.248.165.178] In-Reply-To: X-Gm-Message-State: ALoCoQlFz6nlE0ea7gjWVEfKdBuj7zu42nC4FLwrUj7YJhoiYcmYHrp+IZV3vN+sWLKC1a8moqe2 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c03::22f 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:90566 Archived-At: On Wed, May 8, 2013 at 2:21 PM, Stefan Monnier wrote: > Actually, Emacs's lexical-binding variant of Elisp is pretty close to > Common Lisp: the default binding is lexical but you can use dynamic > binding for specific cases. > > The difference is that Emacs has to keep the old compatibility mode > where lexical-binding is nil, whereas Common-Lisp never had such a thing. > >> Lexical binding was added to Emacs relatively recently. With time, >> perhaps it and dynamic binding will become better roommates. > > When lexical-binding is t, they're very good roomates already. > Hopefully with time, the "lexical-binding = nil" case can be dropped. If I have an existing file with lexical-binding = nil, and I want to add more functions to that file, what is then the preferred way to do it? Should I write the new function with lexical-binding = t? Isn't it risky or wrong to set lexical-binding at the top of the file (like face-remap.el does), what would happen to the other functions, which earlier had lexical-binding = nil? Is there a way (and is it better) to set lexical-binding = t locally for the new function? Or is it better to make the new function work with lexical-binding = nil, despite the caveats described by Pascal?