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

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

Re: Detect if Emacs is running in -nw mode


From: Barry Margolin
Subject: Re: Detect if Emacs is running in -nw mode
Date: Sun, 30 Mar 2008 22:22:33 -0400
User-agent: MT-NewsWatcher/3.5.3b2 (Intel Mac OS X)

In article <fso7rr$io2$1@registered.motzarella.org>,
 Christian Herenz <herenz@physik.hu-berlin.de> wrote:

> Lennart Borgman (gmail) schrieb:
> 
> > 
> > Do
> > 
> >   C-h f unless RET
> > 
> > to read the documentation for "unless". You can see there that is says 
> > "body forms".
> > 
> 
> C-h f unless RET yields here:
> --
> |unless is a Lisp macro in `subr'. 
> 
> |(unless COND &rest BODY) 
>  
>                                            |
> |If COND yields nil, do BODY, else return nil.
> --
> 
> But what about more than one function inside the Body?
> I do it like this atm (because i dont really understand the above help):

Do you understand what "&rest" means?  It means that there can be an 
arbitrary number of arguments there.

> 
> (unless window-system (menu-bar-mode nil))
> (unless window-system (color-theme-arjen))

Even if only one form were allowed, why wouldn't you use progn to 
combine multiple forms into one:

(unless window-system
  (progn
    (menu-bar-mode nil)
    (color-theme-arjen)))

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***


reply via email to

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