From abc0ebc92dc1cf9ef9adfe133d0b30bf7382b65c Mon Sep 17 00:00:00 2001 From: Phillip Lord Date: Thu, 17 Jan 2013 21:22:57 +0000 Subject: [PATCH 1/3] Documentation for the use-package macro --- lisp/use-package/use-package.el | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/lisp/use-package/use-package.el b/lisp/use-package/use-package.el index 3dce341e9da..43466d7c666 100644 --- a/lisp/use-package/use-package.el +++ b/lisp/use-package/use-package.el @@ -321,6 +321,28 @@ (defmacro use-package (name &rest args) +"Use a package with configuration options. + +For full documentation. please see commentary. + + (use-package package-name + :keyword option) + +:init Code to run when `use-package' form evals. +:bind Perform key bindings, and define autoload for bound + commands. +:commands Define autoloads for given commands. +:mode Form to be added to `auto-mode-alist'. +:interpreter Form to be added to `auto-interpreter-alist'. +:defer Defer loading of package -- automatic + if :commands, :bind, :mode or :interpreter are used. +:config Runs if and when package loads. +:if Conditional loading. +:disabled Ignore everything. +:defines Define vars to silence byte-compiler. +:load-path Add to `load-path' before loading. +:diminish Support for diminish package (if it's installed). +" (let* ((commands (plist-get args :commands)) (pre-init-body (plist-get args :pre-init)) (init-body (plist-get args :init)) @@ -350,8 +372,13 @@ (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 From b8406ce9f00e792ae3a93abddf4d17b678410e88 Mon Sep 17 00:00:00 2001 From: Phillip Lord Date: Thu, 17 Jan 2013 21:55:53 +0000 Subject: [PATCH 2/3] Reverting "Documentation for the use-package macro." Revert "Documentation for the use-package macro." This reverts commit abc0ebc92dc1cf9ef9adfe133d0b30bf7382b65c. --- lisp/use-package/use-package.el | 31 ++----------------------------- 1 file changed, 2 insertions(+), 29 deletions(-) diff --git a/lisp/use-package/use-package.el b/lisp/use-package/use-package.el index 43466d7c666..3dce341e9da 100644 --- a/lisp/use-package/use-package.el +++ b/lisp/use-package/use-package.el @@ -321,28 +321,6 @@ (defmacro use-package (name &rest args) -"Use a package with configuration options. - -For full documentation. please see commentary. - - (use-package package-name - :keyword option) - -:init Code to run when `use-package' form evals. -:bind Perform key bindings, and define autoload for bound - commands. -:commands Define autoloads for given commands. -:mode Form to be added to `auto-mode-alist'. -:interpreter Form to be added to `auto-interpreter-alist'. -:defer Defer loading of package -- automatic - if :commands, :bind, :mode or :interpreter are used. -:config Runs if and when package loads. -:if Conditional loading. -:disabled Ignore everything. -:defines Define vars to silence byte-compiler. -:load-path Add to `load-path' before loading. -:diminish Support for diminish package (if it's installed). -" (let* ((commands (plist-get args :commands)) (pre-init-body (plist-get args :pre-init)) (init-body (plist-get args :init)) @@ -372,13 +350,8 @@ For full documentation. please see commentary. (unless (plist-get args :disabled) ;; force this immediately -- one off cost! - (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 (plist-get args :ensure) + (use-package-ensure-elpa name)) (if diminish-var (setq config-body From 8d72a6c1d68caf95e94d72f5d465e7ea33050e77 Mon Sep 17 00:00:00 2001 From: Phillip Lord Date: Thu, 17 Jan 2013 21:57:39 +0000 Subject: [PATCH 3/3] Documentation for the use-package macro --- lisp/use-package/use-package.el | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/lisp/use-package/use-package.el b/lisp/use-package/use-package.el index 3dce341e9da..63223a3a26a 100644 --- a/lisp/use-package/use-package.el +++ b/lisp/use-package/use-package.el @@ -321,6 +321,28 @@ (defmacro use-package (name &rest args) +"Use a package with configuration options. + +For full documentation. please see commentary. + + (use-package package-name + :keyword option) + +:init Code to run when `use-package' form evals. +:bind Perform key bindings, and define autoload for bound + commands. +:commands Define autoloads for given commands. +:mode Form to be added to `auto-mode-alist'. +:interpreter Form to be added to `auto-interpreter-alist'. +:defer Defer loading of package -- automatic + if :commands, :bind, :mode or :interpreter are used. +:config Runs if and when package loads. +:if Conditional loading. +:disabled Ignore everything. +:defines Define vars to silence byte-compiler. +:load-path Add to `load-path' before loading. +:diminish Support for diminish package (if it's installed). +" (let* ((commands (plist-get args :commands)) (pre-init-body (plist-get args :pre-init)) (init-body (plist-get args :init))