aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorStefan Monnier2018-03-26 09:41:30 -0400
committerStefan Monnier2018-03-26 09:41:30 -0400
commit6dfdf0c9e8e4aca77b148db8d009c862389c64d3 (patch)
treea400cdf3efa473bbf0b39218fbce9bfa61d92aee /doc
parentb300052fb4ef1261519b0fd57f5eb186c2d10295 (diff)
downloademacs-6dfdf0c9e8e4aca77b148db8d009c862389c64d3.tar.gz
emacs-6dfdf0c9e8e4aca77b148db8d009c862389c64d3.zip
* lisp/emacs-lisp/package.el: New quickstart feature
(package--quickstart-pkgs): New var. (package-activate-1): Obey and fill it. (package-activate-all): New function. (package-initialize): Call it. Set package-initialized before activating the packages. (package-installed-p): Make it work before package.el is initialized in the case where min-version is not specified. (package-install, package-delete): Refresh the quickstart if applicable. (package-quickstart, package-quickstart-file): New vars. (package--quickstart-maybe-refresh, package-quickstart-refresh): New functions. * lisp/startup.el (command-line): Use package-activate-all rather than package-initialize. * doc/lispref/package.texi (Packaging Basics): * doc/emacs/package.texi (Package Installation): * doc/lispref/os.texi (Startup Summary): Refer to package-activate-all.
Diffstat (limited to 'doc')
-rw-r--r--doc/emacs/custom.texi21
-rw-r--r--doc/emacs/package.texi8
-rw-r--r--doc/lispref/os.texi6
-rw-r--r--doc/lispref/package.texi24
4 files changed, 31 insertions, 28 deletions
diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi
index a69888cdbd6..c3cfaabb8d3 100644
--- a/doc/emacs/custom.texi
+++ b/doc/emacs/custom.texi
@@ -2602,17 +2602,16 @@ Type @kbd{C-q}, followed by the key you want to bind, to insert @var{char}.
2602@cindex early init file 2602@cindex early init file
2603 2603
2604 Most customizations for Emacs can be put in the normal init file, 2604 Most customizations for Emacs can be put in the normal init file,
2605@file{.emacs} or @file{~/.emacs.d/init.el}. However, it is sometimes 2605@file{.emacs} or @file{~/.emacs.d/init.el}. However, it is sometimes desirable
2606desirable to have customizations that take effect during Emacs startup 2606to have customizations that take effect during Emacs startup earlier than the
2607earlier than the normal init file is processed. Such customizations 2607normal init file is processed. Such customizations can be put in the early
2608can be put in the early init file, @file{~/.emacs.d/early-init.el}. 2608init file, @file{~/.emacs.d/early-init.el}. This file is loaded before the
2609This file is loaded before the package system is initialized, so in it 2609package system and GUI is initialized, so in it you can customize variables
2610you can customize variables that affect the package initialization 2610that affect frame appearance as well as the package initialization process,
2611process, such as @code{package-enable-at-startup}, 2611such as @code{package-enable-at-startup}, @code{package-load-list}, and
2612@code{package-load-list}, and @code{package-user-dir}. Note that 2612@code{package-user-dir}. Note that variables like @code{package-archives}
2613variables like @code{package-archives} which only affect the 2613which only affect the installation of new packages, and not the process of
2614installation of new packages, and not the process of making 2614making already-installed packages available, may be customized in the regular
2615already-installed packages available, may be customized in the regular
2616init file. @xref{Package Installation}. 2615init file. @xref{Package Installation}.
2617 2616
2618 For more information on the early init file, @pxref{Init File,,, 2617 For more information on the early init file, @pxref{Init File,,,
diff --git a/doc/emacs/package.texi b/doc/emacs/package.texi
index be749348729..43f5a8497d9 100644
--- a/doc/emacs/package.texi
+++ b/doc/emacs/package.texi
@@ -263,13 +263,13 @@ startup, change the variable @code{package-enable-at-startup} to
263is read before loading the regular init file. Currently this variable 263is read before loading the regular init file. Currently this variable
264cannot be set via Customize. 264cannot be set via Customize.
265 265
266@findex package-initialize 266@findex package-activate-all
267 If you have set @code{package-enable-at-startup} to @code{nil}, you 267 If you have set @code{package-enable-at-startup} to @code{nil}, you
268can still make packages available either during or after startup. To 268can still make packages available either during or after startup. To
269make installed packages available during startup, call the function 269make installed packages available during startup, call the function
270@code{package-initialize} in your init file. To make installed 270@code{package-activate-all} in your init file. To make installed
271packages available after startup, invoke the command @kbd{M-x 271packages available after startup, invoke the command @kbd{M-:
272package-initialize}. 272(package-activate-all) RET}.
273 273
274@vindex package-load-list 274@vindex package-load-list
275 For finer control over which packages are made available at startup, 275 For finer control over which packages are made available at startup,
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi
index 0e30ad519a8..77ecb667f4f 100644
--- a/doc/lispref/os.texi
+++ b/doc/lispref/os.texi
@@ -103,12 +103,12 @@ was specified, Emacs looks for the init file in that user's home
103directory instead. 103directory instead.
104 104
105@item 105@item
106It calls the function @code{package-initialize} to activate any 106It calls the function @code{package-activate-all} to activate any
107optional Emacs Lisp package that has been installed. @xref{Packaging 107optional Emacs Lisp package that has been installed. @xref{Packaging
108Basics}. However, Emacs doesn't initialize packages when 108Basics}. However, Emacs doesn't activate the packages when
109@code{package-enable-at-startup} is @code{nil} or when it's started 109@code{package-enable-at-startup} is @code{nil} or when it's started
110with one of the options @samp{-q}, @samp{-Q}, or @samp{--batch}. To 110with one of the options @samp{-q}, @samp{-Q}, or @samp{--batch}. To
111initialize packages in the latter case, @code{package-initialize} 111activate the packages in the latter case, @code{package-activate-all}
112should be called explicitly (e.g., via the @samp{--funcall} option). 112should be called explicitly (e.g., via the @samp{--funcall} option).
113 113
114@vindex initial-window-system@r{, and startup} 114@vindex initial-window-system@r{, and startup}
diff --git a/doc/lispref/package.texi b/doc/lispref/package.texi
index 7e7a8cd9bc8..37c1ee6697d 100644
--- a/doc/lispref/package.texi
+++ b/doc/lispref/package.texi
@@ -105,16 +105,15 @@ adds the package's content directory to @code{load-path}, and
105evaluates the autoload definitions in @file{@var{name}-autoloads.el}. 105evaluates the autoload definitions in @file{@var{name}-autoloads.el}.
106 106
107 Whenever Emacs starts up, it automatically calls the function 107 Whenever Emacs starts up, it automatically calls the function
108@code{package-initialize} to make installed packages available to the 108@code{package-activate-all} to make installed packages available to the
109current session. This is done after loading the early init file, but 109current session. This is done after loading the early init file, but
110before loading the regular init file (@pxref{Startup Summary}). 110before loading the regular init file (@pxref{Startup Summary}).
111Packages are not automatically made available if the user option 111Packages are not automatically made available if the user option
112@code{package-enable-at-startup} is set to @code{nil} in the early 112@code{package-enable-at-startup} is set to @code{nil} in the early
113init file. 113init file.
114 114
115@deffn Command package-initialize &optional no-activate 115@defun package-activate-all
116This function initializes Emacs' internal record of which packages are 116This function makes the packages available to the current session.
117installed, and makes the packages available to the current session.
118The user option @code{package-load-list} specifies which packages to 117The user option @code{package-load-list} specifies which packages to
119make available; by default, all installed packages are made available. 118make available; by default, all installed packages are made available.
120If called during startup, this function also sets 119If called during startup, this function also sets
@@ -122,15 +121,20 @@ If called during startup, this function also sets
122evaluating package autoloads more than once. @xref{Package 121evaluating package autoloads more than once. @xref{Package
123Installation,,, emacs, The GNU Emacs Manual}. 122Installation,,, emacs, The GNU Emacs Manual}.
124 123
125The optional argument @var{no-activate}, if non-@code{nil}, causes 124In most cases, you should not need to call @code{package-activate-all},
126Emacs to update its record of installed packages without actually
127making them available; it is for internal use only.
128
129In most cases, you should not need to call @code{package-initialize},
130as this is done automatically during startup. Simply make sure to put 125as this is done automatically during startup. Simply make sure to put
131any code that should run before @code{package-initialize} in the early 126any code that should run before @code{package-activate-all} in the early
132init file, and any code that should run after it in the primary init 127init file, and any code that should run after it in the primary init
133file (@pxref{Init File,,, emacs, The GNU Emacs Manual}). 128file (@pxref{Init File,,, emacs, The GNU Emacs Manual}).
129@end defun
130
131@deffn Command package-initialize &optional no-activate
132This function initializes Emacs' internal record of which packages are
133installed, and then calls @code{package-activate-all}.
134
135The optional argument @var{no-activate}, if non-@code{nil}, causes
136Emacs to update its record of installed packages without actually
137making them available.
134@end deffn 138@end deffn
135 139
136@node Simple Packages 140@node Simple Packages