From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jean Louis Newsgroups: gmane.emacs.help Subject: Re: [External] : Re: How to make M-x TAB not work on (interactive) declaration? Date: Tue, 17 Jan 2023 08:35:03 +0300 Message-ID: References: <874jt0imh0.fsf@dataswamp.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3126"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/2.2.9+54 (af2080d) (2022-11-21) Cc: Rudolf =?utf-8?Q?Adamkovi=C4=8D?= , "help-gnu-emacs@gnu.org" To: Drew Adams Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jan 17 16:06:46 2023 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 1pHnXx-0000XQ-Tn for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 17 Jan 2023 16:06:45 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pHnXb-0008FF-LF; Tue, 17 Jan 2023 10:06:23 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pHnXW-00082W-0n for help-gnu-emacs@gnu.org; Tue, 17 Jan 2023 10:06:18 -0500 Original-Received: from stw1.rcdrun.com ([217.170.207.13]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pHnXS-0000zE-IM for help-gnu-emacs@gnu.org; Tue, 17 Jan 2023 10:06:16 -0500 Original-Received: from localhost ([::ffff:102.85.233.9]) (AUTH: PLAIN admin, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 0000000000056100.0000000063C6B963.00000F71; Tue, 17 Jan 2023 08:06:11 -0700 Mail-Followup-To: Drew Adams , Rudolf =?utf-8?Q?Adamkovi=C4=8D?= , "help-gnu-emacs@gnu.org" Content-Disposition: inline In-Reply-To: Received-SPF: pass client-ip=217.170.207.13; envelope-from=bugs@gnu.support; helo=stw1.rcdrun.com X-Spam_score_int: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DATE_IN_PAST_06_12=1.543, 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.29 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-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:142309 Archived-At: * Drew Adams [2023-01-17 05:21]: > > > The use of `apply', pointed out by Anders, speaks > > > directly to "any number of arguments". It applies > > > a function (e.g. `+') to "any number of arguments", > > > which are passed as a list. > > > > Any number means also no argument? To me that is not clear. > > That's why I pointed out that _zero is a number_. That is clear. > A zero number of args means zero args, which > means no args. Aha that is what you mean. Sounds like practical joke with function descriptions. Though that is not what is expressed like: * is a built-in function in ‘C source code’. (* &rest NUMBERS-OR-MARKERS) Return product of any number of arguments, which are numbers or markers. Product of any number of arguments when there are no arguments can't be 1 -- so function description is logically justified with your statement, but not consistent, I can't be sure if author intended it that way how you justify it, due to inconsistency. > > Any number of arguments is to me that it must be at least one > > argument, not no argument. > > Zero is a number. I have zero Ferraris. :-( Multiply your Ferraris and tell me if you get one in the garage. > > * is a built-in function in ‘C source code’. > > (* &rest NUMBERS-OR-MARKERS) > > Return product of any number of arguments, which are numbers or markers. > > > > But without having arguments, the product is one, > > which contradicts multiplication how I know it. > > Yes, it's taking a shortcut, supposing that you > think of a "product" of one arg and a "product" > of zero args: (* N) -> N, (*) -> 0 Not zero but: (*) ➜ 1 -- we are back to Ferrari. I don't get it. > Imagine that you wanted to define a "product" function that works > with any number of args. What would _you_ define as its behavior > (return value) for the zero-args case? And what would you use for > the single-arg case? I expect (*) to tell me that it is error, that arguments are missing. I learned multiplication in school, we never had impossible situation of using single argument. As number has to be multiplied by number. Multiplication table has always 2 arguments. The manual says like: > -- Function: + &rest numbers-or-markers > This function adds its arguments together. When given no > arguments, ‘+’ returns 0. 1 but I wonder why is that explained in manual and not in docstring. For now I can only think that it deviates from common multiplication that requires 2 numbers for the reason to be used in Lisp functions such as `apply' or others, just that I can't yet confirm it if that is designed for that particular reason. (apply '* nil) ➜ 1 -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns In support of Richard M. Stallman https://stallmansupport.org/