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: Sun, 12 May 2013 15:19:09 +0200 Message-ID: References: <0F54256BD7B94384AC4DDA919D502C20@us.oracle.com> <4D1DF48A7223443FA454C07B20B80E21@us.oracle.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=f46d0438900100ae3b04dc854041 X-Trace: ger.gmane.org 1368364792 28080 80.91.229.3 (12 May 2013 13:19:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 12 May 2013 13:19:52 +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 Sun May 12 15:19:51 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 1UbWBq-0001iE-TA for geh-help-gnu-emacs@m.gmane.org; Sun, 12 May 2013 15:19:51 +0200 Original-Received: from localhost ([::1]:57402 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UbWBq-0006dE-BO for geh-help-gnu-emacs@m.gmane.org; Sun, 12 May 2013 09:19:50 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:47699) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UbWBb-0006d4-3V for help-gnu-emacs@gnu.org; Sun, 12 May 2013 09:19:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UbWBW-00060f-Sf for help-gnu-emacs@gnu.org; Sun, 12 May 2013 09:19:35 -0400 Original-Received: from mail-we0-x236.google.com ([2a00:1450:400c:c03::236]:39885) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UbWBW-00060C-KQ for help-gnu-emacs@gnu.org; Sun, 12 May 2013 09:19:30 -0400 Original-Received: by mail-we0-f182.google.com with SMTP id t60so5510535wes.27 for ; Sun, 12 May 2013 06:19:29 -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=o3BrU52KpJGgfaz6fc9XHEW5hBjhwxEfl52UlHcBkpE=; b=iKdGvrYC/0ZMgE+1mr484nKqeOKcS4Jxihswn2gzGWRr3gybKi552Ld/Xtxu0TbWV4 1lf+HTeq6FJRCoD4G+qkyDAWg+a+U5iNkSLhCcV0fpRu6LsfNdypQFKE0slFLO1OO7Ai D8um8HmRKCeipLjLXuKvUOqPTJdfFhDo0CME1Q1vJxo9oJw96QT1D6a+XxFtk1B1kPq6 YR6bZ4Utyw0crCV4tcTUgNM8b7qvl13vninmvIbgCFb5emplAFVVP5ulVRNB4uvJ9AxP PAZxxrBJNhnLkOh0Y7H7UTdejFp7ErnYwaeEr+lgHMVpTvKk/0vgxsym9OWPRa+aYFXD hGyQ== X-Received: by 10.180.74.172 with SMTP id u12mr13533678wiv.0.1368364769384; Sun, 12 May 2013 06:19:29 -0700 (PDT) Original-Received: by 10.180.11.74 with HTTP; Sun, 12 May 2013 06:19:09 -0700 (PDT) X-Originating-IP: [83.248.165.178] In-Reply-To: X-Gm-Message-State: ALoCoQnStLR5HJalH8ow14aEPYpAEohkJNLDZ8NbSIa9hmJbveBEHRHggtlk3vKvSqwC4GdJAfUh X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c03::236 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:90661 Archived-At: --f46d0438900100ae3b04dc854041 Content-Type: text/plain; charset=ISO-8859-1 On Wed, May 8, 2013 at 2:21 PM, Stefan Monnier wrote: > When lexical-binding is t, they're very good roomates already. > Hopefully with time, the "lexical-binding = nil" case can be dropped. Does this imply that if I want to give for example window.el lexical-binding (I do have an ulterior motive), no one would mind having it that way? > [...] But converting existing dynamically scoped code to lexical scoping > is usually pretty easy: set lexical-binding to t at the top of the file, > then byte-compile it, then fix the warnings, and you should be good to go. > > Sometimes there's some extra tricks undetected by the simple checks > performed by the byte-compiler, so it doesn't always work as smoothly, > but in most cases it's really a straightforward process. I have tried to do just that to window.el. It seemed indeed straightforward to me, but I would greatly appreciate feedback on the change. I really just added the lexical-binding at the top, and removed seemingly unused variables. I don't know why these variables were left (were they really unused?), but byte-compiling gives no warning, at least. See attached bundle. --f46d0438900100ae3b04dc854041 Content-Type: text/plain; charset=US-ASCII; name="make-window-lexical.txt" Content-Disposition: attachment; filename="make-window-lexical.txt" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hgm8wzd50 IyBCYXphYXIgbWVyZ2UgZGlyZWN0aXZlIGZvcm1hdCAyIChCYXphYXIgMC45MCkKIyByZXZpc2lv bl9pZDogZ2F1dGhpZXJAb3N0ZXJ2YWxsLnNlLTIwMTMwNTEyMTMwNzIwLWhwdGhyd24wNDhucmo0 YW8KIyB0YXJnZXRfYnJhbmNoOiBmaWxlOi8vL21lZGlhL3NmX3Byb2cvZW1hY3MvdHJ1bmsvCiMg dGVzdGFtZW50X3NoYTE6IDI4OGFhNTk1YzE3ZDBkNzkyM2FhNzJkMWNiZTI1YTNhM2IwODEzODAK IyB0aW1lc3RhbXA6IDIwMTMtMDUtMTIgMTU6MDk6NTQgKzAyMDAKIyBiYXNlX3JldmlzaW9uX2lk OiByZ21AZ251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pCi0JKHNsb3QgKG9yIChjZHIgKGFzc3EgJ3Nsb3Qg YWxpc3QpKSAwKSkKLQluZXcpCisgICAgICAgIChzbG90IChvciAoY2RyIChhc3NxICdzbG90IGFs aXN0KSkgMCkpKQogICAgIChjb25kCiAgICAgICgobm90IChtZW1xIHNpZGUgJyh0b3AgYm90dG9t IGxlZnQgcmlnaHQpKSkKICAgICAgIChlcnJvciAiSW52YWxpZCBzaWRlICVzIHNwZWNpZmllZCIg c2lkZSkpCkBAIC03NzYsOSArNzcyLDggQEAKIAkJICAoKGVxIHNpZGUgJ3JpZ2h0KSAyKQogCQkg ICgoZXEgc2lkZSAnYm90dG9tKSAzKSkKIAkJIHdpbmRvdy1zaWRlcy1zbG90cykpCi0JICAgKHNl bGVjdGVkLXdpbmRvdyAoc2VsZWN0ZWQtd2luZG93KSkKLQkgICB3aW5kb3cgdGhpcy13aW5kb3cg dGhpcy1zbG90IHByZXYtd2luZG93IG5leHQtd2luZG93Ci0JICAgYmVzdC13aW5kb3cgYmVzdC1z bG90IGFicy1zbG90IG5ldy13aW5kb3cpCisgICAgICAgICAgIHdpbmRvdyB0aGlzLXdpbmRvdyB0 aGlzLXNsb3QgcHJldi13aW5kb3cgbmV4dC13aW5kb3cKKyAgICAgICAgICAgYmVzdC13aW5kb3cg YmVzdC1zbG90IGFicy1zbG90KQogCiAgICAgICAoY29uZAogICAgICAgICgoYW5kIChudW1iZXJw IG1heC1zbG90cykgKDw9IG1heC1zbG90cyAwKSkKQEAgLTU3MTMsNyArNTcwOCw3IEBACiAJCSAg IDApCiAJCSAgKGRpc3BsYXktYnVmZmVyLXJldXNlLWZyYW1lcyAwKQogCQkgICh0IChsYXN0LW5v bm1pbmlidWZmZXItZnJhbWUpKSkpCi0JIGVudHJ5IGJlc3Qtd2luZG93IHNlY29uZC1iZXN0LXdp bmRvdyB3aW5kb3cpCisgICAgICAgICBiZXN0LXdpbmRvdyBzZWNvbmQtYmVzdC13aW5kb3cgd2lu ZG93KQogICAgID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