aboutsummaryrefslogtreecommitdiffstats
path: root/doc/lispref
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/lispref
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/lispref')
-rw-r--r--doc/lispref/os.texi6
-rw-r--r--doc/lispref/package.texi24
2 files changed, 17 insertions, 13 deletions
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