all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Elisp:  What does ''nil mean?
@ 2003-05-16  9:00 Thomas Gehrlein
  2003-05-16 10:45 ` David Kastrup
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Gehrlein @ 2003-05-16  9:00 UTC (permalink / raw)


The following line is from easy-menu-create-menu:

((eq keyword :active) (setq enable (or arg ''nil)))

It is part of a (cond ...).

What does "''nil" mean?

Thomas

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

* Re: Elisp:  What does ''nil mean?
  2003-05-16  9:00 Elisp: What does ''nil mean? Thomas Gehrlein
@ 2003-05-16 10:45 ` David Kastrup
  2003-05-16 11:35   ` Thomas Gehrlein
  0 siblings, 1 reply; 6+ messages in thread
From: David Kastrup @ 2003-05-16 10:45 UTC (permalink / raw)


Thomas Gehrlein <thomas.gehrlein@t-online.de> writes:

> The following line is from easy-menu-create-menu:
> 
> ((eq keyword :active) (setq enable (or arg ''nil)))
> 
> It is part of a (cond ...).
> 
> What does "''nil" mean?

The same as '(quote nil), an unevaluated list with the two members
quote and nil.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

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

* Re: Elisp:  What does ''nil mean?
  2003-05-16 10:45 ` David Kastrup
@ 2003-05-16 11:35   ` Thomas Gehrlein
  2003-05-16 11:57     ` David Kastrup
  2003-05-16 16:34     ` Pascal Bourguignon
  0 siblings, 2 replies; 6+ messages in thread
From: Thomas Gehrlein @ 2003-05-16 11:35 UTC (permalink / raw)


David Kastrup <dak@gnu.org> writes:

> Thomas Gehrlein <thomas.gehrlein@t-online.de> writes:
> 
> > The following line is from easy-menu-create-menu:
> > 
> > ((eq keyword :active) (setq enable (or arg ''nil)))
> > 
> > It is part of a (cond ...).
> > 
> > What does "''nil" mean?
> 
> The same as '(quote nil), an unevaluated list with the two members
> quote and nil.

Is this the same as (quote (quote nil))?

Why would you quote nil and not evaluate it?  And if you evaluate it: Isn't nil
the same as (quote nil)?

Thomas

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

* Re: Elisp:  What does ''nil mean?
  2003-05-16 11:35   ` Thomas Gehrlein
@ 2003-05-16 11:57     ` David Kastrup
  2003-05-16 16:16       ` Thomas Gehrlein
  2003-05-16 16:34     ` Pascal Bourguignon
  1 sibling, 1 reply; 6+ messages in thread
From: David Kastrup @ 2003-05-16 11:57 UTC (permalink / raw)


Thomas Gehrlein <thomas.gehrlein@t-online.de> writes:

> David Kastrup <dak@gnu.org> writes:
> 
> > Thomas Gehrlein <thomas.gehrlein@t-online.de> writes:
> > 
> > > The following line is from easy-menu-create-menu:
> > > 
> > > ((eq keyword :active) (setq enable (or arg ''nil)))
> > > 
> > > It is part of a (cond ...).
> > > 
> > > What does "''nil" mean?
> > 
> > The same as '(quote nil), an unevaluated list with the two members
> > quote and nil.
> 
> Is this the same as (quote (quote nil))?

It is, like (quote nil), the result of evaluating (quote (quote nil)).

> Why would you quote nil and not evaluate it?

To make it different from nil, while evaluating to it eventually.

> And if you evaluate it: Isn't nil the same as (quote nil)?

Evaluating nil gives the same result as evaluating (quote nil), since
nil is a self-quoting form.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

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

* Re: Elisp:  What does ''nil mean?
  2003-05-16 11:57     ` David Kastrup
@ 2003-05-16 16:16       ` Thomas Gehrlein
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Gehrlein @ 2003-05-16 16:16 UTC (permalink / raw)


David Kastrup <dak@gnu.org> writes:

> Thomas Gehrlein <thomas.gehrlein@t-online.de> writes:
> 
> > David Kastrup <dak@gnu.org> writes:
> > 
> > > Thomas Gehrlein <thomas.gehrlein@t-online.de> writes:
> > > 
> > > > The following line is from easy-menu-create-menu:
> > > > 
> > > > ((eq keyword :active) (setq enable (or arg ''nil)))
> > > > 
> > > > It is part of a (cond ...).
> > > > 
> > > > What does "''nil" mean?
> > > 
> > > The same as '(quote nil), an unevaluated list with the two members
> > > quote and nil.
> > 
> > Is this the same as (quote (quote nil))?
> 
> It is, like (quote nil), the result of evaluating (quote (quote nil)).
> 
> > Why would you quote nil and not evaluate it?
> 
> To make it different from nil, while evaluating to it eventually.

Thank you.  I think now I understand.

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

* Re: Elisp:  What does ''nil mean?
  2003-05-16 11:35   ` Thomas Gehrlein
  2003-05-16 11:57     ` David Kastrup
@ 2003-05-16 16:34     ` Pascal Bourguignon
  1 sibling, 0 replies; 6+ messages in thread
From: Pascal Bourguignon @ 2003-05-16 16:34 UTC (permalink / raw)


Thomas Gehrlein <thomas.gehrlein@t-online.de> writes:

> David Kastrup <dak@gnu.org> writes:
> 
> > Thomas Gehrlein <thomas.gehrlein@t-online.de> writes:
> > 
> > > The following line is from easy-menu-create-menu:
> > > 
> > > ((eq keyword :active) (setq enable (or arg ''nil)))
> > > 
> > > It is part of a (cond ...).
> > > 
> > > What does "''nil" mean?
> > 
> > The same as '(quote nil), an unevaluated list with the two members
> > quote and nil.
> 
> Is this the same as (quote (quote nil))?

Yes.

 
> Why would you quote nil and not evaluate it?  And if you evaluate
> it: Isn't nil the same as (quote nil)?

Just try it!

(show (car ''nil))   | (show (car 'nil))   | (show (car nil))  
==> quote            | ==> nil             | ==> nil           
(show (cdr ''nil))   | (show (cdr 'nil))   | (show (cdr nil))  
==> (nil)            | ==> nil             | ==> nil           
                                        

-- 
__Pascal_Bourguignon__                   http://www.informatimago.com/
----------------------------------------------------------------------
Do not adjust your mind, there is a fault in reality.

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

end of thread, other threads:[~2003-05-16 16:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-16  9:00 Elisp: What does ''nil mean? Thomas Gehrlein
2003-05-16 10:45 ` David Kastrup
2003-05-16 11:35   ` Thomas Gehrlein
2003-05-16 11:57     ` David Kastrup
2003-05-16 16:16       ` Thomas Gehrlein
2003-05-16 16:34     ` Pascal Bourguignon

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.