From: Phillip Lord Date: Fri, 18 Jan 2013 10:44:17 +0000 (+0000) Subject: Support packages where autoload and elpa name are different X-Git-Tag: emacs-29.0.90~1306^2~15^2~465^2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=eaf9677409;p=emacs.git 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). --- diff --git a/lisp/use-package/use-package.el b/lisp/use-package/use-package.el index 63223a3a26a..3b5174700d5 100644 --- a/lisp/use-package/use-package.el +++ b/lisp/use-package/use-package.el @@ -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