From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Joost Kremers Newsgroups: gmane.emacs.help Subject: Re: Understanding the "let" construct and the setting of variables Date: Thu, 17 Dec 2020 09:50:50 +0100 Message-ID: <87czz824se.fsf@fastmail.fm> References: <87zh2d1byp.fsf@fastmail.fm> <87r1no26q1.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13779"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.5.7; emacs 27.1.50 Cc: help-gnu-emacs@gnu.org To: steve-humphreys@gmx.com Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 17 09:55:11 2020 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kpp43-0003T6-AR for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 17 Dec 2020 09:55:11 +0100 Original-Received: from localhost ([::1]:33792 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kpp42-0000rP-BL for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 17 Dec 2020 03:55:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38514) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kpp1L-00072b-Pt for help-gnu-emacs@gnu.org; Thu, 17 Dec 2020 03:52:23 -0500 Original-Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:42879) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kpp1K-0007ob-3m for help-gnu-emacs@gnu.org; Thu, 17 Dec 2020 03:52:23 -0500 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 4D18F7BA; Thu, 17 Dec 2020 03:52:20 -0500 (EST) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 17 Dec 2020 03:52:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= references:from:to:cc:subject:date:in-reply-to:message-id :mime-version:content-type; s=fm1; bh=RvBUJaElaYIu210wXsA+imNt2b Du1mVpMOV2HUGg06E=; b=HjABssUBN6kWUTudSXKjz8Hcil/NZR9UowZLEua+7f KyWAsGKILTtILgr2VV0ccVCuEFK7Y1Hgky6BUCJVU8Tvmf/yqvJHF6/5L4/VKlUV w6L18Fkg+Lhbx3T49nb77d+u+MfrVf3GVErEtxocNZfTpPZcR5kPvxpzxbCeN5M1 ukDeFZiOp4nFX6K3XM5lt6OzzDDAxQF5CQFNCEGp4KXDOdj6zbty+988SASsgLQ4 yF38Wkh71RF3wQ+aYVM/nu2arHcxSaxTIhfuaeCTAAevFCz3QCz3EHpk8YJPbfAV dGe27nhRfA8KWc1zzA4kdtSg4lkDUOj3tDhNjqPRh2sQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=RvBUJa ElaYIu210wXsA+imNt2bDu1mVpMOV2HUGg06E=; b=WzCYRlPtlX1q8O8cSN91y0 8MfSEXhBcAnCiNV0qOSdCjviL07vH/i7VK2h/6g0ORW//yTUDO0b9cxvSR2aHRPC RwK3e1NvBNLba/U9h5ZqaWlhCSteW568+vZmLNq3id9fclWNVbVPgHCLhByz60xh yZTSw6OMluH6cIlORGMn1eGwX5n2Jp5FPVhU9zXkMR5GiqImM9UJbEfBTyqmEG0F WTCaeHr6NuMSUtbpzCKbrYMQKSAzZ5v7kM1nEcmL9/4+PvL3lelOuMZCr5tyjGDe Lz9UtAuJRBBUDw1npIEBQjunKLO33eKWd9GnNO3k1Cd20Yc2AmBO865SzhcHFUaw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrudelfedguddviecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepfhgfhffvufffjgfkgggtsehttd ertddtredtnecuhfhrohhmpeflohhoshhtucfmrhgvmhgvrhhsuceojhhoohhsthhkrhgv mhgvrhhssehfrghsthhmrghilhdrfhhmqeenucggtffrrghtthgvrhhnpedviefhteeuve ekudetheduieehvdelgfeijeehvdetfeegleelhefhjeduieejveenucfkphepleehrdel tddrvddvgedrvdegieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpehjohhoshhtkhhrvghmvghrshesfhgrshhtmhgrihhlrdhfmh X-ME-Proxy: Original-Received: from Swift.fastmail.com (ip5f5ae0f6.dynamic.kabel-deutschland.de [95.90.224.246]) by mail.messagingengine.com (Postfix) with ESMTPA id D0456108005B; Thu, 17 Dec 2020 03:52:18 -0500 (EST) In-reply-to: Received-SPF: pass client-ip=64.147.123.19; envelope-from=joostkremers@fastmail.fm; helo=wout3-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:126458 Archived-At: On Thu, Dec 17 2020, steve-humphreys@gmx.com wrote: > I do not want the function to return the "message" (tah was for testing), but the > value of tim_out. How can one return a local variable? `let` returns the return value of its last body form. So simply use your variable as the last body form. :-) ``` (let ((some-var (calculate-some-value))) (do-some-more-stuff-with some-var) some-var) ``` -- Joost Kremers Life has its moments