From: Peter Dyballa <Peter_Dyballa@Web.DE>
To: "perldev@monkeybytes.org" <perldev@monkeybytes.org>
Cc: help-gnu-emacs@gnu.org
Subject: Re: .emacs handling multiple versions
Date: Wed, 4 Apr 2007 19:21:44 +0200 [thread overview]
Message-ID: <E84FCCA9-A416-4ECD-B477-0756D6B07A89@Web.DE> (raw)
In-Reply-To: <8896027D-3B50-4A48-82C6-51E9D230A710@monkeybytes.org>
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.
next prev parent reply other threads:[~2007-04-04 17:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-04 15:15 .emacs handling multiple versions perldev
2007-04-04 15:31 ` Kai Grossjohann
2007-04-04 17:21 ` Peter Dyballa [this message]
2007-04-04 18:12 ` perldev
[not found] <mailman.1747.1175699939.7795.help-gnu-emacs@gnu.org>
2007-04-04 15:42 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E84FCCA9-A416-4ECD-B477-0756D6B07A89@Web.DE \
--to=peter_dyballa@web.de \
--cc=help-gnu-emacs@gnu.org \
--cc=perldev@monkeybytes.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.