From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Heime Newsgroups: gmane.emacs.help Subject: Re: Calling a function with undefined symbol Date: Mon, 31 Oct 2022 09:43:57 +0000 Message-ID: References: <4D4045F3-B3DF-4FE1-A5C4-4BB5E3256BF5@abou-samra.fr> 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="22604"; mail-complaints-to="usenet@ciao.gmane.io" Cc: tomas@tuxteam.de, help-gnu-emacs@gnu.org To: Jean Abou Samra Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Oct 31 10:44:46 2022 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 1opRLZ-0005av-Gi for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 31 Oct 2022 10:44:45 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1opRL2-0006c2-6d; Mon, 31 Oct 2022 05:44:12 -0400 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 1opRL0-0006bq-DN for help-gnu-emacs@gnu.org; Mon, 31 Oct 2022 05:44:10 -0400 Original-Received: from mail-40137.protonmail.ch ([185.70.40.137]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1opRKu-0002v3-Hg for help-gnu-emacs@gnu.org; Mon, 31 Oct 2022 05:44:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1667209440; x=1667468640; bh=Xdsv/YNIke/byFfwZcliUU9ojdvu5lWthG/2x2/1D34=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=n2Fs5yLrnJPhXY5k2j8l4znhnJYlVUuYzmIC7Z8VOdLseJ6XR8Q+iIN05rggCvHEs H0Kma7AvW9Xei/4mWRkmYYkKwe9+JlYF49sUBM7WWLYmyOq7GGuFtxiEN0jpnjAvux W6qZxZaEKL6H8NtlufENbjsIc2Bn8Y8s3hHDOhmV6H6Zwb+Mp1Zr73aF3eQBaQzBAq c5nhDuUvUULYpMK3x30zYEQZgID9oD/QeSj1igGHv93aorN0Mgc0qcMY6w/qlsf+8r gVlpwlheT67d47jgBmlX6c2iwi/LXUj4SxIh4166Bbk8N86Ehd80RwKl6bt25XANFJ C7l37se/4qVjA== In-Reply-To: <4D4045F3-B3DF-4FE1-A5C4-4BB5E3256BF5@abou-samra.fr> Feedback-ID: 57735886:user:proton Received-SPF: pass client-ip=185.70.40.137; envelope-from=heimeborgia@protonmail.com; helo=mail-40137.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.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, 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.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: "help-gnu-emacs" Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:140529 Archived-At: ------- Original Message ------- On Monday, October 31st, 2022 at 9:24 AM, Jean Abou Samra wrote: > > Le 31 oct. 2022 =C3=A0 09:59, Heime heimeborgia@protonmail.com a =C3= =A9crit : > >=20 > > Yes, I have got really confused about what symbols are exactly. Even > > after reading several times. I have never seen anybody make a symbol, > > only variables. So, what is a symbol? >=20 >=20 >=20 >=20 > Imagine parents who are planning to have a child and decide they will cal= l it, say Deborah. They will say things like =E2=80=9CI like the name Debor= ah better than Mary=E2=80=9D. Those are sentences about the names themselve= s, not some children. The names don=E2=80=99t need children in order to exi= st as words. Then, the child is born and sentences like =E2=80=9CDeborah we= ighs 3kg=E2=80=9D (referring to the child named Deborah) start to make sens= e. >=20 > When you do 'symbol in Lisp, this gives you a bare name, or a =E2=80= =9Csymbol=E2=80=9D. With symbol-value, you get what value is associated wit= h this symbol, if any (the child with that name). But you don=E2=80=99t nee= d a value bound to the symbol (a child called Deborah) before you start usi= ng the symbol itself (the name =E2=80=9CDeborah=E2=80=9D). The Lisp manual says that a symbol is an object with a name. Then a variab= le (setq thevar 4) has an associated symbol 'thevar. And the function "(defun thefun ()" also has an associated symbol "'thefun"= . Furthermore one can make just a symbol, let us say 'go, which can be passed as an argument to a function "(defun mbcomplt (arg)" us= ing (mbcomplt 'go). Then inside the function on can test whether the symbol exists with (eq arg 'go). Even though we only have a na= me without a values. Is this a good basic understanding=20 of a symbol? =20