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

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

Re: Bug? Won't eval an 'if' sexp?


From: David Kastrup
Subject: Re: Bug? Won't eval an 'if' sexp?
Date: 26 Jan 2003 10:41:11 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

Hacksaw <hacksaw@hacksaw.org> writes:

> I added this to my .emacs under version 20.7:
> 
> (if (eq (user-uid) 0)
>       (message "You're uid 0, no desktop")
>       (lambda ()
>         (message "setting up desktop")
>         (custom-set-variables
>          '(desktop-enable t nil (desktop)))
>         (desktop-load-default)
>         (desktop-read)
>        )                              
> )
> 
> 
> It worked just fine. Under 21.2 it's not evaluated correctly. Doing
> a eval lst sexp, it returns the lamda, I guess implying that it's
> not evaluating it?

Whoever gave you the idea it should?  You want to use progn here, not
lambda.

Actually, you don't need to use even progn here: everything beyond
the first clause of an if-form belong to the else-part.

Please start using C-h f on functions/forms you have no clue about.
Better yet, read an introduction to Lisp.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

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