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 5cde0bc0 authored by Dimitri Fontaine's avatar Dimitri Fontaine

warn users when el-get-install is used on unregistered packages, and augment the docs there too.

parent 04c43f32
......@@ -120,11 +120,14 @@ See the documentation of the +el-get-sources+ variable for details.
Note that you can also give a mix of +packages+ symbols, +inline recipes+
and +source lists+ to +el-get+ as arguments, and completely bypass the
+el-get-sources+ variable. As of +el-get 1.2+, that's the recommanded
+el-get-sources+ variable.
(el-get 'sync 'package 'name (:name or :type emacswiki) sources)
It is still recommended to +(setq el-get-sources '(list of packages))+ then
use +(el-get 'sync)+, so that commands such as +el-get-update+ know which
packages to update.
=== Recipes
Some sources are contributed to +el-get+ directly, so that you only have to
......@@ -179,10 +182,17 @@ M-x el-get-cd::
its directory with dired.
M-x el-get-install::
Will prompt for a package name, with completion, then install it. It
will only propose packages that are not already +installed+. Any
package that you have a recipe for is a candidate.
Please note that when installing a package that is not in your
+el-get-sources+ or your +el-get+ call means that it will not be
initialized for you automatically at emacs startup. You get a +WARNING+
message when that's the case.
C-h e runs the command view-echo-area-messages.
M-x el-get-update::
......@@ -2044,6 +2044,11 @@ entry."
(unless (plist-member recipe :type)
(error "el-get: package `%s' has incomplete recipe (no :type)" package))))
(defun el-get-warn-unregistered-package (package)
"Add a message unless PACKAGE is known in `el-get-source'"
(unless (el-get-package-p package)
(message "WARNING: el-get package \"%s\" is not in `el-get-sources'." package)))
(defun el-get-read-package-name (action &optional merge-recipes filter-installed)
"Ask user for a package name in minibuffer, with completion."
(let ((sources (el-get-package-name-list merge-recipes))
......@@ -2077,7 +2082,7 @@ entry."
(defun el-get-eval-autoloads ()
"Evaluate the autoloads from the autoload file."
(when (and el-get-generate-autoloads
(when (and el-get-generate-autoloads
(file-exists-p el-get-autoload-file))
(message "el-get: evaluating autoload file")
(el-get-load-fast el-get-autoload-file)))
......@@ -2167,19 +2172,15 @@ is nil, marks all installed packages as needing new autoloads."
(concat (file-name-sans-extension el-get-autoload-file) ".elc")))))
(defun el-get-init (package &optional noerror)
(defun el-get-init (package)
"Make the named PACKAGE available for use.
Add PACKAGE's directory (or `:load-path' if specified) to the
`load-path', add any its `:info' directory to
`Info-directory-list', and `require' its `:features'. Will be
called by `el-get' (usually at startup) for each package in
Optional parameter NOERROR, if non-nil, suppresses errors in case
package is not listed in `el-get-sources'"
(interactive (list (el-get-read-package-name "Init")))
(unless noerror (el-get-error-unless-package-p package))
(let* ((source (el-get-package-def package))
(method (plist-get source :type))
(loads (plist-get source :load))
......@@ -2272,11 +2273,8 @@ package is not listed in `el-get-sources'"
;; return the package
(defun el-get-post-install (package &optional noerror)
"Post install PACKAGE. This will get run by a sentinel.
Optional parameter NOERROR, if non-nil, suppresses errors in case
package is not listed in `el-get-sources'"
(defun el-get-post-install (package)
"Post install PACKAGE. This will get run by a sentinel."
(let* ((source (el-get-package-def package))
(hooks (el-get-method (plist-get source :type) :install-hook))
(commands (el-get-build-commands package)))
......@@ -2286,7 +2284,7 @@ package is not listed in `el-get-sources'"
(let ((wrap-up `(lambda (package)
(el-get-invalidate-autoloads package)
(el-get-init package ',noerror)
(el-get-init package)
(el-get-save-package-status package "installed"))))
(el-get-build package commands nil el-get-default-process-sync wrap-up)))
......@@ -2460,7 +2458,8 @@ entry which is not a symbol and is not already a known recipe."
(defun el-get-post-init-message (package)
"After PACKAGE init is done, just message about it"
(message "el-get initialized package %s" package))
(message "el-get initialized package %s" package)
(el-get-warn-unregistered-package package))
(add-hook 'el-get-post-init-hooks 'el-get-post-init-message)
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