[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cperl-mode: Eliminating references to obsolete packages
From: |
Harald Jörg |
Subject: |
Re: cperl-mode: Eliminating references to obsolete packages |
Date: |
Thu, 24 Sep 2020 20:43:33 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 |
Stefan Monnier writes:
> For example that "format-prompt" problem currently also affects the
> python.el GNU ELPA package. Luckily, AFAICT we haven't yet released
> a new python.el package (because the version number has not been
> bumped), but the problem is real.
I noticed that some of them (but not python.el) contain a comment like
this:
;; This is an Elpa :core package. Don't use functionality that is not
;; compatible with Emacs 24.1.
...but I don't know whether that actually helps. For me it would be
rather cumbersome to find out which functionality isn't compatible
with Emacs 24.1. Some recent doc strings (e.g. time-convert) show it,
some (e.g. format-prompt) don't.
> [...]
> Some automated tests that try to build&compile (and treat warnings as
> errors) those packages on the corresponding oldest Emacs version
> supported would come in handy.
Wouldn't this rule out the type of fallback patch you suggested? When
I byte-compile-file cperl-mode.el in Emacs 26.1 _with_ your fallback
patch applied, I still get the warning:
In end of data:
cperl-mode.el:8736:1:Warning: the function ‘format-prompt’ is
not known to be defined.
Sorta obvious, though: The compilation step doesn't _run_ the fboundp
safeguard.
Anyway: Are there frameworks for such tests in the Emacs repository?
On GitHub, I can apply stuff from
https://github.com/marketplace/actions/emacs-lisp-check, but as of now
this also gives false positives:
github-actions / test-on-self (26.1, true)
cperl-mode.el#L5880
You should depend on (emacs "27.1") if you need ‘cperl-force-face’.
This is fairly idiotic since "my" cperl-mode.el itself _defines_
cperl-force-face. Somehow the check seems to "know" what's
available in vanilla Emacs 26.1 and 27.1. I discovered that GitHub
action in Sacha Chua's blog
https://sachachua.com/blog/2020/06/2020-06-22-emacs-news/ and just
gave it a try without actually understanding what I was doing :)
--
Cheers,
haj