From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Hannu Koivisto Newsgroups: gmane.emacs.help Subject: Re: 'let' for functions ? Date: Thu, 31 Oct 2002 16:18:13 +0200 Organization: NOYB Sender: help-gnu-emacs-admin@gnu.org Message-ID: <87vg3i4rq2.fsf@lynx.ionific.com> References: <1036073066.48586.0@iris.uk.clara.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1036074115 23160 80.91.224.249 (31 Oct 2002 14:21:55 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 31 Oct 2002 14:21:55 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 187GCo-00061O-00 for ; Thu, 31 Oct 2002 15:21:54 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 187GCW-0004zk-00; Thu, 31 Oct 2002 09:21:36 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!uio.no!newsfeed.song.fi!feeder1.news.jippii.net!reader1.news.jippii.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 24 User-Agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.2 (i686-pc-linux-gnu) Cancel-Lock: sha1:ZixO2RzwC/g9Nm7ikpIGYDzKjSo= Original-NNTP-Posting-Host: 195.197.252.71 Original-X-Complaints-To: newsmaster@jippii.net Original-X-Trace: reader1.news.jippii.net 1036073894 195.197.252.71 (Thu, 31 Oct 2002 16:18:14 EET) Original-NNTP-Posting-Date: Thu, 31 Oct 2002 16:18:14 EET Original-Xref: shelby.stanford.edu gnu.emacs.help:106617 Original-To: help-gnu-emacs@gnu.org Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:3169 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:3169 chris@example.org writes: > I just wondered if it is possible to get the lexical scoping effect for > functions that 'let' and related functions provide for variables. Note that Emacs Lisp is dynamically scoped, thus let does not provide lexical scoping but dynamic scoping. > i.e I want to be able to do something like this : > > (let ((funca funcb)) > (require 'foolib)) You can use flet (or labels if you need recursion) from the cl package: (require 'cl) (flet ((funca (&rest args) (apply 'funcb args))) (require 'foolib)) -- Hannu