* How to check the -nw option?
@ 2009-05-11 1:37 Kiwon Um
2009-05-11 4:40 ` Teemu Likonen
0 siblings, 1 reply; 6+ messages in thread
From: Kiwon Um @ 2009-05-11 1:37 UTC (permalink / raw)
To: help-gnu-emacs
Hello. Here's a question.
Some modes do not work with terminal base, i.e. no-window-system (-nw)
emacs. So I want to write my .emacs with checking if it's no-window-
emacs emacs or not. How I can check this?
Thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to check the -nw option?
2009-05-11 1:37 How to check the -nw option? Kiwon Um
@ 2009-05-11 4:40 ` Teemu Likonen
2009-05-11 6:09 ` Kiwon Um
0 siblings, 1 reply; 6+ messages in thread
From: Teemu Likonen @ 2009-05-11 4:40 UTC (permalink / raw)
To: help-gnu-emacs
On 2009-05-10 18:37 (-0700), Kiwon Um wrote:
> Some modes do not work with terminal base, i.e. no-window-system (-nw)
> emacs. So I want to write my .emacs with checking if it's no-window-
> emacs emacs or not. How I can check this?
Check the variable "window-system". Its value is nil if Emacs is not
running in a window system. The manual section is here:
M-x elisp-index-search RET window-system RET
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to check the -nw option?
2009-05-11 4:40 ` Teemu Likonen
@ 2009-05-11 6:09 ` Kiwon Um
2009-05-11 6:23 ` Teemu Likonen
2009-05-11 6:31 ` Pascal J. Bourguignon
0 siblings, 2 replies; 6+ messages in thread
From: Kiwon Um @ 2009-05-11 6:09 UTC (permalink / raw)
To: help-gnu-emacs
On 5월11일, 오후1시40분, Teemu Likonen <tliko...@iki.fi> wrote:
> On 2009-05-10 18:37 (-0700), Kiwon Um wrote:
>
> > Some modes do not work with terminal base, i.e. no-window-system (-nw)
> > emacs. So I want to write my .emacs with checking if it's no-window-
> > emacs emacs or not. How I can check this?
>
> Check the variable "window-system". Its value is nil if Emacs is not
> running in a window system. The manual section is here:
>
> M-x elisp-index-search RET window-system RET
Thanks.
It is really what I wanted.
(if (not (eq window-system nil)) ...) works well. :)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to check the -nw option?
2009-05-11 6:09 ` Kiwon Um
@ 2009-05-11 6:23 ` Teemu Likonen
2009-05-11 6:31 ` Pascal J. Bourguignon
1 sibling, 0 replies; 6+ messages in thread
From: Teemu Likonen @ 2009-05-11 6:23 UTC (permalink / raw)
To: help-gnu-emacs
On 2009-05-10 23:09 (-0700), Kiwon Um wrote:
> (if (not (eq window-system nil)) ...) works well. :)
Yes. For boolean tests one can just do
(if (not window-system)
THEN-FORM
ELSE-FORMS)
or if only one "if" branch is needed, then perhaps
(unless window-system
THEN-FORMS)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to check the -nw option?
2009-05-11 6:09 ` Kiwon Um
2009-05-11 6:23 ` Teemu Likonen
@ 2009-05-11 6:31 ` Pascal J. Bourguignon
2009-05-11 6:54 ` Kiwon Um
1 sibling, 1 reply; 6+ messages in thread
From: Pascal J. Bourguignon @ 2009-05-11 6:31 UTC (permalink / raw)
To: help-gnu-emacs
Kiwon Um <um.kiwon@gmail.com> writes:
> On 5월11일, 오후1시40분, Teemu Likonen <tliko...@iki.fi> wrote:
>> On 2009-05-10 18:37 (-0700), Kiwon Um wrote:
>>
>> > Some modes do not work with terminal base, i.e. no-window-system (-nw)
>> > emacs. So I want to write my .emacs with checking if it's no-window-
>> > emacs emacs or not. How I can check this?
>>
>> Check the variable "window-system". Its value is nil if Emacs is not
>> running in a window system. The manual section is here:
>>
>> M-x elisp-index-search RET window-system RET
>
> Thanks.
> It is really what I wanted.
> (if (not (eq window-system nil)) ...) works well. :)
Please, write it:
(when window-system
...)
or at the very least:
(unless (null window-system)
...)
--
__Pascal Bourguignon__
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to check the -nw option?
2009-05-11 6:31 ` Pascal J. Bourguignon
@ 2009-05-11 6:54 ` Kiwon Um
0 siblings, 0 replies; 6+ messages in thread
From: Kiwon Um @ 2009-05-11 6:54 UTC (permalink / raw)
To: help-gnu-emacs
On 5월11일, 오후3시31분, p...@informatimago.com (Pascal J. Bourguignon)
wrote:
> Kiwon Um <um.ki...@gmail.com> writes:
> > On 5월11일, 오후1시40분, Teemu Likonen <tliko...@iki.fi> wrote:
> >> On 2009-05-10 18:37 (-0700), Kiwon Um wrote:
>
> >> > Some modes do not work with terminal base, i.e. no-window-system (-nw)
> >> > emacs. So I want to write my .emacs with checking if it's no-window-
> >> > emacs emacs or not. How I can check this?
>
> >> Check the variable "window-system". Its value is nil if Emacs is not
> >> running in a window system. The manual section is here:
>
> >> M-x elisp-index-search RET window-system RET
>
> > Thanks.
> > It is really what I wanted.
> > (if (not (eq window-system nil)) ...) works well. :)
>
> Please, write it:
>
> (when window-system
> ...)
>
> or at the very least:
>
> (unless (null window-system)
> ...)
>
> --
> __Pascal Bourguignon__
Thanks for all advices. :)
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-05-11 6:54 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-11 1:37 How to check the -nw option? Kiwon Um
2009-05-11 4:40 ` Teemu Likonen
2009-05-11 6:09 ` Kiwon Um
2009-05-11 6:23 ` Teemu Likonen
2009-05-11 6:31 ` Pascal J. Bourguignon
2009-05-11 6:54 ` Kiwon Um
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).