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

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

Re: checking emacs version


From: Eric
Subject: Re: checking emacs version
Date: Mon, 23 Feb 2009 20:21:32 -0800 (PST)
User-agent: G2/1.0

On Feb 24, 12:07 pm, Eli Zaretskii <e...@gnu.org> wrote:
> > From: Eric <gir...@gmail.com>
> > Date: Mon, 23 Feb 2009 18:59:43 -0800 (PST)
>
> > I'm writing an .emacs file that will need to work under a few
> > different versions of emacs, and wanted to ask what the most reliable
> > method of checking the current emacs version. Is a simple string
> > search in (emacs-version) acceptable, or is there a more robust way of
> > doing it?
>
> You can do as simple as
>
>    (if (>= emacs-major-version 21)
>        (do-something))
>
> or more sophisticated
>
>    (if (version<= 23.0.98)
>        (do-something-else))
>
> Is that what you are looking for?

No, sorry! I totally failed to say what I was actually doing -- not
checking emacs versions but checking emacs ports: I use Carbon Emacs
on my mac at home, and vanilla emacs on my server, and want to set
some Carbon-specific variables when I'm at home. The string "Carbon"
show up in (emacs-version), that's why I was thinking that might be
how I have to do it.

Thanks,
Eric


reply via email to

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