1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-31 04:41:23 -08:00

Support packages where autoload and elpa name are different

Some packages such as ECB already provide an autoload file,
so it is this that use-package needs to require. However,
the ELPA name is ecb. This commit allows ensure to take an
argument (other than t).
This commit is contained in:
Phillip Lord 2013-01-18 10:44:17 +00:00
parent 445d0245fc
commit eaf9677409

View file

@ -369,12 +369,17 @@ For full documentation. please see commentary.
(name-string (if (stringp name) name (symbol-name name)))
(name-symbol (if (stringp name) (intern name) name)))
;; force this immediately -- one off cost
(unless (plist-get args :disabled)
;; force this immediately -- one off cost!
(if (plist-get args :ensure)
(use-package-ensure-elpa name))
(let* ((ensure (plist-get args :ensure))
(package-name
(or (and (eq ensure t)
name)
ensure)))
(when package-name
(use-package-ensure-elpa package-name)))
(if diminish-var
(setq config-body
`(progn