From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] trunk r117982: * ses.el (ses-calculate-cell): bind row and col dynamically to Date: Fri, 03 Oct 2014 08:17:48 -0400 Message-ID: References: <80vbo1o7dt.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1412338702 20051 80.91.229.3 (3 Oct 2014 12:18:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 3 Oct 2014 12:18:22 +0000 (UTC) Cc: emacs-devel@gnu.org To: Vincent =?windows-1252?Q?Bela=EFche?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 03 14:18:15 2014 Return-path: Envelope-to: ged-emacs-devel@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 1Xa1oM-0006Yb-P0 for ged-emacs-devel@m.gmane.org; Fri, 03 Oct 2014 14:18:14 +0200 Original-Received: from localhost ([::1]:39184 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xa1oM-0007dr-9g for ged-emacs-devel@m.gmane.org; Fri, 03 Oct 2014 08:18:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44649) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xa1o4-0007di-Gz for emacs-devel@gnu.org; Fri, 03 Oct 2014 08:18:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xa1nx-0003gr-0A for emacs-devel@gnu.org; Fri, 03 Oct 2014 08:17:56 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:6230) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xa1nw-0003gi-SI for emacs-devel@gnu.org; Fri, 03 Oct 2014 08:17:48 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArUGAIDvNVNFxKjo/2dsb2JhbABZgwaDSsA9gRcXdIIlAQEBAQIBViMFCws0EhQYDSSIBAjSGReOegeEOASpGYFqgXGBWyE X-IPAS-Result: ArUGAIDvNVNFxKjo/2dsb2JhbABZgwaDSsA9gRcXdIIlAQEBAQIBViMFCws0EhQYDSSIBAjSGReOegeEOASpGYFqgXGBWyE X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="91573409" Original-Received: from 69-196-168-232.dsl.teksavvy.com (HELO pastel.home) ([69.196.168.232]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 03 Oct 2014 08:17:48 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 487A98597; Fri, 3 Oct 2014 08:17:48 -0400 (EDT) In-Reply-To: <80vbo1o7dt.fsf@gmail.com> ("Vincent =?windows-1252?Q?Bela=EF?= =?windows-1252?Q?che=22's?= message of "Fri, 03 Oct 2014 11:00:14 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:174950 Archived-At: >> Why use cl-progv here? It's *much* less efficient than a plain `let'. > Well, I can revert to let if you want, but I thought --- mistakenly? --- > that a 'let' combined with the lexical binding cookie would make a > lexical binding to what is in the body of let, and that there may be > some functions (e.g. ses-export-tab) using these row col maxrow and > maxcol without explicit argument passing. The normal way to get a dynamically-scoped let-binding is to do: (defvar ses-foo) ... (defun ses-bar (..) .. (let ((ses-foo toto)) ...)) > These function would then get incorrect nil values from the defvar's. The defvar does not give any value to the variable. It only declares it as dynamically scoped. > Please let me know if the correct way forward would be to have a let > *AND* functions using explicit argument passing to get row, col, maxrow, > maxcol etc... Then I can do the changes accordingly. Thanks. But I already changed the code in a way that makes row/col/maxrow/maxcol statically scoped anyway. Stefan