all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* trouble writing a conditional, or with lambda
@ 2003-05-24 16:09 Florian von Savigny
  2003-05-24 15:37 ` Thomas Gehrlein
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Florian von Savigny @ 2003-05-24 16:09 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1295 bytes --]



Sigh ...


some basic lisp, I'm afraid, but I did consult the manual and tested
in lisp-interaction-mode, but did not get any the wiser.

I'm trying to get a function to work differently depending on whether
emacs runs under X or on a terminal:

   (if (eq window-system nil) 
       ; running under a terminal
       (lambda ()
	       (split-window)
	       (switch-to-buffer "*foo*")
	       )
    ; running under a window system
    (lambda ()
	     (select-frame (make-frame))
	     (set-frame-size (selected-frame) 50 24)
	     (set-frame-position (selected-frame) 150 120)
	     ))


It seems that everything in the lambda expressions is ignored
(i.e. nothing happens).  I used these lambda expressions because
simply putting a body of functions got error messages about "Invalid
function"s. But it seems I don't get these right.


       (lambda (
		(split-window)
		(switch-to-buffer "*foo*")
               ))

also seems to be valid syntax, but is also ignored.

Can anybody help how to get this simple conditional to work?


-- 


Florian v. Savigny

If you are going to reply in private, please be patient, as I only
check for mail something like once a week. - Si vous allez répondre
personellement, patientez s.v.p., car je ne lis les courriels
qu'environ une fois par semaine.

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

end of thread, other threads:[~2003-05-25 12:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-24 16:09 trouble writing a conditional, or with lambda Florian von Savigny
2003-05-24 15:37 ` Thomas Gehrlein
2003-05-24 16:08 ` Oliver Scholz
2003-05-24 16:14 ` lawrence mitchell
2003-05-25 12:04   ` Florian von Savigny

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.