From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: LanX Newsgroups: gmane.emacs.help Subject: Are there any problems with lexical-let or other cl-macros??? Date: Tue, 1 Jun 2010 06:01:38 -0700 (PDT) Organization: http://groups.google.com Message-ID: <5ad73987-3540-44a3-b4b1-b83c92d92526@q23g2000vba.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1291825078 8891 80.91.229.12 (8 Dec 2010 16:17:58 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 8 Dec 2010 16:17:58 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Dec 08 17:17:54 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PQMiG-0000M9-7M for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Dec 2010 17:17:52 +0100 Original-Received: from localhost ([127.0.0.1]:41205 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQMiF-0007lR-Gu for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Dec 2010 11:17:51 -0500 Original-Path: usenet.stanford.edu!postnews.google.com!q23g2000vba.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 30 Original-NNTP-Posting-Host: 188.97.6.227 Original-X-Trace: posting.google.com 1275397298 30289 127.0.0.1 (1 Jun 2010 13:01:38 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Tue, 1 Jun 2010 13:01:38 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: q23g2000vba.googlegroups.com; posting-host=188.97.6.227; posting-account=W9fpQwoAAADZYmkl-8sXk1VPxG3rq-Pd User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.0.19) Gecko/2010040118 Ubuntu/8.10 (intrepid) Firefox/3.0.19,gzip(gfe) Original-Xref: usenet.stanford.edu gnu.emacs.help:178526 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:75595 Archived-At: Hi http://steve-yegge.blogspot.com/2008/11/ejacs-javascript-interpreter-for-emacs.html steve yegge complains about missing lexical vars roughly giving this example (require 'cl) (defun foo () (setq x 7)) (defun bar () (let ((x 6)) (foo) x)) ; you would expect x to still be 6 here (message (number-to-string (bar))) What I don't understand is that simply replacing let with lexical-let will solve the problem. IMHO "let" corresponds to "local" in perl while "lexical-let" is "my" and everything seems to work as expected... What am I missing? Whats the problem with using cl macros, do they introduce any new and ugly side effects better avoided? Cheers Rolf