[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [External] : Re: [NonGNU ELPA] Package suggestion: yeetube
From: |
Philip Kaludercic |
Subject: |
Re: [External] : Re: [NonGNU ELPA] Package suggestion: yeetube |
Date: |
Fri, 06 Oct 2023 08:59:51 +0000 |
Thanos Apollo <public@thanosapollo.com> writes:
> Drew Adams <drew.adams@oracle.com> writes:
>
>> How old? Emacs 20? What minimal version
>> does that package itself require? Does
>> it, itself, need some compat support...?
Emacs 24.4 is the current minimum version. This is currently the oldest
version that one can reasonably support without running into too many
edge-cases that are beyond the scope of the library, while also being
distributed in most supported, popular distributions.
> Philip will give you a more concrete answer, but according to the
> documentation:
>
> ```
> Requires: ((emacs "24.4") (compat "29.1.4.2"))
>
> There is no need to depend on ‘emacs 24.4’ specifically. One can
> choose any newer version, if features not provided by Compat
> necessitate
> it, for example bug fixes or UI improvements.
>
> In any file where compatibility forms are used, a
>
> (require 'compat)
>
> should be added early on. In packages which are part of Emacs
> itself
> and which want to take advantage of Compat, the ‘noerror’ flag should
> be
> specified: ‘(require 'compat nil 'noerror)’. In the future a minimal
> version of Compat may be added to the Emacs core, such that the
> ‘noerror’ flag will not be necessary anymore.
> ```
>
> Not sure, but maybe something like this is a valid use case?
>
> ``` emacs-lisp
> (compat-call defvar-keymap yeetube-mode-map
> :doc "Keymap for yeetube commands"
> "RET" #'yeetube-play
> ...
There is no need to use compat-call, if the function/macro was
introduced in a more recent version than the minimum version of Emacs
you wish to support. In other words, the point of `compat-call' is to
ensure the compatibility version of function is used, where the
signature was updated at some point (e.g. IIRC in Emacs 26.1 `assoc'
gained an optional TESTFN argument), but to avoid the complexity of
advising the default function with an updated signature, the API of
Compat allows/requires for developers to opt-in to new signatures.
> ``` -- Thanos Apollo
> https://thanosapollo.com
- Re: [NonGNU ELPA] Package suggestion: yeetube, (continued)
Re: [NonGNU ELPA] Package suggestion: yeetube, Richard Stallman, 2023/10/05
Re: [NonGNU ELPA] Package suggestion: yeetube, Daniel Martín, 2023/10/04
Re: [NonGNU ELPA] Package suggestion: yeetube, Thanos Apollo, 2023/10/04
Re: [NonGNU ELPA] Package suggestion: yeetube, Emanuel Berg, 2023/10/04