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

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

Re: detect emacs/xemacs in elisp?


From: Benjamin Lewis
Subject: Re: detect emacs/xemacs in elisp?
Date: Mon, 09 Dec 2002 14:19:44 -0800
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i686-pc-linux-gnu)

On 10 Dec 2002, Tim X. wrote:

> jason_addison@hotmail.com (Jason Addison) writes:
> 
>> I have some elisp that works/doesn't work in emacs/xemacs in my
>> ".emacs" file. I would like to be able to execute or not execute code
>> depending on which type of emacs I'm running. Another way around this
>> would be to know how to determine if a function is defined before
>> calling it. Any idea on how to do this in elisp? Also, how do you
>> determine the version of emacs that is running in elisp?
>> 
> 
> There is a package called initz which allows you to setup different
> initializations depending on what emacs/xemacs flavor you are
> running. This package will then control what init files are used
> depending on the flavor/version you are starting up.

Do you really need a ``package'' to do this?  Why not just make a .emacs
with something like

(defvar running-xemacs (string-match "XEmacs\\|Lucid" emacs-version))
(defvar running-em21 (>= emacs-major-version 21))

(cond (running-xemacs (load-file my-xemacs-init-file))
      (running-em21 (load-file my-em21-specific-file))
      (load-file my-default-file))

... or whatever.

-- 
Benjamin Lewis

Dinosaurs aren't extinct.  They've just learned to hide in the trees.
>From help-gnu-emacs-bounces@gnu.org  Mon Dec  9 17:55:09 2002
Path: 
shelby.stanford.edu!newsfeed.stanford.edu!canoe.uoregon.edu!logbridge.uoregon.edu!news.stealth.net!news.stealth.net!prodigy.com!newsmst01.news.prodigy.com!prodigy.com!postmaster.news.prodigy.com!newssrv26.news.prodigy.com.POSTED!not-for-mail
From: Ajanta <ajanta@no.spam>
Newsgroups: comp.sys.mac.apps,comp.text.tex,gnu.emacs.help
Message-ID: <091220021652087216%ajanta@no.spam>
References: <041220020952400758%ajanta@no.spam>
        <56cfb0e3.0212041458.5eab182a@posting.google.com>
        <x5k7ipl35x.fsf@lola.goethe.zz> <061220020416350201%ajanta@no.spam>
        <slrnav1ed1.ho.smullerin@esb.bbn.com> <m2hedrm4oc.fsf@owlbear.local>
        <061220021433180478%ajanta@no.spam> <5l3cpalpa1.fsf@rum.cs.yale.edu>
        <071220020055513124%ajanta@no.spam> 
<84bs3xsyi8.fsf@lucy.cs.uni-dortmund.de>
        <071220021155280606%ajanta@no.spam> <5ld6obj8il.fsf@rum.cs.yale.edu>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-transfer-encoding: 8bit
Mail-Copies-To: nobody
User-Agent: Thoth/1.5.10 (Carbon/OS X)
Lines: 23
NNTP-Posting-Host: 67.37.190.123
X-Complaints-To: abuse@prodigy.net
X-Trace: newssrv26.news.prodigy.com 1039477778 ST000 67.37.190.123 (Mon, 09
        Dec 2002 17:49:38 CST)
NNTP-Posting-Date: Mon, 09 Dec 2002 17:49:38 CST
Organization: Prodigy Internet http://www.prodigy.com
X-UserInfo1: 
[[PA@SBE[JTKB\@[GRNNOTPAUSXB@DTMNHWB_EYLJZ]BGIEL_NTKAH_[JTXDX_KI\VB]JBVMS^YT_G[CZVWAOS\DHFWEH]@KGXYHB\_CMDSFABP^J[AHHRKARLE_JDBLJ\XA[JRMEI]MGJSPB\Y]^KG\@S^@VQKI_Q[G@@_ACSARASDEFLBJ]S\GFNTUAVBL
Date: Mon, 09 Dec 2002 23:49:38 GMT
Xref: shelby.stanford.edu comp.sys.mac.apps:348447 comp.text.tex:237708
        gnu.emacs.help:107909
To: help-gnu-emacs@gnu.org
Subject: For Andrew Choi/Enrico Franconi: Bug in Emacs 21.3.50
X-BeenThere: help-gnu-emacs@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Users list for the GNU Emacs text editor <help-gnu-emacs.gnu.org>
List-Help: <mailto:help-gnu-emacs-request@gnu.org?subject=help>
List-Post: <mailto:help-gnu-emacs@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-gnu-emacs>,
        <mailto:help-gnu-emacs-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/help-gnu-emacs>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-gnu-emacs>,
        <mailto:help-gnu-emacs-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Mon, 09 Dec 2002 22:55:09 -0000


Sorry, my email is messed up today. Hope this message will get to you. 

1. I believe the following to be a bug. The Mac OSX version of 21.3.50
contains three executables inside Emacs.app, with different inode
numbers (thanks to Stefan Monnier):

  339997  /Applications/Emacs.app/Contents/MacOS/Emacs*
  340006  /Applications/Emacs.app/Contents/Resources/bin/emacs*
  340007  /Applications/Emacs.app/Contents/Resources/bin/emacs-21.3.50*

They are identical size (7912316). Seems like a waste of HD space.

2. This is of course not a bug but would be a great feature if
implemented: a simple way to delete support for all unwanted languages
(don't know howm much space those things take). I for example only need
English. The best would be some sort of script that people could
configure (i.e., which languages you want to keep), and then run it to
delete the rest.

Thanks.

A
>From help-gnu-emacs-bounces@gnu.org  Mon Dec  9 18:25:11 2002
Path: 
shelby.stanford.edu!newsfeed.stanford.edu!cyclone.bc.net!snoopy.risq.qc.ca!chi1.webusenet.com!news.webusenet.com!pd2nf1so.cg.shawcable.net!residential.shaw.ca!news3.calgary.shaw.ca.POSTED!not-for-mail
X-Trace-PostClient-IP: 68.144.207.94
Sender: choi@owlbear.local
Newsgroups: gnu.emacs.help
References: <041220020952400758%ajanta@no.spam>
        <56cfb0e3.0212041458.5eab182a@posting.google.com>
        <x5k7ipl35x.fsf@lola.goethe.zz> <061220020416350201%ajanta@no.spam>
        <slrnav1ed1.ho.smullerin@esb.bbn.com> <m2hedrm4oc.fsf@owlbear.local>
        <061220021433180478%ajanta@no.spam> <5l3cpalpa1.fsf@rum.cs.yale.edu>
        <071220020055513124%ajanta@no.spam> 
<84bs3xsyi8.fsf@lucy.cs.uni-dortmund.de>
        <071220021155280606%ajanta@no.spam> <5ld6obj8il.fsf@rum.cs.yale.edu>
        <091220021652087216%ajanta@no.spam>
From: Andrew Choi <akochoi_NOSPAM_@shaw.ca>
Message-ID: <m2d6oa93tv.fsf@owlbear.local>
Lines: 33
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Date: Mon, 09 Dec 2002 23:21:00 GMT
NNTP-Posting-Host: 24.71.223.147
X-Complaints-To: abuse@shaw.ca
X-Trace: news3.calgary.shaw.ca 1039476060 24.71.223.147 (Mon, 09 Dec 2002
        16:21:00 MST)
NNTP-Posting-Date: Mon, 09 Dec 2002 16:21:00 MST
Organization: Shaw Residential Internet
Xref: shelby.stanford.edu gnu.emacs.help:107910
To: help-gnu-emacs@gnu.org
Subject: Re: For Andrew Choi/Enrico Franconi: Bug in Emacs 21.3.50
X-BeenThere: help-gnu-emacs@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Users list for the GNU Emacs text editor <help-gnu-emacs.gnu.org>
List-Help: <mailto:help-gnu-emacs-request@gnu.org?subject=help>
List-Post: <mailto:help-gnu-emacs@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-gnu-emacs>,
        <mailto:help-gnu-emacs-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/help-gnu-emacs>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-gnu-emacs>,
        <mailto:help-gnu-emacs-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Mon, 09 Dec 2002 23:25:12 -0000

Ajanta <ajanta@no.spam> writes:

> 1. I believe the following to be a bug. The Mac OSX version of 21.3.50
> contains three executables inside Emacs.app, with different inode
> numbers (thanks to Stefan Monnier):
> 
>   339997  /Applications/Emacs.app/Contents/MacOS/Emacs*
>   340006  /Applications/Emacs.app/Contents/Resources/bin/emacs*
>   340007  /Applications/Emacs.app/Contents/Resources/bin/emacs-21.3.50*
> 
> They are identical size (7912316). Seems like a waste of HD space.
 
If you're using mac/make-package, try using the --app-symlink option.
If you're using `make' try changing the line

  cd ${emacsapp}Contents/MacOS/; cp ../../../../src/emacs Emacs

in src/Makefile.in to

  cd ${emacsapp}Contents/MacOS/; ln ../../../../src/emacs Emacs

Also simply delete whichever executable you don't want.

> 2. This is of course not a bug but would be a great feature if
> implemented: a simple way to delete support for all unwanted languages
> (don't know howm much space those things take). I for example only need
> English. The best would be some sort of script that people could
> configure (i.e., which languages you want to keep), and then run it to
> delete the rest.

This is not Mac specific.  Other people are better qualified to answer
it.  It has most likely been discussed many times before so please
search the archives for answers.
>From help-gnu-emacs-bounces@gnu.org  Mon Dec  9 19:05:08 2002
Path: 
shelby.stanford.edu!newsfeed.stanford.edu!logbridge.uoregon.edu!fr.usenet-edu.net!usenet-edu.net!teaser.fr!newsfeed.stueberl.de!newsr1.ipcore.viaginterkom.de!btnet-peer1!btnet-feed5!btnet!news.btopenworld.com!nyaumo.btinternet.com!nobody
From: Jason Rumney <jasonr@btinternet.co>
Newsgroups: gnu.emacs.help
Date: Tue, 10 Dec 2002 00:04:09 +0000 (UTC)
Organization: BT Openworld
Lines: 7
Sender: jasonr@nyaumo.jasonr.f2s.net
Message-ID: <m2smx6dcs9.fsf@nyaumo.jasonr.f2s.net>
References: <un0niuptv.fsf@sdm.de> <m2vg25biet.fsf@nyaumo.btinternet.com>
        <uisy3vbin.fsf@sdm.de>
NNTP-Posting-Host: 213.122.221.226
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: knossos.btinternet.com 1039478649 3346 213.122.221.226 (10 Dec 2002
        00:04:09 GMT)
X-Complaints-To: news-complaints@lists.btinternet.com
NNTP-Posting-Date: Tue, 10 Dec 2002 00:04:09 +0000 (UTC)
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50
Xref: shelby.stanford.edu gnu.emacs.help:107911
To: help-gnu-emacs@gnu.org
Subject: Re: Question for help-echo property
X-BeenThere: help-gnu-emacs@gnu.org
X-Mailman-Version: 2.1b5
Precedence: list
List-Id: Users list for the GNU Emacs text editor <help-gnu-emacs.gnu.org>
List-Help: <mailto:help-gnu-emacs-request@gnu.org?subject=help>
List-Post: <mailto:help-gnu-emacs@gnu.org>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-gnu-emacs>,
        <mailto:help-gnu-emacs-request@gnu.org?subject=subscribe>
List-Archive: <http://mail.gnu.org/pipermail/help-gnu-emacs>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-gnu-emacs>,
        <mailto:help-gnu-emacs-request@gnu.org?subject=unsubscribe>
X-List-Received-Date: Tue, 10 Dec 2002 00:05:08 -0000

Klaus Berndl <Klaus.Berndl@sdm.de> writes:

> Can you reproduce my problem description?

Not in the Emacs I am currently using, but that is the current CVS on
GNU/Linux.


reply via email to

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