* Bug? Won't eval an 'if' sexp?
@ 2003-01-26 8:23 Hacksaw
0 siblings, 0 replies; 5+ messages in thread
From: Hacksaw @ 2003-01-26 8:23 UTC (permalink / raw)
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?
[What I see in the *Message* buffer]
(lambda nil (message "setting up desktop") (custom-set-variables (quote
(desktop-enable t nil ...))) (desktop-load-default) (desktop-read))
Anyone know what's up?
--
Life is too short to take on the unnecessary.
http://www.hacksaw.org -- http://www.privatecircus.com -- KB1FVD
^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <mailman.1000.1043569455.21513.bug-gnu-emacs@gnu.org>]
* Re: Bug? Won't eval an 'if' sexp?
[not found] <mailman.1000.1043569455.21513.bug-gnu-emacs@gnu.org>
@ 2003-01-26 9:41 ` David Kastrup
2003-01-26 9:48 ` Hacksaw
0 siblings, 1 reply; 5+ messages in thread
From: David Kastrup @ 2003-01-26 9:41 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Bug? Won't eval an 'if' sexp?
2003-01-26 9:41 ` David Kastrup
@ 2003-01-26 9:48 ` Hacksaw
2003-01-26 10:01 ` David Kastrup
0 siblings, 1 reply; 5+ messages in thread
From: Hacksaw @ 2003-01-26 9:48 UTC (permalink / raw)
Cc: gnu-emacs-bug
>Whoever gave you the idea it should? You want to use progn here, not
Why should lambda not work here? This form, untouched, worked in emacs 20.7.
--
When we have nothing to say, it is very hard to say nothing.
When we have nothing to do, it is very hard to do nothing.
http://www.hacksaw.org -- http://www.privatecircus.com -- KB1FVD
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Bug? Won't eval an 'if' sexp?
2003-01-26 9:48 ` Hacksaw
@ 2003-01-26 10:01 ` David Kastrup
2003-01-26 10:27 ` Hacksaw
0 siblings, 1 reply; 5+ messages in thread
From: David Kastrup @ 2003-01-26 10:01 UTC (permalink / raw)
Cc: gnu-emacs-bug
Hacksaw <hacksaw@hacksaw.org> writes:
> >Whoever gave you the idea it should? You want to use progn here, not
>
> Why should lambda not work here? This form, untouched, worked in
> emacs 20.7.
It should never have worked in the first place, but did so due to an
Emacs quirk. lambda is a form supposed to return a function, not
execute it.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-01-26 10:27 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-26 8:23 Bug? Won't eval an 'if' sexp? Hacksaw
[not found] <mailman.1000.1043569455.21513.bug-gnu-emacs@gnu.org>
2003-01-26 9:41 ` David Kastrup
2003-01-26 9:48 ` Hacksaw
2003-01-26 10:01 ` David Kastrup
2003-01-26 10:27 ` Hacksaw
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.