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

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

Re: how do i find out the platform emacs runs on?


From: Phillip Lord
Subject: Re: how do i find out the platform emacs runs on?
Date: 26 Nov 2003 17:36:02 +0000
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.93

>>>>> "seki" == seki  <sebastien.kirche.no@spam.free.fr> 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


reply via email to

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