help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: What is the :eval form ?


From: Drew Adams
Subject: RE: What is the :eval form ?
Date: Sat, 9 Jun 2012 07:08:07 -0700

> > A symbol whose name starts with a colon (`:') is 
> > called a "keyword symbol".  These symbols automatically
> > act as constants,

when evaluated.

Debugger entered--Lisp error: (setting-constant :foo)
  (setq :foo 42)

> Is that also true in a function call? 

Is what true?  A keyword symbol is just a symbol (a) whose name starts with `:'
and (b) that evaluates to itself.

> e.g (notifications-notify  :title "Wazzup!?" :message message))
> title and message are not keywords here.

They are keyword symbols.  When they are evaluated (during function
application), the values returned are those same symbols.

> Or is the keyword "symbol" here?

Yes, the key word here is "symbol".  Whether or not a keyword symbol serves as a
keyword in some context depends on the context.  It means what you want it to
mean.  Like everything in Lisp, you can use a keyword symbol as anything you
like.

But it always has properties (a) and (b).




reply via email to

[Prev in Thread] Current Thread [Next in Thread]