all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Calling a function with undefined symbol
@ 2022-10-31  8:15 Heime
  2022-10-31  8:32 ` Jean Abou Samra
                   ` (2 more replies)
  0 siblings, 3 replies; 46+ messages in thread
From: Heime @ 2022-10-31  8:15 UTC (permalink / raw)
  To: Heime via Users list for the GNU Emacs text editor


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")






^ permalink raw reply	[flat|nested] 46+ messages in thread

end of thread, other threads:[~2022-11-16 21:55 UTC | newest]

Thread overview: 46+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-31  8:15 Calling a function with undefined symbol Heime
2022-10-31  8:32 ` Jean Abou Samra
2022-10-31  8:42 ` tomas
2022-10-31  8:57   ` Heime
2022-10-31  9:07     ` tomas
2022-10-31  9:24     ` Jean Abou Samra
2022-10-31  9:43       ` Heime
2022-10-31  9:58         ` Jean Abou Samra
2022-10-31 10:57           ` Heime
2022-10-31 17:00           ` [External] : " Drew Adams
2022-10-31 17:10             ` Emanuel Berg
2022-11-01  4:11               ` Drew Adams
2022-11-01  5:24               ` tomas
2022-11-01 15:58                 ` Drew Adams
2022-11-01 16:13                   ` tomas
2022-11-01 19:22                     ` Drew Adams
2022-10-31 12:29   ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-10-31 15:37     ` Emanuel Berg
2022-11-02 12:14     ` Michael Heerdegen
2022-11-02 14:25       ` Sam Steingold
2022-11-02 16:40         ` Michael Heerdegen
2022-11-02 17:28           ` Emanuel Berg
2022-11-02 23:04           ` Emanuel Berg
2022-11-03 11:09             ` Michael Heerdegen
2022-11-03 12:15               ` Emanuel Berg
2022-11-04 12:16                 ` Michael Heerdegen
2022-11-05 14:32                   ` Emanuel Berg
2022-11-05 23:22                     ` Michael Heerdegen
2022-11-06 20:17                       ` Emanuel Berg
2022-11-07 16:03                         ` Michael Heerdegen
2022-11-07 16:50                           ` [External] : " Drew Adams
2022-11-07 16:52                           ` Emanuel Berg
2022-11-08 15:52                             ` Michael Heerdegen
2022-11-08 19:15                               ` tomas
2022-11-08 19:57                                 ` Michael Heerdegen
2022-11-08 20:47                                   ` tomas
2022-11-08 21:35                               ` Sam Steingold
2022-11-08 23:53                                 ` Michael Heerdegen
2022-11-09 15:32                                   ` Sam Steingold
2022-11-09 15:59                                     ` Michael Heerdegen
2022-11-16 19:07                               ` Emanuel Berg
2022-11-16 21:40                                 ` [External] : " Drew Adams
2022-11-16 21:55                                   ` Emanuel Berg
2022-11-04 14:33                 ` Michael Heerdegen
2022-11-05 12:57                   ` Emanuel Berg
2022-10-31 11:34 ` Emanuel Berg

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.