From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.help Subject: Re: Real-life examples of lexical binding in Emacs Lisp Date: Fri, 29 May 2015 15:13:48 +0300 Message-ID: <556857FC.6050904@yandex.ru> References: <55684990.80108@easy-emacs.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1432901669 2638 80.91.229.3 (29 May 2015 12:14:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 29 May 2015 12:14:29 +0000 (UTC) To: =?UTF-8?Q?Andreas_R=c3=b6hler?= , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri May 29 14:14:28 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 1YyJB3-0006WM-2X for geh-help-gnu-emacs@m.gmane.org; Fri, 29 May 2015 14:14:17 +0200 Original-Received: from localhost ([::1]:35496 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyJB2-0002bw-AU for geh-help-gnu-emacs@m.gmane.org; Fri, 29 May 2015 08:14:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35761) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyJAr-0002bm-Dr for help-gnu-emacs@gnu.org; Fri, 29 May 2015 08:14:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YyJAn-0001WF-8d for help-gnu-emacs@gnu.org; Fri, 29 May 2015 08:14:05 -0400 Original-Received: from mail-wi0-x236.google.com ([2a00:1450:400c:c05::236]:33619) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyJAn-0001PW-1a for help-gnu-emacs@gnu.org; Fri, 29 May 2015 08:14:01 -0400 Original-Received: by wicmx19 with SMTP id mx19so14321540wic.0 for ; Fri, 29 May 2015 05:13:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=w5rkx3zhuDUTa+1ZdpgQPMuHs63oOOezPN84fH3LdtM=; b=wgkGzVlJGFQyswqnWSNi3nic5t5vuJnIx43g2G/QTHhUE1GwCq6DYzPOM1RU341Vfg mDEVzeQYvO5cvUd+skU8glzf6//0F5iYcrE/ruuJsiipPi3wQRaNTpHiXCKjZRIJ0DGn VAG/bW0icNl3wIgaKwRIKT8NnBfcNGA/V237PVvQDZIALgoOnxt52qKwpRp+qFLtQE9N 1f0xrHNuWTZQ6rsgiXauF3ToQY0Yy/iVC4TR3DAvkR6jSCxb+lLTWoXhAFWtDOJ/m26O IDZ+5ynUPkyl/n36u3x7qCvd9392eLYIwCUPqQetzc6A0DVbP199ftv/OEUUYOIDTu7L hqnw== X-Received: by 10.194.220.100 with SMTP id pv4mr15059599wjc.71.1432901631065; Fri, 29 May 2015 05:13:51 -0700 (PDT) Original-Received: from [192.168.1.2] ([82.102.93.54]) by mx.google.com with ESMTPSA id j7sm8084440wjz.11.2015.05.29.05.13.50 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 May 2015 05:13:50 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0 In-Reply-To: <55684990.80108@easy-emacs.de> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::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:104663 Archived-At: On 05/29/2015 02:12 PM, Andreas Röhler wrote: > Would be great to see an example where implementing the text editor is > easier that way. - Lexical scoping is easier to reason about. The byte-compiler also takes advantage of it and produces more useful warnings. - You can use normal closures instead of having to create lambda forms with quasiquotes for callbacks (or save the values somewhere globally).