From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: goncholden Newsgroups: gmane.emacs.help Subject: version> and version>= Date: Wed, 02 Feb 2022 13:48:56 +0000 Message-ID: References: <87k0ed2xq1.fsf@gnu.org> Reply-To: goncholden Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28594"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Monnier , help-gnu-emacs@gnu.org To: Tassilo Horn Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Feb 02 15:15:14 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 1nFGPi-0007DF-Ct for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 02 Feb 2022 15:15:14 +0100 Original-Received: from localhost ([::1]:48618 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nFGPg-0004zO-JD for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 02 Feb 2022 09:15:12 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:44046) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nFG19-0002Js-UU for help-gnu-emacs@gnu.org; Wed, 02 Feb 2022 08:49:52 -0500 Original-Received: from mail-40140.protonmail.ch ([185.70.40.140]:45516) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nFG0y-0006mG-1o for help-gnu-emacs@gnu.org; Wed, 02 Feb 2022 08:49:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail2; t=1643809737; bh=xv2cTluWq6ay7o6zZWSVKPxvZpOtCOBQIVqHWap/TUM=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:From:To:Cc; b=S8Ar5DBc2g3TYj69dlJGo+UxgTbkY2qApvgEWq16qqYHmR8HyBx/P8Ma/MAdptveq 2Y5ifISPvdQ8b7iW6uBFXSnf6vz7epoysWM7ftaDLUGVygcsR2iIzzoJurEdmvfwIQ QW1xF0rk2kp07biCl+eTnbUitRIgO1EoU9PS1ideoY14Qh8L+qJLZeu79apX+7otvO mAFR62QwRBWlTmm0oEN63Wd/KITwgI9OI8XQpklF7htXd9BFAYKtkv4LUBXWWJtIXt 9uSnamYIUl4tHceF5dYlBKjVVly3up7b/epey9qIFz3s7vDF7dT6I6VTJJQkJOjo0J TM1iYGeV6UdaQ== In-Reply-To: <87k0ed2xq1.fsf@gnu.org> Received-SPF: pass client-ip=185.70.40.140; envelope-from=goncholden@protonmail.com; helo=mail-40140.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action 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:135660 Archived-At: =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 Original Me= ssage =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 On Wednesday, February 2nd, 2022 at 1:38 PM, Tassilo Horn wr= ote: > goncholden goncholden@protonmail.com writes: > > > > (< emacs-version 28.0) > > > > (< emacs-major-version 28) > > > > Stefan > > > > Am working on colouring comments according to whether the background > > > > is light or dark. > > > > But I am encountering > > > > if: Wrong type argument: number-or-marker-p, "27.2" > > > > Code: > > > > (if (>=3D emacs-version 28.0) > > `emacs-version' is a string, 28.0 is a float. You cannot compare them. St= efan suggested to use` emacs-major-version' with 28 (both integers) > instead. > > HTH, > Tassilo 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.