mirror of
https://github.com/masscollaborationlabs/emacs.git
synced 2025-07-06 04:09:37 +00:00
Merge pull request from phillord/master
ELPA support GitHub-reference: https://github.com/jwiegley/use-package/issues/9
This commit is contained in:
commit
75b30bfd9b
1 changed files with 11 additions and 0 deletions
|
@ -314,6 +314,12 @@
|
||||||
:url (match-string 1))))))))
|
:url (match-string 1))))))))
|
||||||
args))
|
args))
|
||||||
|
|
||||||
|
|
||||||
|
(defun use-package-ensure-elpa (package)
|
||||||
|
(when (not (package-installed-p package))
|
||||||
|
(package-install package)))
|
||||||
|
|
||||||
|
|
||||||
(defmacro use-package (name &rest args)
|
(defmacro use-package (name &rest args)
|
||||||
(let* ((commands (plist-get args :commands))
|
(let* ((commands (plist-get args :commands))
|
||||||
(pre-init-body (plist-get args :pre-init))
|
(pre-init-body (plist-get args :pre-init))
|
||||||
|
@ -342,6 +348,11 @@
|
||||||
(name-symbol (if (stringp name) (intern name) name)))
|
(name-symbol (if (stringp name) (intern name) name)))
|
||||||
|
|
||||||
(unless (plist-get args :disabled)
|
(unless (plist-get args :disabled)
|
||||||
|
|
||||||
|
;; force this immediately -- one off cost!
|
||||||
|
(if (plist-get args :ensure)
|
||||||
|
(use-package-ensure-elpa name))
|
||||||
|
|
||||||
(if diminish-var
|
(if diminish-var
|
||||||
(setq config-body
|
(setq config-body
|
||||||
`(progn
|
`(progn
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue