From: Benjamin Lewis <bclewis@cs.sfu.ca>
Subject: Re: detect emacs/xemacs in elisp?
Date: Mon, 09 Dec 2002 14:19:44 -0800 [thread overview]
Message-ID: <yy7on0ne6dj3.fsf@marge.cs.sfu.ca> (raw)
In-Reply-To: 87of7uetyj.fsf@blind-bat.une.edu.au
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.
next prev parent reply other threads:[~2002-12-09 22:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-09 18:30 detect emacs/xemacs in elisp? Jason Addison
2002-12-09 18:52 ` Jesper Harder
2002-12-09 21:57 ` Tim X
2002-12-09 22:19 ` Benjamin Lewis [this message]
2002-12-10 0:50 ` Stefan Monnier <foo@acm.com>
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=yy7on0ne6dj3.fsf@marge.cs.sfu.ca \
--to=bclewis@cs.sfu.ca \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).