From: David Kastrup <dak@gnu.org>
Subject: Re: Bug? Won't eval an 'if' sexp?
Date: 26 Jan 2003 10:41:11 +0100 [thread overview]
Message-ID: <x5of64jljc.fsf@lola.goethe.zz> (raw)
In-Reply-To: mailman.1000.1043569455.21513.bug-gnu-emacs@gnu.org
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
next parent reply other threads:[~2003-01-26 9:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.1000.1043569455.21513.bug-gnu-emacs@gnu.org>
2003-01-26 9:41 ` David Kastrup [this message]
2003-01-26 9:48 ` Bug? Won't eval an 'if' sexp? Hacksaw
2003-01-26 10:01 ` David Kastrup
2003-01-26 10:27 ` Hacksaw
2003-01-26 8:23 Hacksaw
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=x5of64jljc.fsf@lola.goethe.zz \
--to=dak@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).