From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Phillip Lord Newsgroups: gmane.emacs.help Subject: Re: how do i find out the platform emacs runs on? Date: 26 Nov 2003 17:36:02 +0000 Organization: Dept of Computer Science, University of Manchester, U.K. Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <871xryxpmo.fsf@helmut.nilsson.homedns.org> <3fc47348$0$2368$626a54ce@news.free.fr> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1069870757 6535 80.91.224.253 (26 Nov 2003 18:19:17 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 26 Nov 2003 18:19:17 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Nov 26 19:19:14 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AP4Fu-0004n8-00 for ; Wed, 26 Nov 2003 19:19:14 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AP5AV-0003HR-B8 for geh-help-gnu-emacs@m.gmane.org; Wed, 26 Nov 2003 14:17:43 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsmi-us.news.garr.it!NewsITBone-GARR!news.mailgate.org!newsfeed.stueberl.de!news.mediascape.de!zen.net.uk!130.88.203.18.MISMATCH!peernews.mcc.ac.uk!cs.man.ac.uk!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 50 Original-NNTP-Posting-Host: rpc71.cs.man.ac.uk Original-X-Trace: wapping.cs.man.ac.uk 1069868162 11559 130.88.198.228 (26 Nov 2003 17:36:02 GMT) Original-X-Complaints-To: news@wapping.cs.man.ac.uk Original-NNTP-Posting-Date: Wed, 26 Nov 2003 17:36:02 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.93 Original-Xref: shelby.stanford.edu gnu.emacs.help:118674 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:14617 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:14617 >>>>> "seki" == seki writes: seki> Ola Nilsson wrote: >> >> (if (eq system-type 'windows-nt) (require 'cygwin-mount) ) >> seki> I try to have one .emacs between Mac OSX, Linux and NT, here seki> what i defined : seki> ;windows seki> (if (eq system-type 'windows-nt) seki> (progn seki> ... seki> )) seki> ;linux seki> (if (eq system-type 'linux) seki> (progn seki> ... seki> )) seki> ;mac seki> (if (eq system-type 'darwin) seki> (progn seki> ... seki> )) seki> for macintosh, i use darwin, as it works both for console and seki> windowed system. If you want also to check between console seki> and graphical : test if window-system is not nil (for example seki> to define a default-frame-alist) One important question to ask though, is why are you doing this? In general its better to ask Emacs for its capabilities rather than its platform. Checking between console and windowing environment seems a good way to do things. This way if Emacs on different systems gains new functionality, it should all just work. Of course there are times when you might just not be bothered to do this, or when its too much effort (checking whether external programs like diff are available for instance). Cheers Phil