From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Peter Dyballa Newsgroups: gmane.emacs.help Subject: Re: .emacs handling multiple versions Date: Wed, 4 Apr 2007 19:21:44 +0200 Message-ID: References: <8896027D-3B50-4A48-82C6-51E9D230A710@monkeybytes.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1175708906 15708 80.91.229.12 (4 Apr 2007 17:48:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 4 Apr 2007 17:48:26 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: "perldev@monkeybytes.org" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Apr 04 19:48:20 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HZ9al-0003EQ-8r for geh-help-gnu-emacs@m.gmane.org; Wed, 04 Apr 2007 19:48:19 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HZ9e2-0003Ro-Da for geh-help-gnu-emacs@m.gmane.org; Wed, 04 Apr 2007 13:51:42 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HZ9dq-0003Pl-Kt for help-gnu-emacs@gnu.org; Wed, 04 Apr 2007 13:51:30 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HZ9dp-0003Nc-1T for help-gnu-emacs@gnu.org; Wed, 04 Apr 2007 13:51:30 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HZ9do-0003NR-QS for help-gnu-emacs@gnu.org; Wed, 04 Apr 2007 13:51:28 -0400 Original-Received: from fmmailgate02.web.de ([217.72.192.227]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HZ9aW-00052N-S3 for help-gnu-emacs@gnu.org; Wed, 04 Apr 2007 13:48:05 -0400 Original-Received: from smtp08.web.de (fmsmtp08.dlan.cinetic.de [172.20.5.216]) by fmmailgate02.web.de (Postfix) with ESMTP id 2FD4A6FA635D; Wed, 4 Apr 2007 19:21:50 +0200 (CEST) Original-Received: from [62.134.227.70] (helo=[192.168.1.2]) by smtp08.web.de with asmtp (TLSv1:AES128-SHA:128) (WEB.DE 4.107 #114) id 1HZ9B7-0005W7-00; Wed, 04 Apr 2007 19:21:49 +0200 In-Reply-To: <8896027D-3B50-4A48-82C6-51E9D230A710@monkeybytes.org> X-Mailer: Apple Mail (2.752.2) X-Sender: Peter_Dyballa@web.de X-detected-kernel: Linux 2.4-2.6 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:42423 Archived-At: 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.