From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Corsair Newsgroups: gmane.emacs.help Subject: How to tell emacs is running under term or windows? Date: Sat, 07 Oct 2006 10:37:52 +0800 Organization: Bentium Ltd. (CN99) Message-ID: <87d594n94v.fsf@gmail.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1160188827 31780 80.91.229.2 (7 Oct 2006 02:40:27 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 7 Oct 2006 02:40:27 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Oct 07 04:40:27 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GW271-0002lR-1I for geh-help-gnu-emacs@m.gmane.org; Sat, 07 Oct 2006 04:40:27 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GW270-0002RK-J3 for geh-help-gnu-emacs@m.gmane.org; Fri, 06 Oct 2006 22:40:26 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsfeed.news.ucla.edu!newsfeed.media.kyoto-u.ac.jp!newsgate.cuhk.edu.hk!news.neu.edu.cn!news.cn99.com!news.yaako.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 21 Original-NNTP-Posting-Host: 221.226.2.243 Original-X-Trace: news.yaako.com 1160188660 10706 221.226.2.243 (7 Oct 2006 02:37:40 GMT) Original-X-Complaints-To: usenet@news.yaako.com Original-NNTP-Posting-Date: Sat, 7 Oct 2006 02:37:40 +0000 (UTC) User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.0 (gnu/linux) Cancel-Lock: sha1:O31V/geOT4B+i2TLFNJOfRknmQw= Original-Xref: shelby.stanford.edu gnu.emacs.help:142244 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:37863 Archived-At: 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.