diff options
author | John Wiegley <johnw@newartisans.com> | 2015-03-15 02:22:17 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2015-03-15 02:22:17 -0500 |
commit | f637380fed23637dca2fe3bfe75cd629c2b0d0b9 (patch) | |
tree | 72be98d2816dd946f577cd7f5f0bf6332b674524 /lisp/use-package/use-package.el | |
parent | b4a00d2eb56abf89dc076dc92d9f14cca6972fd1 (diff) | |
download | emacs-f637380fed23637dca2fe3bfe75cd629c2b0d0b9.tar.gz emacs-f637380fed23637dca2fe3bfe75cd629c2b0d0b9.tar.bz2 emacs-f637380fed23637dca2fe3bfe75cd629c2b0d0b9.zip |
Add :preface, occurring before everything except :disabled
This can be used to establish function and variable definitions that
will 1) make the byte-compiler happy (it won't complain about functions
whose definitions are unknown because you have them within a guard
block), and 2) allow you to define code that can be used in an `:if`
test.
Diffstat (limited to 'lisp/use-package/use-package.el')
-rw-r--r-- | lisp/use-package/use-package.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/use-package/use-package.el b/lisp/use-package/use-package.el index b3bf871576f..56c8a4c2e6d 100644 --- a/lisp/use-package/use-package.el +++ b/lisp/use-package/use-package.el @@ -259,7 +259,7 @@ then the expanded macros do their job silently." (use-package-as-one (symbol-name head) args (apply-partially #'use-package-normalize-diminish name-symbol))) - ((or :init :config :idle) + ((or :preface :init :config :idle) (use-package-normalize-form (symbol-name head) args)) (:idle-priority @@ -363,6 +363,8 @@ then the expanded macros do their job silently." ;; Return the main body of the macro (use-package-cat-maybes + (list (plist-get args :preface)) + ;; Setup the load-path (mapcar #'(lambda (path) `(add-to-list 'load-path ,path)) (plist-get args :load-path)) |