From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#66554: [PATCH] Add the public API of Compat to the core Date: Thu, 18 Jan 2024 15:18:42 -0500 Message-ID: References: <87pm1ggrdx.fsf@posteo.net> <87bk9scucg.fsf@daniel-mendler.de> <87y1cwpanh.fsf@posteo.net> <877ckgpa45.fsf@daniel-mendler.de> <87mstbpyd7.fsf@posteo.net> <87h6jjah1g.fsf@daniel-mendler.de> <87edenptba.fsf@posteo.net> <87bk9raaad.fsf@daniel-mendler.de> <87a5pbvbxc.fsf@posteo.net> <875xzza8jw.fsf@daniel-mendler.de> <87edemldlw.fsf@posteo.net> <83cyu6ifzw.fsf@gnu.org> <875xzyl8lq.fsf@posteo.net> <837ckeievw.fsf@gnu.org> <87h6jiqtsp.fsf@daniel-mendler.de> <835xzyiagj.fsf@gnu.org> <871qamkx0m.fsf@posteo.net> <83wmsdhgw8.fsf@gnu.org> <87wmsdxvz6.fsf@daniel-mendler.de> <878r4ml8sg.fsf@posteo.net> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28022"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Daniel Mendler , Eli Zaretskii , stefankangas@gmail.com, 66554@debbugs.gnu.org To: Philip Kaludercic Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 18 21:19:31 2024 Return-path: Envelope-to: geb-bug-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 1rQYrL-0006xZ-OV for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 18 Jan 2024 21:19:31 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rQYqt-0004TZ-4x; Thu, 18 Jan 2024 15:19:03 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rQYqq-0004T9-Um for bug-gnu-emacs@gnu.org; Thu, 18 Jan 2024 15:19:00 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rQYqq-0003PA-ME for bug-gnu-emacs@gnu.org; Thu, 18 Jan 2024 15:19:00 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rQYqs-0003GT-DR for bug-gnu-emacs@gnu.org; Thu, 18 Jan 2024 15:19:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 18 Jan 2024 20:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66554 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 66554-submit@debbugs.gnu.org id=B66554.170560913512528 (code B ref 66554); Thu, 18 Jan 2024 20:19:02 +0000 Original-Received: (at 66554) by debbugs.gnu.org; 18 Jan 2024 20:18:55 +0000 Original-Received: from localhost ([127.0.0.1]:56772 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQYqk-0003Fz-Kt for submit@debbugs.gnu.org; Thu, 18 Jan 2024 15:18:54 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:60839) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQYqi-0003Fm-1p for 66554@debbugs.gnu.org; Thu, 18 Jan 2024 15:18:53 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 82C1110007D; Thu, 18 Jan 2024 15:18:44 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1705609123; bh=O0O409BaXZhZ2+Zb2aEREn8c/BiPvfwu7alF1PGgCIY=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=ei/7qVYCD5HXsXAd4ly4bUibUQv/ID/rmw0bGVjaDzZw3+GfFyVe28ouQ7G+mQSc3 HNDiGs/RXWYedmbWfg1u1dJ4J3PoAIybjmGIi75BnkSR/H+e62wZqRWJCLjc/QjNBv PEniZWnztLB/Gc3GFEinBFa2jbXqXi+avIPlCtVG/6dDWC0SCEvH8ZJbgbb16IfUSM +njrqajENGCmLVbDtbo5JIuTMKefFkp6/n280gNrlE++6d1aJhUPQoRRpmw5dFs+rY lwbctFCAHqQ+DfzZ13kPVckBRILLMJ2/Ff+5Wb+csca3BMg7ats3HMt7XUKvdiEEtL 7/LSLxe9RLY8g== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 57FA010001D; Thu, 18 Jan 2024 15:18:43 -0500 (EST) Original-Received: from alfajor (modemcable005.21-80-70.mc.videotron.ca [70.80.21.5]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 300491202CB; Thu, 18 Jan 2024 15:18:43 -0500 (EST) In-Reply-To: <878r4ml8sg.fsf@posteo.net> (Philip Kaludercic's message of "Thu, 18 Jan 2024 19:51:27 +0000") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:278449 Archived-At: > +;;;; Hack to avoid installing Compat if not necessary > + > +;; The versioning scheme of the Compat package follows that of Emacs, > +;; to indicate what version of Emacs is being supported. For example, > +;; the Compat version number 29.2.3.9 would attempt to provide > +;; compatibility definitions up to Emacs 29.2, while also designating > +;; that this is the third major release and ninth minor release of > +;; Compat, for the specific Emacs release. > + > +;; To ensure that if the user is using Emacs X.Y installed, the ELPA > +;; package Compat X.Y.Z* (for any values of Z*) does not get > +;; unnecessarily installed, as there are no missing features that > +;; Compat could provide, we programmatically specify the version of > +;; the package to be that of the current Emacs version plus a high > +;; "major release" to exceed the major version of Compat. > + > +;;;###autoload (push (list 'compat emacs-major-version emacs-minor-version most-positive-fixnum) package--builtin-versions) Hack? Why call it a hack? By definition a `compat-NN.MM` package is attempting to provide a subset of the API offered by Emacs-NN.MM, so Emacs-NN.MM very much provides a version of `compat-NN.MM`. IOW (push (list 'compat emacs-major-version emacs-minor-version ...) package--builtin-versions) is not a hack at all. If you want to label the `most-positive-fixnum` as a hack, I guess that's OK but then the comment should clarify what it's referring to. Also, please keep the line below the 80 columns limit, e.g.: ;;;###autoload (push (list 'compat emacs-major-version ;;;###autoload emacs-minor-version most-positive-fixnum) ;;;###autoload package--builtin-versions) -- Stefan