From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Arthur Miller Newsgroups: gmane.emacs.help Subject: Re: Optional Arguments Date: Mon, 07 Dec 2020 19:33:52 +0100 Message-ID: References: <20201207130630.GA10719@tuxteam.de> <20201207155108.GC15617@tuxteam.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16600"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Help Gnu Emacs To: pietru@caramail.com Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 07 19:51:24 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 1kmLbY-0004CX-5i for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 07 Dec 2020 19:51:24 +0100 Original-Received: from localhost ([::1]:40890 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kmLbX-0005yA-6L for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 07 Dec 2020 13:51:23 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40714) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kmLZI-0004uk-Kd for help-gnu-emacs@gnu.org; Mon, 07 Dec 2020 13:49:05 -0500 Original-Received: from mail-vi1eur05olkn2076.outbound.protection.outlook.com ([40.92.90.76]:24041 helo=EUR05-VI1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kmLZD-0008Da-GS for help-gnu-emacs@gnu.org; Mon, 07 Dec 2020 13:49:01 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lt3OeXFjxZ3mzy7EDJVrNyJkKYY3duN0/7fP9vmDqOWDYlKFhIQqQOuwz7sAyCC0fOEzuCo5H3sp8z33JQhUyJW+tq1MrQcE31AdjSv1+1rHrWYPevwB1ErwfBzADK2gLxTP4wV1GeChzb78gZEFYSEoxNWykUIzeNF7360czpcMk/OB0VkxW+Vz6yJYpXcLu+WbnTnahFNfUSMRaKm+mfAiZsjhLG9BkZJtNOcvmGumUOakk/EzGeARdV4To1mstpmTY6SMiPakurkSJP7lIvRJeNchE7W8+6S/TIXMlJu38u3125Ie0Ha3hpptu8ynTPOfTblTxw2OGc0j6F/cYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DS0RGQtMO0p/09wSDf8s2Lh1i136iD/Z12wpYYAlVKw=; b=jTjSsWB7w96Lwqyz11ZHAGB45X5meFoQQZqqC8FfzBXmcUlZRi2oHsMobsdkkjf1fqh4CpOrJGLC4En2OOllAfl8D2UF4g2m2asKo4KmVGoFYqo8cn1ICVtlyWbbdpvnKS8uzIKBtMjXATPwJzzj+z3jyjmfAY7r/f0DaZxljplgqGdxuC8HsyBK9ni1zA3o8YWVm0En9CmmDsCZAWIw99XVjrRj+fCZmlE/BB4yJdRZOgzY1/gmQEHFbHFd6SB8rRTTiuZIMra5vaC1qepb8jdVDMkCdPIaZsnSk4x86FSKFqzPRGJgWbwB2Xs9gNR/PZpOIV8GMxmb3/sqD2U0Pg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DS0RGQtMO0p/09wSDf8s2Lh1i136iD/Z12wpYYAlVKw=; b=O3cfKD50ndaL2kRVbYuFNo0Jp1sam1wA7RYul+Hw5AkmQWsYVygSWcbCx7deUCKykKp8sTfaXVnhOibpkszvJw1ZAGGtc8CPS+a4NGfq+dZas5FXk7QsoX0CQNdj0AYj5oPt5RAXO+g2gkJ9Z0vXFI7yIGEweGD413vqWroswJg1gEcUkQVAlE75d8dH2CA5LtyXd0Y/OcyXaNEbIOO7FEQSzBx3U77ODJ0OUBbVUiVk51oXFIMo7FT6oKAtLqDwNDMa2fvGHfrjLUPKAcQI/rZk/D9kH5f88hmmcoenRzKO8aK89s1L39rkEEw4vwtylE9RgPbRO6tgCI4UNe+3Ew== Original-Received: from AM6EUR05FT009.eop-eur05.prod.protection.outlook.com (2a01:111:e400:fc11::46) by AM6EUR05HT089.eop-eur05.prod.protection.outlook.com (2a01:111:e400:fc11::381) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3632.17; Mon, 7 Dec 2020 18:33:53 +0000 Original-Received: from AM0PR06MB6577.eurprd06.prod.outlook.com (2a01:111:e400:fc11::40) by AM6EUR05FT009.mail.protection.outlook.com (2a01:111:e400:fc11::265) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3632.17 via Frontend Transport; Mon, 7 Dec 2020 18:33:53 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:095EFA720F1FFF29493CDEC5DE491CCD849F625CE391DDDEBF85B321CA77278A; UpperCasedChecksum:D507CF11D583993E9BE976AC1B5589C102C72FED4339718D34ADC59412EC19C6; SizeAsReceived:7894; Count:46 Original-Received: from AM0PR06MB6577.eurprd06.prod.outlook.com ([fe80::9487:8c7d:da00:4993]) by AM0PR06MB6577.eurprd06.prod.outlook.com ([fe80::9487:8c7d:da00:4993%7]) with mapi id 15.20.3632.018; Mon, 7 Dec 2020 18:33:53 +0000 In-Reply-To: (pietru@caramail.com's message of "Mon, 7 Dec 2020 18:51:34 +0100") X-TMN: [yn7H19uUN0zKFh3eDsiydpZUhGhSYEst] X-ClientProxiedBy: AM5PR0701CA0015.eurprd07.prod.outlook.com (2603:10a6:203:51::25) To AM0PR06MB6577.eurprd06.prod.outlook.com (2603:10a6:208:19a::23) X-Microsoft-Original-Message-ID: <878sa9sbxr.fsf@live.com> X-MS-Exchange-MessageSentRepresentingType: 1 Original-Received: from pascal.homepc (90.230.29.56) by AM5PR0701CA0015.eurprd07.prod.outlook.com (2603:10a6:203:51::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3654.8 via Frontend Transport; Mon, 7 Dec 2020 18:33:53 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 46 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 76613984-8d92-441a-1f7b-08d89adea620 X-MS-TrafficTypeDiagnostic: AM6EUR05HT089: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: PsOcD+Zkh4CYhJ8nYjPDVD42IZNgTA1tyaAJ/uCbsBPQaz0s6gVwuJmnyYNCo1Z+kWuhMUx6eG8/6ZyV1LW8vzuEDHPSTWDWgqxZzehTrkKsFsXZSy3VFBc/WEGKstlW5Kfri+57ddDDrAts+yxb/5tAiDQkrMbagrKZWw4C0ZpkkRHAlyU3xWiYumKhv5ectW2IZN0oBB02xrPpBC52Nw== X-MS-Exchange-AntiSpam-MessageData: 3wYJOSA2JNQjmnYiA9FxAg7l/oBvLlU+5EQ45NHGZqICe+QkPSgKP+JRVHC5NMsZjl4+9XrgKFS928YBSWKTevvvTYVoJ5g5tOcRMNEGG1jLU3deecexzaeScPJpD8HDx7Wkd4xrUhgvf6iX2KLivw== X-OriginatorOrg: live.com X-MS-Exchange-CrossTenant-Network-Message-Id: 76613984-8d92-441a-1f7b-08d89adea620 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Dec 2020 18:33:53.8095 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: AM6EUR05FT009.eop-eur05.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6EUR05HT089 Received-SPF: pass client-ip=40.92.90.76; envelope-from=arthur.miller@live.com; helo=EUR05-VI1-obe.outbound.protection.outlook.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 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, FREEMAIL_REPLY=1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no 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:126160 Archived-At: pietru@caramail.com writes: >> Sent: Monday, December 07, 2020 at 4:51 PM >> From: tomas@tuxteam.de >> To: pietru@caramail.com >> Cc: "Help Gnu Emacs" >> Subject: Re: Optional Arguments >> >> On Mon, Dec 07, 2020 at 04:06:13PM +0100, pietru@caramail.com wrote: >> >> [...] >> >> > How can one get computed values from a function then? >> >> Either you return it (in your case, e.g. by returning a pair) >> >> (cons ma mb) > > Because by default, a function returns the value of the last expression > evaluated as the return value. Correct? Yes. You probably wish to prefer to return values instead of using globals as Thomas already pointed out.