From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.help Subject: Re: version> and version>= Date: Wed, 02 Feb 2022 14:52:01 +0100 Message-ID: <87fsp12wxb.fsf@gnu.org> References: <87k0ed2xq1.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3030"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.7.6; emacs 29.0.50 Cc: help-gnu-emacs@gnu.org, Stefan Monnier To: goncholden Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Feb 02 15:10:17 2022 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nFGKu-0000Xv-BP for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 02 Feb 2022 15:10:16 +0100 Original-Received: from localhost ([::1]:42356 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nFGKt-0000Z9-8L for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 02 Feb 2022 09:10:15 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:46378) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nFG8t-0000Qf-GM for help-gnu-emacs@gnu.org; Wed, 02 Feb 2022 08:57:52 -0500 Original-Received: from [2001:470:142:3::e] (port=33270 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nFG8t-0008Qt-0M; Wed, 02 Feb 2022 08:57:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-reply-to:Date:Subject:To:From: References; bh=55x6jbwlCXTLPjRb98JnZCPQVjZ2/hZLouznA6pI4/E=; b=EUE7DuoG9WGdHR v4rZRCb41KQWoe+PzTPSime+S2aK0fzSrqR1nM6gOKnmE340YwrwV+9uiKWPJTJktxDlrJLriuRW3 XOC3q3lj3OAy6xZLt/D+1BhHc+xMetPIk+tmdD75SdWvmak2OXt3QqaGn/yPJTuCm1bFKpcNnK2/S LZS1Z+F5NFgsz2mDd1NA8WPKohL3NtapAABqPMh5uPyGGpnoH8pNfHxSvke8Me05+ew/lsiaXQnet oS/QIj/I9V6lfYMONJs2KIkCa78CCD8B6soCxopIfFOlLjbxpfC+WPzOecGYj35v+5+Zh8GJOuWzl Varz5/BSC06/pPtShSaw==; Original-Received: from auth2-smtp.messagingengine.com ([66.111.4.228]:41885) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nFG8h-0003Rp-CI; Wed, 02 Feb 2022 08:57:45 -0500 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailauth.nyi.internal (Postfix) with ESMTP id CDDAB27C0054; Wed, 2 Feb 2022 08:57:38 -0500 (EST) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 02 Feb 2022 08:57:38 -0500 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrgeehgdehkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpehffgfhvffuffgjkfggtgesthdtredttdertdenucfhrhhomhepvfgrshhsihhl ohcujfhorhhnuceothhsughhsehgnhhurdhorhhgqeenucggtffrrghtthgvrhhnpeevve eikeetkeeviefgfeffiedvteeguddvffeuueduveegtddthedvhfeuveffhfenucevlhhu shhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhorhhnodhmvg hsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdekieejfeekjeekgedqieefhedvleek qdhtshguhheppehgnhhurdhorhhgsehfrghsthhmrghilhdrfhhm X-ME-Proxy: Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 2 Feb 2022 08:57:37 -0500 (EST) In-reply-to: X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:135659 Archived-At: goncholden 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