From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Christopher Dimech Newsgroups: gmane.emacs.help Subject: Re: Executing part of the code instead of another Date: Wed, 7 Oct 2020 15:48:51 +0200 Message-ID: References: <87imbm3llg.fsf@ebih.ebihd> <87blhe3kxg.fsf@ebih.ebihd> <875z7m4bdx.fsf@ebih.ebihd> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27873"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: moasenwood@zoho.eu Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Oct 07 15:55:09 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 1kQ9uK-0006vW-Nf for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 07 Oct 2020 15:55:04 +0200 Original-Received: from localhost ([::1]:52468 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kQ9uJ-0003eQ-Il for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 07 Oct 2020 09:55:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60882) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kQ9oO-0007hX-BH for help-gnu-emacs@gnu.org; Wed, 07 Oct 2020 09:48:56 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]:40445) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kQ9oM-0007K1-4K for help-gnu-emacs@gnu.org; Wed, 07 Oct 2020 09:48:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1602078531; bh=jg6tLjXpo7ptOAsBGO5RRWNrNZkj0L8OEoS/gvmQIfA=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=OKMlz6boFVqKMi8QoAs8SvrkNwTI2l8LLCZdwjVDxnATnvp0yxKsYRrvPF54tb//Q u7p5caLQ6jUOqzIw3X97lpdLyMdEZYz0nDrnYJrMoa+2jWKCgdOnhFlye/nZo/8T0h qKDeCcd4zrMSDWpXJuihqDpVRMHku/7HFM3WnkHU= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [213.165.168.94] ([213.165.168.94]) by web-mail.gmx.net (3c-app-mailcom-bs01.server.lan [172.19.170.58]) (via HTTP); Wed, 7 Oct 2020 15:48:51 +0200 Importance: normal Sensitivity: Normal In-Reply-To: <875z7m4bdx.fsf@ebih.ebihd> X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:DbQsAhcauvB8Bqka0e+3jzrt/cH4uxUqO4DKtAhYUPvFDGIv26Idt0U1Y3iz09d6cO6TN pk3mM7Jf9Xx+yXG/xCZbN6FE4BHRQPbXhTLCRW1TLPf4EZu7NUq2n4lzg5zmvj35BIDoRmDev1Ew 0IRqUXVRPD8eYTMRcyhPahfF8jw/83ci8pNtTKtEumadIY9K1WCUDn2lD4MxNGM5JSL5nVJ9lmEp KWrRtZle5CkC5aYm0Fw0rLDJDq0DkxQMmTWH0ugWEEweJdGfbu9Pqf4GUvAyYkvTO9JSlvWuYTig RM= X-UI-Out-Filterresults: notjunk:1;V03:K0:pu8UYYh2b44=:kTkxKxdRcyjlWNHMzSbIDk iqje8HFCrM8mc+dyKukQ7pMHqdtPvgx1PnsfhAdKivJjJApchaGkUbRjG0YUFCIJd0RAOwxob N8Qd1PjylE8Tc0HJ1CRbI63k6Yz1Qtr+A+TTb1r6/cS+uW6qqiJkMeQQjxhsvcdeLtc80g44A QpWNYpI9iax/TeGG75zxXc3OxjmaFxvQmGVjp0UEQJ46tMtMgzSFNn4lZ8b2eMCER1DDgqz6V RdbqoTwJviWZH7vh1Zs0D2pa7Ef1mpTL/pG7ukly7/UquFOv7l04E/R3nLHMsO1BEXjf2NE/2 iIT8nHsK8y/dvldMy0xX0rLnch1FZHpNkeZfPC7jgixnU8+conmKknc4sQuTyZCYBhDoxGkJj 7L6soCwrKYxu92trAvHUKfbnUyLGpnAIYZ8ScKQHG5xz5SnJ/dIrtUDtyRaEZzywQupGolkOB +mgItiXa2hlN5X/iwJMdqQ5lQ70PWBijMWC+tiM76190pH/vwPHI0RB2PA9GhlDsGXpGbKQ1w WSaQQ1ao2UokK/nnM4jv/f1cTgoQyyNxOo7iinIazLWWwqRoGSshlh661Mq0b81ySu/OCgeGR Sw+YffLNXMSZnEmmLu7e0jLPadF1D01SwrtecTbnXJ7O5ffs2QYKwuGVBA2HXYuUghwzWxmvR Cae5kp/V+MfFvv8yIF0Se0lsBhMI3Ueuxa9fEDekDRjKHgg== Received-SPF: pass client-ip=212.227.17.20; envelope-from=dimech@gmx.com; helo=mout.gmx.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/07 09:48:52 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=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:124360 Archived-At: It would be better if you explain to me this progn stuff Have tried an example like this (setq na 8) (setq nb 13) ( if (> nb na) progn ( (message "nb > na condition [condition is true]") (message "nb > na condition [condition is true]") ) progn ( (message "condition false") (message "condition false") ) ) > Sent: Wednesday, October 07, 2020 at 11:46 AM > From: "Emanuel Berg via Users list for the GNU Emacs text editor" > To: help-gnu-emacs@gnu.org > Subject: Re: Executing part of the code instead of another > > Gregory Heytings via Users list for the GNU Emacs text editor wrote: > > > In general you can do: > > > > (if [condition] > > (progn > > [multiple statements of the "then" part]) > > [multiple statements of the "else" part"]) > > And the value returned, if condition, is the one of > the last one in the "then" or progn part - the > nth one! > > There is also a `prog1'! > > But no prog2 :( > > -- > underground experts united > http://user.it.uu.se/~embe8573 > https://dataswamp.org/~incal > > >