comp.emacs
[Top] [All Lists]

Re: Carbon emacs (OSX) & /usr/bin/emacs using the same .emacs

Subject: Re: Carbon emacs (OSX) & /usr/bin/emacs using the same .emacs
From: Paul Donnelly
Date: Mon, 25 Aug 2008 16:22:41 -0500
Newsgroups: comp.emacs

jOHn wONg <thjwong@xxxxxxxxx> writes:

> Hi all,
>
> in my .emac file, I want to load different things onto different emacs
> by a structure such as the followings:
>
> (if (or (eq window-system 'w32) (eq window-system 'win32))
>     (progn
>      (print "we are in windows!")
>      ;; making Emacs to work with Cygwin
>      (setenv "PATH" (concat "C:/cygwin/bin;" (getenv "PATH")))
>      (setq exec-path (cons "C:/cygwin/bin/" exec-path))
>      (require 'setup-cygwin)
>      ;; For subprocesses invoked via the shell
>      ;; (e.g., "shell -c command")
>      (setq shell-file-name explicit-shell-file-name)))
>
> Of course the above is for detecting windows, is there any parameter
> that can let me tell the difference between Carbon Emacs and /usr/bin/
> emacs Emacs (in darwin shell)?
>
> mac-carbon-version-string is present in Carbon Emacs, and /usr/bin/
> emacs is lacking such a variable. However, I do not know how to make
> use of this to write the .emacs file (evaluating mac-carbon-version-
> string will give me a "void-variable" error in /usr/bin/emacs)
>
> Please suggest! Thanks in advance.

I think WINDOW-SYSTEM will be NIL if you're running in a
terminal. That's how it is under Linux, anyway. Or at least the
variable should have some unique value that you can check.

<Prev in Thread] Current Thread [Next in Thread>
Privacy Policy