From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jean Abou Samra Newsgroups: gmane.emacs.help Subject: Re: Calling a function with undefined symbol Date: Mon, 31 Oct 2022 09:32:57 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28002"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 To: Heime , Heime via Users list for the GNU Emacs text editor Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Oct 31 09:33:48 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 1opQEt-0007AE-T6 for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 31 Oct 2022 09:33:47 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1opQEO-0006ze-Iz; Mon, 31 Oct 2022 04:33:16 -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 1opQEJ-0006ww-Od for help-gnu-emacs@gnu.org; Mon, 31 Oct 2022 04:33:13 -0400 Original-Received: from mout.kundenserver.de ([217.72.192.75]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1opQEE-0007C3-1r for help-gnu-emacs@gnu.org; Mon, 31 Oct 2022 04:33:11 -0400 Original-Received: from [172.20.10.5] ([37.170.43.234]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.184]) with ESMTPSA (Nemesis) id 1MkYsS-1pTSrd376s-00m41O; Mon, 31 Oct 2022 09:33:00 +0100 Content-Language: en-US In-Reply-To: X-Provags-ID: V03:K1:LjcucZQs2knsnQDNPUqrNc78K4GpZYv2nwPtaZJ0Y7Jtyjsom8g ydU+fXGFHArGGq74gWslZ+ZvV61OK+leNpCb0OtBJucddFANiDAX6sQmMPjTWstDZPlLl+W yx1rl21TEfHvikpvqYgNoOsmaC42d6Cl8S3ZDXqYZJGzZMKz3pdX5HHdDsxFDhn9Km8plqW hK77E6BKD2PHNVREieZCQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:xGJFkfq1WUg=:EFHTtks1Ugh9o95b5k9fUu o8dXsqvTUNa9iG7xDcH2Waheb5bs4VigA3EopH1zKnVLOOyawV610mYPEP56qM9FYV2BuR+e/ PqYzQ/SCPd83YxXiHm9vxaljuXJPu+K3A6li2pUJSt9Nf/D0xLqXorBZHFX3BxZzSQ9wdkK5Y 08bIR2JMs8NzKXXhQcOFI2DucyOEaZg6FxiV16j02fUSKqWhOMQdWw+QL3bYxdceousrNFSlb YlMXW+QpmeWSrca738rqk6z9lYT+EdWbyb9OHAimtOkhmk5pkTVru/dbtvc7XUhsmuz8AkqD8 Mxr1XP3XTlF/WxBczabCFxXz32WETOFTey8/XQLdz+6URUr/hWEjUcm05loIgCZF9GrTwlyEI ZskojJ6W2Mxo+Vv93Jsw92Y+gO3RzQYum1+dd8cvryvlP/mbjPUH+oB0EvctQaa0AzETC4Vxf obhM3DNDVjmuo7P0xCtCu722OJY5h7rofXcoE7bYedH0xulA9O8ley4r19cVBlceW8QTR3zB3 ubBgmeTkhoLVAGAWCF8Xvs5S/a17txVbSAyMi5Wb3mUw2fKN+TcBsPNRuOvrh2yM2ZdsN78b7 OP6SYS+HYTB52v7yudp1vohcSz73njkd7xz0LVGjAQBCfdBrHTzsvNavXg9hC+Q+9VbrcbGLd qBl1+y7YlqiG/O0bDfqUYKKONRYkbj+mFEClLMetHfP1YTi3ReiQNLW4QmM3ul6sFWk2/2Uz6 WPUjPOQ8+avQjHYnRznXBh2zlUqxlr9wZs7WNLusOO9aH2SvQ2TfVTEsJuwOK2RbgjykPz89 Received-SPF: none client-ip=217.72.192.75; envelope-from=jean@abou-samra.fr; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=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:140524 Archived-At: Le 31/10/2022 à 09:15, Heime a écrit : > Have written a function named "mbcomplt" that takes a symbol. > > (defun mbcomplt (sgnl) > "DOC." > > (if (eq sgnl 'go) > (message "go") > (message "nogo"))) > > I can call this function with > > (mbcomplt 'go) > > This even though the symbol "'go" does not exist. What is happening here? > > My understanding about symbols is that I can make a symbol using > > (defvar seqr 3) ; set symbol seqr with value 3 > (setq seqr 5) ; set symbol seqr with value 5 > > (symbol-value 'seqr) ; get value of symbol (returns 5) > (symbol-name 'seqr) ; get name of symbol (returns "seqr") It may be helpful to view symbols as some kind of modified strings. The symbol 'go is an amorphous object, just a name for something. You can use it as a name, or as a discrete key, or whatever. You can also "define" it, or rather define a variable with its name, and then you are able to use symbol-value on it, but the symbol object itself is a *potential* name and does not need to have a variable with its name defined in order to be used. Jean