From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rusi Newsgroups: gmane.emacs.help Subject: Re: Real-life examples of lexical binding in Emacs Lisp Date: Fri, 29 May 2015 22:49:38 -0700 (PDT) Message-ID: <7b497693-bd08-45c0-99f4-e70836437535@googlegroups.com> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1432965023 726 80.91.229.3 (30 May 2015 05:50:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 30 May 2015 05:50:23 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat May 30 07:50:22 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 1YyZf4-0008W2-1k for geh-help-gnu-emacs@m.gmane.org; Sat, 30 May 2015 07:50:22 +0200 Original-Received: from localhost ([::1]:38437 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyZf3-00044C-52 for geh-help-gnu-emacs@m.gmane.org; Sat, 30 May 2015 01:50:21 -0400 X-Received: by 10.50.111.194 with SMTP id ik2mr1493399igb.4.1432964978767; Fri, 29 May 2015 22:49:38 -0700 (PDT) X-Received: by 10.50.12.66 with SMTP id w2mr12897igb.11.1432964978755; Fri, 29 May 2015 22:49:38 -0700 (PDT) Original-Path: usenet.stanford.edu!h15no527384igd.0!news-out.google.com!n7ni47953igk.0!nntp.google.com!h15no280152igd.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=59.94.118.167; posting-account=mBpa7woAAAAGLEWUUKpmbxm-Quu5D8ui Original-NNTP-Posting-Host: 59.94.118.167 User-Agent: G2/1.0 Injection-Date: Sat, 30 May 2015 05:49:38 +0000 Original-Xref: usenet.stanford.edu gnu.emacs.help:212391 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:104675 Archived-At: On Friday, May 29, 2015 at 1:59:14 PM UTC+5:30, Marcin Borkowski wrote: > Hi all, > > I googled a bit, and could not find /real-world/ examples of using > lexical binding and its advantages /in Emacs Lisp/. I understand that > it's a nice thing to be able to create closures, and that lexical > binding is in general faster than dynamic binding (which is a bonus in > itself), but could anyone show me a real /text editing/ problem that > lexical binding solves, like something that is easier done with > l.b. than with d.b.? (Examples of general-purpose programming problems > made easier with l.b. are more or less obvious/easy to find, but Emacs > is a text editor, after all, and this is its primary area.) I'd say you are getting this from the wrong end. Today (2015) dynamic scoping is considered a bug In 1960 when Lisp was invented of course people did not realize this. This is just a belated bug-fix [More OT] Ive been collecting material on history of functional programming and looking for early references on 'Lisp-as-a-functional-language'. Note I am not asking for early references on Lisp or on FP but on Lisp as FP. I know of Henderson's 1980 book on FP that uses Lisp. I'm looking for something earlier and more 'mainstream'