[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: .emacs handling multiple versions
From: |
Peter Dyballa |
Subject: |
Re: .emacs handling multiple versions |
Date: |
Wed, 4 Apr 2007 19:21:44 +0200 |
Am 04.04.2007 um 17:15 schrieb perldev@monkeybytes.org:
I'm running Carbon Emacs on OS X as my main emacs, thus my .emacs
file has a bunch of carbon only hooks in it. However, sometimes
I'll use the terminal emacs (shipped with OS X) and the .emacs file
causes problems calling things that the terminal version can't
handle. I'd like to keep the ability to use both... any suggestions
for having the .emacs file know which version is calling it and
respond accordingly?
As Stefan already mentioned:
/Applications/Emacs.app/Contents/MacOS/Emacs -nw
works as well! Use it with a shell alias or a shell function.
The other option is to check (compare) the emacs major version
number. Apple's version of GNU Emacs without any windowing support is
of version 21, the Carbon Emacsen are since some time of version 22:
(cond ((< 21 emacs-major-version)
(progn
(message "This GNU Emacs is greater no. 21")
(some thing)
)
(some thing else, if needed)
)
There are more conditionals.
Could be on Leopard, the coming Mac OS X 10.5, Apple's version of GNU
Emacs will be 22. Then you could use emacs-minor-version.
There is also the symbol window-system. Without a windowing system
it's nil, otherwise one of mac, ns, x11, or ? (don't know) for MS.
--
Greetings
Pete
There's something the technicians need to learn from the artists. If
it isn't aesthetically pleasing, it's probably wrong.