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 08:57:09 +0000 Message-ID: References: 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="33415"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: tomas@tuxteam.de Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Oct 31 09:58:42 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 1opQcz-0008WN-Bi for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 31 Oct 2022 09:58:41 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1opQbu-0002vT-8Y; Mon, 31 Oct 2022 04:57:34 -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 1opQbq-0002un-Po for help-gnu-emacs@gnu.org; Mon, 31 Oct 2022 04:57:31 -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 1opQbd-0001q5-8p for help-gnu-emacs@gnu.org; Mon, 31 Oct 2022 04:57:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1667206634; x=1667465834; bh=55d7kBCcXkxmmK9Qzb8Md/BDBOxZ5gyhpfqov+nU39M=; 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=OK0Ij+cMqy3u0usWXfhhHWClOhZC72ryd4UxEUOvIu02ZKVcl14PZzuYoehhkIb4M ytfesdkuYlJATQAz1NkJZn0KcvNtUl3sTqmwBMIjg0+PcZxQsG3iSnYOutYpMQRE1Y FY6Kgvv4jY8E7ptV3fZJei68SPLHckxH0hgTH4WwfMB0qK08r7hvtObrp5ZELBXsjX V2C7dqZihj1srxSu7TObevKSqpqOAaW9c78dljs4eaU+s5rsY+UuhWclwH8wOtGnnO v6GefGEJlmW/I1YgazOIbmGotfan9pLT2FcbKP7i9S20eE2KxkJoSf167+C3c32sF4 lDNiom/26MRzw== In-Reply-To: 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:140526 Archived-At: ------- Original Message ------- On Monday, October 31st, 2022 at 8:42 AM, wrote: > On Mon, Oct 31, 2022 at 08:15:32AM +0000, Heime wrote: >=20 > > Have written a function named "mbcomplt" that takes a symbol. >=20 >=20 > The function takes an argument, that's what it does. >=20 > > (defun mbcomplt (sgnl) > > "DOC." >=20 >=20 > sgnl here is a variable. Or a variable name. Depending on how > you look at it. >=20 > > (if (eq sgnl 'go) > > (message "go") > > (message "nogo"))) >=20 >=20 > Now you are comparing sgnl's /value/ to something (which happens > to be a symbol). >=20 > > I can call this function with > >=20 > > (mbcomplt 'go) >=20 >=20 > Yes. You could call it also with (mbcomplt 23). Or (mbcomplt "This is not= a pipe"). > So? >=20 > > This even though the symbol "'go" does not exist. What is happening her= e? >=20 >=20 > As soon as you do 'go, the symbol exists. >=20 > > My understanding about symbols is that I can make a symbol using > >=20 > > (defvar seqr 3) ; set symbol seqr with value 3 >=20 >=20 > No, no. You are making a variable. Which is a binding of a symbol > to a value. Ok, I make a variable. What happens after that? A symbol 'seqr is made to= o? =20 > > (setq seqr 5) ; set symbol seqr with value 5 >=20 >=20 > No, you set the variable's value to 5. The symbol is not "set" to > anything. It is an immutable thing, as far as Lisp is concerned. Then, how is it that (symbol-value 'seqr) returns 5? There seems to be=20 a symbol and symbol-value returns 5. =20 > The symbol 'seqr is just taking the job of variable name here. > Like you are called Heime (or whatever it is this week). That > name is not you. >=20 > > (symbol-value 'seqr) ; get value of symbol (returns 5) > > (symbol-name 'seqr) ; get name of symbol (returns "seqr") >=20 >=20 > Symbol-value returns the value associated to the symbol. The > association itself is called a "variable". >=20 > Please go re-read the manuals. You have got all of it confused :) 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?