Since Emacs 27 the package cl is deprecated, the replacement is
cl-lib, which is available since Emacs 24.3.
This patch replaces cl by cl-lib and drops support for Emacs versions
less than 24.3. Dropping older Emacsen is required, because cl-lib is
a builtin starting from version 24.3 and doesn't need an extra package
from ELPA.
Testcases for past issues still contain cl. Most of them seem to be
broken and need further investigation.
This patch is tested with test/run-ert.sh, which outputs:
Ran 10 tests, 10 results as expected, 0 unexpected (2021-01-30 13:24:54+0100, 0.672122 sec)
1 expected failures
and manually by daily usage for a month now.
* el-get-recipes.el (el-get-recipe-pprint): New function.
* el-get.el (el-get-write-recipe): Use it.
* el-get-list-packages.el (el-get-describe-1): Use it instead of princ.
(el-get-describe): Call el-get-describe-1 inside with-current-buffer
invocation, since el-get-recipe-pprint causes output to go straight to
the current buffer rather than standard-output.
If `:library` and `:feature` are not specified, `eval-after-load` will
use `:pkgname` as its first argument. For a github based recipe, the
`:pkgname` has two parts: "username/reponame". We need to remove the
"username" part before passing `:pkgname` to `eval-after-load`.
This is more portable than current approach, which leads to errors in
windows, since it uses ':' in drive names and ';' to separate entries in
environment variables
This function is used to create completion candidates, so its slowness
is quite noticable. The main cause of slowness was the reading of all
the recipe files which can be avoided because the file name gives the
recipe name.
* el-get-recipes.el (el-get-all-recipe-file-names): new function.
* el-get.el (el-get-read-all-recipe-names): use new function
el-get-all-recipe-file-names instead of el-get-read-all-recipes to
avoid having to read every recipe file.
el-get-list-packages wasn't showing descriptions when a partial recipe
in el-get-sources didn't have a :description field.
* el-get-recipes.el
(el-get-read-all-recipes): merge el-get-sources recipes into file
recipes rather than override.
(el-get-recipe-merge): new function.
(el-get-package-def): use it.
The travis script has set -e enabled which prints out command line to be
executed. However, it prints the command line after glob expansion, so
having recipes/*.rcp in a command would be a pain to scroll through.
* el-get-recipes.el: If :builtin is a string use `version<=' to
compare against `emacs-version'.
Minor version matching is required for `cl-lib' because it is a
builtin in version 24.3.
Signed-off-by: Rüdiger Sonderfeld <ruediger@c-plusplus.de>
* Add el-get-check-recipe command
* Add a script test/check-recipe.el
* Mention recipe checker in the document
* Add warnings to el-get-check-recipe
* Use @command instead of @code
* make el-get.info
* Use more expressive name than el-get-check-recipe-1
It appears that Emacs Lisp loop will generate its own symbols/bindings for
the collect keyword even when you try to reference an already existing
binding in an outer block, and that I didn't test that properly before.
Seeing duplicates in the el-get-xxx commands completion did annoy me and
seeing them in M-x el-get-list-packages looked too much as a bug for me to
continue ignore it.
el-get-envpath-prepend is added in order to simplify settings
related to python-related recipes, including newly added traad.rcp.
This function is general enough to use to modify, for example,
the $PATH environment variable.