unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* How to tell emacs is running under term or windows?
@ 2006-10-07  2:37 Corsair
  2006-10-07  3:48 ` Alok G. Singh
       [not found] ` <mailman.7851.1160192955.9609.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 3+ messages in thread
From: Corsair @ 2006-10-07  2:37 UTC (permalink / raw)


Hi everybody!  I have a setting concerning the frame size in my
.emacs:

    (set-frame-size (car (frame-list)) 100 45)

However, when started in a term, emacs will display an error:

    X windows are not in use or not initialized.

So the `set-frame-size' function should be called only when running
under windows system.  The problem is, how to tell that emacs is
running under a term or a windows system, or, to be simple, how to
tell if the `-nw' option is issued when starting emacs?

Thanks.

-- 
Fear is the path to the Darkside.
Fear leads to anger,
Anger leads to hate,
Hate leads to suffering.

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

* Re: How to tell emacs is running under term or windows?
  2006-10-07  2:37 How to tell emacs is running under term or windows? Corsair
@ 2006-10-07  3:48 ` Alok G. Singh
       [not found] ` <mailman.7851.1160192955.9609.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 3+ messages in thread
From: Alok G. Singh @ 2006-10-07  3:48 UTC (permalink / raw)


On  7 Oct 2006, chris.corsair@gmail.com wrote:

> The problem is, how to tell that emacs is running under a term or a
> windows system, or, to be simple, how to tell if the `-nw' option is
> issued when starting emacs?

>From the C-h f:

     window-system is a built-in function in `C source code'.
     (window-system &optional FRAME)

     The name of the window system that FRAME is displaying through.
     The value is a symbol---for instance, 'x' for X windows.
     The value is nil if Emacs is using a text-only terminal.

     FRAME defaults to the currently selected frame.

-- 
Alok

Give a small boy a hammer and he will find that everything he encounters
needs pounding.

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

* Re: How to tell emacs is running under term or windows?
       [not found] ` <mailman.7851.1160192955.9609.help-gnu-emacs@gnu.org>
@ 2006-10-07  4:21   ` Corsair
  0 siblings, 0 replies; 3+ messages in thread
From: Corsair @ 2006-10-07  4:21 UTC (permalink / raw)


alephnull@airtelbroadband.in (Alok G. Singh) writes:

> On  7 Oct 2006, chris.corsair@gmail.com wrote:
>
>> The problem is, how to tell that emacs is running under a term or a
>> windows system, or, to be simple, how to tell if the `-nw' option is
>> issued when starting emacs?
>
>>From the C-h f:
>
>      window-system is a built-in function in `C source code'.
>      (window-system &optional FRAME)
>
>      The name of the window system that FRAME is displaying through.
>      The value is a symbol---for instance, 'x' for X windows.
>      The value is nil if Emacs is using a text-only terminal.
>
>      FRAME defaults to the currently selected frame.
>
> -- 
> Alok
>
> Give a small boy a hammer and he will find that everything he encounters
> needs pounding.
>

Thanks man, it works perfectly.  Thanks a lot.

-- 
Fear is the path to the Darkside.
Fear leads to anger,
Anger leads to hate,
Hate leads to suffering.

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

end of thread, other threads:[~2006-10-07  4:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-07  2:37 How to tell emacs is running under term or windows? Corsair
2006-10-07  3:48 ` Alok G. Singh
     [not found] ` <mailman.7851.1160192955.9609.help-gnu-emacs@gnu.org>
2006-10-07  4:21   ` Corsair

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).