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

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

Re: checking emacs version


From: Eli Zaretskii
Subject: Re: checking emacs version
Date: Tue, 24 Feb 2009 06:07:32 +0200

> From: Eric <address@hidden>
> 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?




reply via email to

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