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 10:21:15 +0000 Message-ID: References: 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="13149"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Stefan Monnier Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Feb 02 11:22:30 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 1nFCmT-0003DS-6P for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 02 Feb 2022 11:22:29 +0100 Original-Received: from localhost ([::1]:52494 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nFCmR-0000VN-E6 for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 02 Feb 2022 05:22:27 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:49166) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nFClS-0000UG-SG for help-gnu-emacs@gnu.org; Wed, 02 Feb 2022 05:21:26 -0500 Original-Received: from mail-40140.protonmail.ch ([185.70.40.140]:35694) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nFClM-0007Nj-Gx for help-gnu-emacs@gnu.org; Wed, 02 Feb 2022 05:21:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail2; t=1643797276; bh=o7FGJahJVAYfau3H97r8FEqk8lXLAYXrCWWwn+QZGsQ=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:From:To:Cc; b=sJZ91nxK+dg/iQXBS4gEWtUbLHAY9Cg2rlkzhr1mz4HaoOIdlo/io2W0H8I9OzCVa DppENyUR87JHYiciemo3/7cK7HtFQ/ClJ1JI5jMZnS1yu6zX2e7X+v7zEM8GeDZtzR LEusOr+v9tll1sLQSnhKVLNNb//xziI6Qkka+IX1oHElgJ0AvT3z6IpvXu6bcM31gt NTHYxDfA8NMnM2CaAx0OL+5RS/RRd34wid5eVKrZt2HqmKVP7MAuMU9ozY0VnY2UyF +hCXK46NZVUDC5+UM1QdfbHoyomYJWsVQDeREicBlmZzbWspIFdo68UjXULnD/l3KQ BK5A12nRbbolA== In-Reply-To: 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, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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:135654 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 3:47 AM, Stefan Monnier via Users list = for the GNU Emacs text editor wrote: > What is the best way to check the version > > (if (version< emacs-version "28.0") > > or > > (< emacs-version 28.0) (< emacs-major-version 28) Stefan Am working on colouring comments according to whether the background is lig= ht or dark. But I am encountering if: Wrong type argument: number-or-marker-p, "27.2" Code: (defvar annotation-chroma '( (dark . ((low . "#8300E0") (mid . "#AA33FF") (high . "#C370FF"))) (light . ((low . "#C16BFF") (mid . "#AA33FF") (high . "#8000DB")))= ) "Colour contrast for comments, indigo on dark and light background.") (defun annotation-typeface (chroma) "Set the foreground colour for comments." (let* ( (colors annotation-chroma) (levels (if (>=3D emacs-version 28.0) (alist-get (frame--current-backround-mode nil) colors) =09 (message "GonCholden"))) ) (face-remap-add-relative 'font-lock-comment-face `(:foreground ,(alist-get chroma levels))) (message "annotation: %s contrast" chroma)) )