Ce serveur Gitlab sera éteint le 30 juin 2020, pensez à migrer vos projets vers les serveurs gitlab-research.centralesupelec.fr et gitlab-student.centralesupelec.fr !

Commit 94dc2908 authored by Ryan C. Thompson's avatar Ryan C. Thompson

Set "default-directory" to package directory during init

This allows recipes to avoid using the "pdir" variable, which is
arguably an implementation detail.
parent 72b411a9
......@@ -221,27 +221,32 @@ definition provided by `el-get' recipes locally.
Intended for use from recipes, it will run once both the
`Info-directory-list' and the `load-path' variables have been
taken care of, but before any further action from
`el-get-init'.
`el-get-init'. It will be run with `default-directory' set
to the package directory.
:before
A pre-init function to run once before `el-get-init' calls
`load' and `require'. It gets to run with `load-path'
already set, and after :prepare has been called. It's not
intended for use from recipes.
intended for use from recipes. It will be run with
`default-directory' set to the package directory.
:post-init
Intended for use from recipes. This function is registered
for `eval-after-load' against the recipe library by
`el-get-init' once the :load and :features have been setup.
It will be run with `default-directory' set to the package
directory.
:after
A function to register for `eval-after-load' against the
recipe library, after :post-init, and after per-package
user-init-file (see `el-get-user-package-directory'). That's not
intended for recipe use.
user-init-file (see `el-get-user-package-directory'). That's
not intended for recipe use. It will be run with
`default-directory' set to the package directory.
:lazy
......
......@@ -375,7 +375,8 @@ called by `el-get' (usually at startup) for each installed package."
(after (plist-get source :after))
(pkgname (plist-get source :pkgname))
(library (or (plist-get source :library) pkgname package))
(pdir (el-get-package-directory package)))
(pdir (el-get-package-directory package))
(default-directory pdir))
;; a builtin package initialisation is about calling recipe and user
;; code only, no load-path nor byte-compiling support needed here.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment