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

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

Re: version> and version>=


From: Tassilo Horn
Subject: Re: version> and version>=
Date: Wed, 02 Feb 2022 14:52:01 +0100
User-agent: mu4e 1.7.6; emacs 29.0.50

goncholden <goncholden@protonmail.com> writes:

>> `emacs-version' is a string, 28.0 is a float. You cannot compare
>> them. Stefan suggested to use` emacs-major-version' with 28 (both
>> integers) instead.
>
> It would be convenient if there was a function that could handle
> floats, so that one can condition not just on a major version, but
> upon the complete version number.

Well, usually there should be no API-breaking changes between Emacs X.Y
und X.Z, so version-checks more detailed than major version shouldn't be
needed.

And there is already

  (version<= "28.0" emacs-version)

if you want to test with version strings and have more control over
minor and even micro version.  (Using floats for versions is just plain
wrong.)

Bye,
Tassilo



reply via email to

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