aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorJohn Wiegley2022-11-15 09:21:07 -0800
committerJohn Wiegley2022-11-15 09:21:07 -0800
commit49fffe7cf4beb7b35d90758f4e6c24ebfe3615e1 (patch)
tree3b7699e4ffab2312c14f697da11059409ba4b86c /doc
parentec96b4766418fdfce2d7827fa6ddeb7257ad6cf7 (diff)
parentcf8ab8b52eae65a108d899e896e1171355122bb7 (diff)
downloademacs-49fffe7cf4beb7b35d90758f4e6c24ebfe3615e1.tar.gz
emacs-49fffe7cf4beb7b35d90758f4e6c24ebfe3615e1.zip
Merge remote-tracking branch 'origin/master' into pr-830
Diffstat (limited to 'doc')
-rw-r--r--doc/misc/use-package.texi205
1 files changed, 91 insertions, 114 deletions
diff --git a/doc/misc/use-package.texi b/doc/misc/use-package.texi
index 2b868564372..a11416a470c 100644
--- a/doc/misc/use-package.texi
+++ b/doc/misc/use-package.texi
@@ -8,7 +8,7 @@
8 8
9@copying 9@copying
10@quotation 10@quotation
11Copyright (C) 2012-2022 John Wiegley <johnw@@newartisans.com> 11Copyright (C) 2012-2022 Free Software Foundation, Inc.
12 12
13You can redistribute this document and/or modify it under the terms 13You can redistribute this document and/or modify it under the terms
14of the GNU General Public License as published by the Free Software 14of the GNU General Public License as published by the Free Software
@@ -31,7 +31,7 @@ General Public License for more details.
31@finalout 31@finalout
32@titlepage 32@titlepage
33@title use-package User Manual 33@title use-package User Manual
34@subtitle for version 2.4.1-81-gb185c6b+1 34@subtitle for version 2.4.1-119-g0be480e+1
35@author John Wiegley 35@author John Wiegley
36@page 36@page
37@vskip 0pt plus 1filll 37@vskip 0pt plus 1filll
@@ -45,9 +45,9 @@ General Public License for more details.
45@top use-package User Manual 45@top use-package User Manual
46 46
47The @code{use-package} macro allows you to isolate package configuration in your 47The @code{use-package} macro allows you to isolate package configuration in your
48@code{.emacs} file in a way that is both performance-oriented and, well, tidy. I 48@code{.emacs} file in a way that is both performance-oriented and, well, tidy. I
49created it because I have over 80 packages that I use in Emacs, and things 49created it because I have over 80 packages that I use in Emacs, and things
50were getting difficult to manage. Yet with this utility my total load time is 50were getting difficult to manage. Yet with this utility my total load time is
51around 2 seconds, with no loss of functionality! 51around 2 seconds, with no loss of functionality!
52 52
53@insertcopying 53@insertcopying
@@ -67,33 +67,33 @@ around 2 seconds, with no loss of functionality!
67 67
68Installation 68Installation
69 69
70* Installing from an Elpa Archive:: 70* Installing from GNU ELPA::
71* Installing from the Git Repository:: 71* Installing from the Git Repository::
72* Post-Installation Tasks:: 72* Post-Installation Tasks::
73 73
74Keywords 74Keywords
75 75
76* @code{after}:: 76* @code{after}:: @code{:after}.
77* @code{bind-keymap}, @code{bind-keymap*}: @code{bind-keymap} @code{bind-keymap*}. 77* @code{bind-keymap} @code{bind-keymap*}:: @code{:bind-keymap}, @code{:bind-keymap*}.
78* @code{bind}, @code{bind*}: @code{bind} @code{bind*}. 78* @code{bind} @code{bind*}:: @code{:bind}, @code{:bind*}.
79* @code{commands}:: 79* @code{commands}:: @code{:commands}.
80* @code{preface}, @code{init}, @code{config}: @code{preface} @code{init} @code{config}. 80* @code{preface} @code{init} @code{config}:: @code{:preface}, @code{:init}, @code{:config}.
81* @code{custom}:: 81* @code{custom}:: @code{:custom}.
82* @code{custom-face}:: 82* @code{custom-face}:: @code{:custom-face}.
83* @code{defer}, @code{demand}: @code{defer} @code{demand}. 83* @code{defer} @code{demand}:: @code{:defer}, @code{:demand}.
84* @code{defines}, @code{functions}: @code{defines} @code{functions}. 84* @code{defines} @code{functions}:: @code{:defines}, @code{:functions}.
85* @code{diminish}, @code{delight}: @code{diminish} @code{delight}. 85* @code{diminish} @code{delight}:: @code{:diminish}, @code{:delight}.
86* @code{disabled}:: 86* @code{disabled}:: @code{:disabled}.
87* @code{ensure}, @code{pin}: @code{ensure} @code{pin}. 87* @code{ensure} @code{pin}:: @code{:ensure}, @code{:pin}.
88* @code{hook}:: 88* @code{hook}:: @code{:hook}.
89* @code{if}, @code{when}, @code{unless}: @code{if} @code{when} @code{unless}. 89* @code{if} @code{when} @code{unless}:: @code{:if}, @code{:when}, @code{:unless}.
90* @code{load-path}:: 90* @code{load-path}:: @code{:load-path}.
91* @code{mode}, @code{interpreter}: @code{mode} @code{interpreter}. 91* @code{mode} @code{interpreter}:: @code{:mode}, @code{:interpreter}.
92* @code{magic}, @code{magic-fallback}: @code{magic} @code{magic-fallback}. 92* @code{magic} @code{magic-fallback}:: @code{:magic}, @code{:magic-fallback}.
93* @code{no-require}:: 93* @code{no-require}:: @code{:no-require}.
94* @code{requires}:: 94* @code{requires}:: @code{:requires}.
95 95
96@code{:bind}, @code{:bind*} 96@code{bind}, @code{bind*}
97 97
98* Binding to local keymaps:: 98* Binding to local keymaps::
99 99
@@ -105,9 +105,9 @@ Keywords
105@chapter Introduction 105@chapter Introduction
106 106
107The @code{use-package} macro allows you to isolate package configuration in your 107The @code{use-package} macro allows you to isolate package configuration in your
108@code{.emacs} file in a way that is both performance-oriented and, well, tidy. I 108@code{.emacs} file in a way that is both performance-oriented and, well, tidy. I
109created it because I have over 80 packages that I use in Emacs, and things 109created it because I have over 80 packages that I use in Emacs, and things
110were getting difficult to manage. Yet with this utility my total load time is 110were getting difficult to manage. Yet with this utility my total load time is
111around 2 seconds, with no loss of functionality! 111around 2 seconds, with no loss of functionality!
112 112
113More text to come@dots{} 113More text to come@dots{}
@@ -119,50 +119,27 @@ use-package can be installed using Emacs' package manager or manually from
119its development repository. 119its development repository.
120 120
121@menu 121@menu
122* Installing from an Elpa Archive:: 122* Installing from GNU ELPA::
123* Installing from the Git Repository:: 123* Installing from the Git Repository::
124* Post-Installation Tasks:: 124* Post-Installation Tasks::
125@end menu 125@end menu
126 126
127@node Installing from an Elpa Archive 127@node Installing from GNU ELPA
128@section Installing from an Elpa Archive 128@section Installing from GNU ELPA
129 129
130use-package is available from Melpa and Melpa-Stable. If you haven't used 130use-package is available from GNU ELPA. If you haven't used
131Emacs' package manager before, then it is high time you familiarize yourself 131Emacs' package manager before, then it is high time you familiarize yourself
132with it by reading the documentation in the Emacs manual, see 132with it by reading the documentation in the Emacs manual, see
133@ref{Packages,,,emacs,}. Then add one of the archives to @code{package-archives}: 133@ref{Packages,,,emacs,}. Then add one of the archives to @code{package-archives}:
134 134
135@itemize 135First, you need to update the local package list using:
136@item
137To use Melpa:
138@end itemize
139
140@lisp
141(require 'package)
142(add-to-list 'package-archives
143 '("melpa" . "https://melpa.org/packages/") t)
144@end lisp
145
146@itemize
147@item
148To use Melpa-Stable:
149@end itemize
150
151@lisp
152(require 'package)
153(add-to-list 'package-archives
154 '("melpa-stable" . "https://stable.melpa.org/packages/") t)
155@end lisp
156
157Once you have added your preferred archive, you need to update the
158local package list using:
159 136
160@example 137@example
161M-x package-refresh-contents RET 138M-x package-refresh-contents RET
162@end example 139@end example
163 140
164Once you have done that, you can install use-package and its dependencies 141Once you have done that, you can install use-package and its
165using: 142dependencies using:
166 143
167@example 144@example
168M-x package-install RET use-package RET 145M-x package-install RET use-package RET
@@ -229,7 +206,7 @@ Now see @ref{Post-Installation Tasks}.
229@section Post-Installation Tasks 206@section Post-Installation Tasks
230 207
231After installing use-package you should verify that you are indeed using the 208After installing use-package you should verify that you are indeed using the
232use-package release you think you are using. It's best to restart Emacs before 209use-package release you think you are using. It's best to restart Emacs before
233doing so, to make sure you are not using an outdated value for @code{load-path}. 210doing so, to make sure you are not using an outdated value for @code{load-path}.
234 211
235@example 212@example
@@ -239,7 +216,7 @@ C-h v use-package-version RET
239should display something like 216should display something like
240 217
241@example 218@example
242use-package-version’s value is "2.4.1" 219use-package-version’s value is "2.4.3"
243@end example 220@end example
244 221
245If you are completely new to use-package then see @ref{Getting Started}. 222If you are completely new to use-package then see @ref{Getting Started}.
@@ -249,13 +226,13 @@ If you run into problems, then please see the @ref{Debugging Tools}.
249@node Getting Started 226@node Getting Started
250@chapter Getting Started 227@chapter Getting Started
251 228
252TODO@. For now, see @code{README.md}. 229TODO@. For now, see @code{README.md}.
253 230
254@node Basic Concepts 231@node Basic Concepts
255@chapter Basic Concepts 232@chapter Basic Concepts
256 233
257@code{use-package} was created for few basic reasons, each of which drove the 234@code{use-package} was created for few basic reasons, each of which drove the
258design in various ways. Understanding these reasons may help make some of 235design in various ways. Understanding these reasons may help make some of
259those decisions clearer: 236those decisions clearer:
260 237
261@itemize 238@itemize
@@ -279,7 +256,7 @@ close to a functional Emacs as possible.
279 256
280@item 257@item
281To allow byte-compilation of one's init file so that any warnings or 258To allow byte-compilation of one's init file so that any warnings or
282errors seen are meaningful. In this way, even if byte-compilation is not 259errors seen are meaningful. In this way, even if byte-compilation is not
283used for speed (reason 3), it can still be used as a sanity check. 260used for speed (reason 3), it can still be used as a sanity check.
284@end itemize 261@end itemize
285 262
@@ -290,25 +267,25 @@ used for speed (reason 3), it can still be used as a sanity check.
290@chapter Keywords 267@chapter Keywords
291 268
292@menu 269@menu
293* @code{after}:: 270* @code{after}:: @code{after}.
294* @code{bind-keymap}, @code{bind-keymap*}: @code{bind-keymap} @code{bind-keymap*}. 271* @code{bind-keymap} @code{bind-keymap*}:: @code{:bind-keymap}, @code{:bind-keymap*}.
295* @code{bind}, @code{bind*}: @code{bind} @code{bind*}. 272* @code{bind} @code{bind*}:: @code{bind} @code{:bind*}.
296* @code{commands}:: 273* @code{commands}:: @code{:commands}.
297* @code{preface}, @code{init}, @code{config}: @code{preface} @code{init} @code{config}. 274* @code{preface} @code{init} @code{config}:: @code{:preface}, @code{:init}, @code{:config}.
298* @code{custom}:: 275* @code{custom}:: @code{:custom}.
299* @code{custom-face}:: 276* @code{custom-face}:: @code{:custom-face}.
300* @code{defer}, @code{demand}: @code{defer} @code{demand}. 277* @code{defer} @code{demand}:: @code{:defer}, @code{:demand}.
301* @code{defines}, @code{functions}: @code{defines} @code{functions}. 278* @code{defines} @code{functions}:: @code{:defines}, @code{:functions}.
302* @code{diminish}, @code{delight}: @code{diminish} @code{delight}. 279* @code{diminish} @code{delight}:: @code{:diminish}, @code{:delight}.
303* @code{disabled}:: 280* @code{disabled}:: @code{:disabled}.
304* @code{ensure}, @code{pin}: @code{ensure} @code{pin}. 281* @code{ensure} @code{pin}:: @code{:ensure}, @code{:pin}.
305* @code{hook}:: 282* @code{hook}:: @code{:hook}.
306* @code{if}, @code{when}, @code{unless}: @code{if} @code{when} @code{unless}. 283* @code{if} @code{when} @code{unless}:: @code{:if}, @code{:when}, @code{:unless}.
307* @code{load-path}:: 284* @code{load-path}:: @code{:load-path}.
308* @code{mode}, @code{interpreter}: @code{mode} @code{interpreter}. 285* @code{mode} @code{interpreter}:: @code{:mode}, @code{:interpreter}.
309* @code{magic}, @code{magic-fallback}: @code{magic} @code{magic-fallback}. 286* @code{magic} @code{magic-fallback}:: @code{:magic}, @code{:magic-fallback}.
310* @code{no-require}:: 287* @code{no-require}:: @code{:no-require}.
311* @code{requires}:: 288* @code{requires}:: @code{:requires}.
312@end menu 289@end menu
313 290
314@node @code{after} 291@node @code{after}
@@ -316,8 +293,8 @@ used for speed (reason 3), it can still be used as a sanity check.
316 293
317Sometimes it only makes sense to configure a package after another has been 294Sometimes it only makes sense to configure a package after another has been
318loaded, because certain variables or functions are not in scope until that 295loaded, because certain variables or functions are not in scope until that
319time. This can achieved using an @code{:after} keyword that allows a fairly rich 296time. This can achieved using an @code{:after} keyword that allows a fairly rich
320description of the exact conditions when loading should occur. Here is an 297description of the exact conditions when loading should occur. Here is an
321example: 298example:
322 299
323@lisp 300@lisp
@@ -332,13 +309,13 @@ example:
332@end lisp 309@end lisp
333 310
334In this case, because all of these packages are demand-loaded in the order 311In this case, because all of these packages are demand-loaded in the order
335they occur, the use of @code{:after} is not strictly necessary. By using it, 312they occur, the use of @code{:after} is not strictly necessary. By using it,
336however, the above code becomes order-independent, without an implicit 313however, the above code becomes order-independent, without an implicit
337depedence on the nature of your init file. 314depedence on the nature of your init file.
338 315
339By default, @code{:after (foo bar)} is the same as @code{:after (:all foo bar)}, meaning 316By default, @code{:after (foo bar)} is the same as @code{:after (:all foo bar)}, meaning
340that loading of the given package will not happen until both @code{foo} and @code{bar} 317that loading of the given package will not happen until both @code{foo} and @code{bar}
341have been loaded. Here are some of the other possibilities: 318have been loaded. Here are some of the other possibilities:
342 319
343@lisp 320@lisp
344:after (foo bar) 321:after (foo bar)
@@ -354,7 +331,7 @@ been loaded, or both @code{baz} and @code{quux} have been loaded.
354 331
355@strong{NOTE}: Pay attention if you set @code{use-package-always-defer} to t, and also use 332@strong{NOTE}: Pay attention if you set @code{use-package-always-defer} to t, and also use
356the @code{:after} keyword, as you will need to specify how the declared package is 333the @code{:after} keyword, as you will need to specify how the declared package is
357to be loaded: e.g., by some @code{:bind}. If you're not using one of the mechanisms 334to be loaded: e.g., by some @code{:bind}. If you're not using one of the mechanisms
358that registers autoloads, such as @code{:bind} or @code{:hook}, and your package manager 335that registers autoloads, such as @code{:bind} or @code{:hook}, and your package manager
359does not provide autoloads, it's possible that without adding @code{:demand t} to 336does not provide autoloads, it's possible that without adding @code{:demand t} to
360those declarations, your package will never be loaded. 337those declarations, your package will never be loaded.
@@ -363,14 +340,14 @@ those declarations, your package will never be loaded.
363@section @code{:bind-keymap}, @code{:bind-keymap*} 340@section @code{:bind-keymap}, @code{:bind-keymap*}
364 341
365Normally @code{:bind} expects that commands are functions that will be autoloaded 342Normally @code{:bind} expects that commands are functions that will be autoloaded
366from the given package. However, this does not work if one of those commands 343from the given package. However, this does not work if one of those commands
367is actually a keymap, since keymaps are not functions, and cannot be 344is actually a keymap, since keymaps are not functions, and cannot be
368autoloaded using Emacs' @code{autoload} mechanism. 345autoloaded using Emacs' @code{autoload} mechanism.
369 346
370To handle this case, @code{use-package} offers a special, limited variant of 347To handle this case, @code{use-package} offers a special, limited variant of
371@code{:bind} called @code{:bind-keymap}. The only difference is that the "commands" 348@code{:bind} called @code{:bind-keymap}. The only difference is that the "commands"
372bound to by @code{:bind-keymap} must be keymaps defined in the package, rather than 349bound to by @code{:bind-keymap} must be keymaps defined in the package, rather than
373command functions. This is handled behind the scenes by generating custom code 350command functions. This is handled behind the scenes by generating custom code
374that loads the package containing the keymap, and then re-executes your 351that loads the package containing the keymap, and then re-executes your
375keypress after the first load, to reinterpret that keypress as a prefix key. 352keypress after the first load, to reinterpret that keypress as a prefix key.
376 353
@@ -409,7 +386,7 @@ A more literal way to do the exact same thing is:
409@end lisp 386@end lisp
410 387
411When you use the @code{:commands} keyword, it creates autoloads for those commands 388When you use the @code{:commands} keyword, it creates autoloads for those commands
412and defers loading of the module until they are used. Since the @code{:init} form 389and defers loading of the module until they are used. Since the @code{:init} form
413is always run---even if @code{ace-jump-mode} might not be on your system---remember 390is always run---even if @code{ace-jump-mode} might not be on your system---remember
414to restrict @code{:init} code to only what would succeed either way. 391to restrict @code{:init} code to only what would succeed either way.
415 392
@@ -425,7 +402,7 @@ The @code{:bind} keyword takes either a cons or a list of conses:
425The @code{:commands} keyword likewise takes either a symbol or a list of symbols. 402The @code{:commands} keyword likewise takes either a symbol or a list of symbols.
426 403
427NOTE: Special keys like @code{tab} or @code{F1}-@code{Fn} can be written in square brackets, 404NOTE: Special keys like @code{tab} or @code{F1}-@code{Fn} can be written in square brackets,
428i.e. @code{[tab]} instead of @code{"tab"}. The syntax for the keybindings is similar to 405i.e. @code{[tab]} instead of @code{"tab"}. The syntax for the keybindings is similar to
429the "kbd" syntax: see @uref{https://www.gnu.org/software/emacs/manual/html_node/emacs/Init-Rebinding.html, the Emacs Manual} for more information. 406the "kbd" syntax: see @uref{https://www.gnu.org/software/emacs/manual/html_node/emacs/Init-Rebinding.html, the Emacs Manual} for more information.
430 407
431Examples: 408Examples:
@@ -459,7 +436,7 @@ The effect of this statement is to wait until @code{helm} has loaded, and then t
459bind the key @code{C-c h} to @code{helm-execute-persistent-action} within Helm's local 436bind the key @code{C-c h} to @code{helm-execute-persistent-action} within Helm's local
460keymap, @code{helm-mode-map}. 437keymap, @code{helm-mode-map}.
461 438
462Multiple uses of @code{:map} may be specified. Any binding occurring before the 439Multiple uses of @code{:map} may be specified. Any binding occurring before the
463first use of @code{:map} are applied to the global keymap: 440first use of @code{:map} are applied to the global keymap:
464 441
465@lisp 442@lisp
@@ -493,7 +470,7 @@ Here is the simplest @code{use-package} declaration:
493@end lisp 470@end lisp
494 471
495This loads in the package @code{foo}, but only if @code{foo} is available on your 472This loads in the package @code{foo}, but only if @code{foo} is available on your
496system. If not, a warning is logged to the @code{*Messages*} buffer. If it 473system. If not, a warning is logged to the @code{*Messages*} buffer. If it
497succeeds, a message about @code{"Loading foo"} is logged, along with the time it 474succeeds, a message about @code{"Loading foo"} is logged, along with the time it
498took to load, if it took over 0.1 seconds. 475took to load, if it took over 0.1 seconds.
499 476
@@ -567,14 +544,14 @@ The @code{:custom-face} keyword allows customization of package custom faces.
567@node @code{defer} @code{demand} 544@node @code{defer} @code{demand}
568@section @code{:defer}, @code{:demand} 545@section @code{:defer}, @code{:demand}
569 546
570In almost all cases you don't need to manually specify @code{:defer t}. This is 547In almost all cases you don't need to manually specify @code{:defer t}. This is
571implied whenever @code{:bind} or @code{:mode} or @code{:interpreter} is used. Typically, you 548implied whenever @code{:bind} or @code{:mode} or @code{:interpreter} is used. Typically, you
572only need to specify @code{:defer} if you know for a fact that some other package 549only need to specify @code{:defer} if you know for a fact that some other package
573will do something to cause your package to load at the appropriate time, and 550will do something to cause your package to load at the appropriate time, and
574thus you would like to defer loading even though use-package isn't creating 551thus you would like to defer loading even though use-package isn't creating
575any autoloads for you. 552any autoloads for you.
576 553
577You can override package deferral with the @code{:demand} keyword. Thus, even if 554You can override package deferral with the @code{:demand} keyword. Thus, even if
578you use @code{:bind}, using @code{:demand} will force loading to occur immediately and 555you use @code{:bind}, using @code{:demand} will force loading to occur immediately and
579not establish an autoload for the bound key. 556not establish an autoload for the bound key.
580 557
@@ -616,7 +593,7 @@ If you need to silence a missing function warning, you can use @code{:functions}
616@section @code{:diminish}, @code{:delight} 593@section @code{:diminish}, @code{:delight}
617 594
618@code{use-package} also provides built-in support for the diminish and delight 595@code{use-package} also provides built-in support for the diminish and delight
619utilities---if you have them installed. Their purpose is to remove or change 596utilities---if you have them installed. Their purpose is to remove or change
620minor mode strings in your mode-line. 597minor mode strings in your mode-line.
621 598
622@uref{https://github.com/myrjola/diminish.el, diminish} is invoked with the @code{:diminish} keyword, which is passed either a 599@uref{https://github.com/myrjola/diminish.el, diminish} is invoked with the @code{:diminish} keyword, which is passed either a
@@ -635,7 +612,7 @@ package name with "-mode" appended at the end:
635@uref{https://elpa.gnu.org/packages/delight.html, delight} is invoked with the @code{:delight} keyword, which is passed a minor mode 612@uref{https://elpa.gnu.org/packages/delight.html, delight} is invoked with the @code{:delight} keyword, which is passed a minor mode
636symbol, a replacement string or quoted @uref{https://www.gnu.org/software/emacs/manual/html_node/elisp/Mode-Line-Data.html, mode-line data} (in which case the minor 613symbol, a replacement string or quoted @uref{https://www.gnu.org/software/emacs/manual/html_node/elisp/Mode-Line-Data.html, mode-line data} (in which case the minor
637mode symbol is guessed to be the package name with "-mode" appended at the 614mode symbol is guessed to be the package name with "-mode" appended at the
638end), both of these, or several lists of both. If no arguments are provided, 615end), both of these, or several lists of both. If no arguments are provided,
639the default mode name is hidden completely. 616the default mode name is hidden completely.
640 617
641@lisp 618@lisp
@@ -677,7 +654,7 @@ from the output entirely, to accelerate startup times.
677@node @code{ensure} @code{pin} 654@node @code{ensure} @code{pin}
678@section @code{:ensure}, @code{:pin} 655@section @code{:ensure}, @code{:pin}
679 656
680You can use @code{use-package} to load packages from ELPA with @code{package.el}. This 657You can use @code{use-package} to load packages from ELPA with @code{package.el}. This
681is particularly useful if you share your @code{.emacs} among several machines; the 658is particularly useful if you share your @code{.emacs} among several machines; the
682relevant packages are downloaded automatically once declared in your @code{.emacs}. 659relevant packages are downloaded automatically once declared in your @code{.emacs}.
683The @code{:ensure} keyword causes the package(s) to be installed automatically if 660The @code{:ensure} keyword causes the package(s) to be installed automatically if
@@ -707,7 +684,7 @@ archives is also a valid use-case.
707By default @code{package.el} prefers @code{melpa} over @code{melpa-stable} due to the 684By default @code{package.el} prefers @code{melpa} over @code{melpa-stable} due to the
708versioning @code{(> evil-20141208.623 evil-1.0.9)}, so even if you are tracking 685versioning @code{(> evil-20141208.623 evil-1.0.9)}, so even if you are tracking
709only a single package from @code{melpa}, you will need to tag all the non-@code{melpa} 686only a single package from @code{melpa}, you will need to tag all the non-@code{melpa}
710packages with the appropriate archive. If this really annoys you, then you can 687packages with the appropriate archive. If this really annoys you, then you can
711set @code{use-package-always-pin} to set a default. 688set @code{use-package-always-pin} to set a default.
712 689
713If you want to manually keep a package updated and ignore upstream updates, 690If you want to manually keep a package updated and ignore upstream updates,
@@ -752,7 +729,7 @@ Example:
752@section @code{:hook} 729@section @code{:hook}
753 730
754The @code{:hook} keyword allows adding functions onto hooks, here only the basename 731The @code{:hook} keyword allows adding functions onto hooks, here only the basename
755of the hook is required. Thus, all of the following are equivalent: 732of the hook is required. Thus, all of the following are equivalent:
756 733
757@lisp 734@lisp
758(use-package ace-jump-mode 735(use-package ace-jump-mode
@@ -827,8 +804,8 @@ the same thing as @code{:if (not foo)}.
827@section @code{:load-path} 804@section @code{:load-path}
828 805
829If your package needs a directory added to the @code{load-path} in order to load, 806If your package needs a directory added to the @code{load-path} in order to load,
830use @code{:load-path}. This takes a symbol, a function, a string or a list of 807use @code{:load-path}. This takes a symbol, a function, a string or a list of
831strings. If the path is relative, it is expanded within 808strings. If the path is relative, it is expanded within
832@code{user-emacs-directory}: 809@code{user-emacs-directory}:
833 810
834@lisp 811@lisp
@@ -839,8 +816,8 @@ strings. If the path is relative, it is expanded within
839 816
840Note that when using a symbol or a function to provide a dynamically generated 817Note that when using a symbol or a function to provide a dynamically generated
841list of paths, you must inform the byte-compiler of this definition so the 818list of paths, you must inform the byte-compiler of this definition so the
842value is available at byte-compilation time. This is done by using the special 819value is available at byte-compilation time. This is done by using the special
843form @code{eval-and-compile} (as opposed to @code{eval-when-compile}). Further, this 820form @code{eval-and-compile} (as opposed to @code{eval-when-compile}). Further, this
844value is fixed at whatever was determined during compilation, to avoid looking 821value is fixed at whatever was determined during compilation, to avoid looking
845up the same information again on each startup: 822up the same information again on each startup:
846 823
@@ -859,7 +836,7 @@ up the same information again on each startup:
859 836
860Similar to @code{:bind}, you can use @code{:mode} and @code{:interpreter} to establish a 837Similar to @code{:bind}, you can use @code{:mode} and @code{:interpreter} to establish a
861deferred binding within the @code{auto-mode-alist} and @code{interpreter-mode-alist} 838deferred binding within the @code{auto-mode-alist} and @code{interpreter-mode-alist}
862variables. The specifier to either keyword can be a cons cell, a list of cons 839variables. The specifier to either keyword can be a cons cell, a list of cons
863cells, or a string or regexp: 840cells, or a string or regexp:
864 841
865@lisp 842@lisp
@@ -898,8 +875,8 @@ This does exactly the same thing as the following:
898 875
899Similar to @code{:mode} and @code{:interpreter}, you can also use @code{:magic} and 876Similar to @code{:mode} and @code{:interpreter}, you can also use @code{:magic} and
900@code{:magic-fallback} to cause certain function to be run if the beginning of a 877@code{:magic-fallback} to cause certain function to be run if the beginning of a
901file matches a given regular expression. The difference between the two is 878file matches a given regular expression. The difference between the two is
902that @code{:magic-fallback} has a lower priority than @code{:mode}. For example: 879that @code{:magic-fallback} has a lower priority than @code{:mode}. For example:
903 880
904@lisp 881@lisp
905(use-package pdf-tools 882(use-package pdf-tools
@@ -918,9 +895,9 @@ string @code{"%PDF"}.
918 895
919Normally, @code{use-package} will load each package at compile time before 896Normally, @code{use-package} will load each package at compile time before
920compiling the configuration, to ensure that any necessary symbols are in scope 897compiling the configuration, to ensure that any necessary symbols are in scope
921to satisfy the byte-compiler. At times this can cause problems, since a 898to satisfy the byte-compiler. At times this can cause problems, since a
922package may have special loading requirements, and all that you want to use 899package may have special loading requirements, and all that you want to use
923@code{use-package} for is to add a configuration to the @code{eval-after-load} hook. In 900@code{use-package} for is to add a configuration to the @code{eval-after-load} hook. In
924such cases, use the @code{:no-require} keyword: 901such cases, use the @code{:no-require} keyword:
925 902
926@lisp 903@lisp
@@ -936,8 +913,8 @@ such cases, use the @code{:no-require} keyword:
936While the @code{:after} keyword delays loading until the dependencies are loaded, 913While the @code{:after} keyword delays loading until the dependencies are loaded,
937the somewhat simpler @code{:requires} keyword simply never loads the package if the 914the somewhat simpler @code{:requires} keyword simply never loads the package if the
938dependencies are not available at the time the @code{use-package} declaration is 915dependencies are not available at the time the @code{use-package} declaration is
939encountered. By "available" in this context it means that @code{foo} is available 916encountered. By "available" in this context it means that @code{foo} is available
940of @code{(featurep 'foo)} evaluates to a non-nil value. For example: 917of @code{(featurep 'foo)} evaluates to a non-nil value. For example:
941 918
942@lisp 919@lisp
943(use-package abbrev 920(use-package abbrev