From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "Roland Winkler" Newsgroups: gmane.emacs.help Subject: let-bind a varlist only known at run time Date: Sun, 4 Jun 2017 15:43:37 -0500 Message-ID: <28921.59572.342625.22836@gargle.gargle.HOWL> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1496610012 22855 195.159.176.226 (4 Jun 2017 21:00:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 4 Jun 2017 21:00:12 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jun 04 23:00:04 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHcd2-0005Sh-4x for geh-help-gnu-emacs@m.gmane.org; Sun, 04 Jun 2017 23:00:04 +0200 Original-Received: from localhost ([::1]:58677 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dHcd7-00061F-HP for geh-help-gnu-emacs@m.gmane.org; Sun, 04 Jun 2017 17:00:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57514) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dHcN9-0002Xr-Pv for help-gnu-emacs@gnu.org; Sun, 04 Jun 2017 16:43:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dHcN9-0004pN-2r for help-gnu-emacs@gnu.org; Sun, 04 Jun 2017 16:43:39 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:58177) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dHcN8-0004pF-Un for help-gnu-emacs@gnu.org; Sun, 04 Jun 2017 16:43:38 -0400 Original-Received: from [2602:30a:2e52:d720:65b7:1416:12e7:8bfb] (port=57780 helo=regnitz) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1dHcN8-0008GT-Az for help-gnu-emacs@gnu.org; Sun, 04 Jun 2017 16:43:38 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Mailman-Approved-At: Sun, 04 Jun 2017 16:59:43 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.help:113355 Archived-At: Normally the varlist for the special let form is hardcoded. Is it possible to specify the varlist only at runtime? The usage scenario I have in mind is that a user variable foo-alist may hold an alist that becomes the varlist for the let-binding. So it's not known at compile time which bindings a user might want to specify in foo-alist. Also, it might be hard to predict an exhaustive list of "candidate variables" a user might want to put into foo-alist (and certainly such a list would be hard to maintain). On the other hand, I expect that efficiency is not an issue for the body appearing in let. So if there is nothing else I could construct the complete let-form at runtime and pass it on to `eval'. But maybe there is a better solution... Thanks! Roland