diff options
| author | Stefan Monnier | 2018-03-26 09:41:30 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2018-03-26 09:41:30 -0400 |
| commit | 6dfdf0c9e8e4aca77b148db8d009c862389c64d3 (patch) | |
| tree | a400cdf3efa473bbf0b39218fbce9bfa61d92aee /doc | |
| parent | b300052fb4ef1261519b0fd57f5eb186c2d10295 (diff) | |
| download | emacs-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.texi | 21 | ||||
| -rw-r--r-- | doc/emacs/package.texi | 8 | ||||
| -rw-r--r-- | doc/lispref/os.texi | 6 | ||||
| -rw-r--r-- | doc/lispref/package.texi | 24 |
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 |
| 2606 | desirable to have customizations that take effect during Emacs startup | 2606 | to have customizations that take effect during Emacs startup earlier than the |
| 2607 | earlier than the normal init file is processed. Such customizations | 2607 | normal init file is processed. Such customizations can be put in the early |
| 2608 | can be put in the early init file, @file{~/.emacs.d/early-init.el}. | 2608 | init file, @file{~/.emacs.d/early-init.el}. This file is loaded before the |
| 2609 | This file is loaded before the package system is initialized, so in it | 2609 | package system and GUI is initialized, so in it you can customize variables |
| 2610 | you can customize variables that affect the package initialization | 2610 | that affect frame appearance as well as the package initialization process, |
| 2611 | process, such as @code{package-enable-at-startup}, | 2611 | such 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} |
| 2613 | variables like @code{package-archives} which only affect the | 2613 | which only affect the installation of new packages, and not the process of |
| 2614 | installation of new packages, and not the process of making | 2614 | making already-installed packages available, may be customized in the regular |
| 2615 | already-installed packages available, may be customized in the regular | ||
| 2616 | init file. @xref{Package Installation}. | 2615 | init 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 | |||
| 263 | is read before loading the regular init file. Currently this variable | 263 | is read before loading the regular init file. Currently this variable |
| 264 | cannot be set via Customize. | 264 | cannot 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 |
| 268 | can still make packages available either during or after startup. To | 268 | can still make packages available either during or after startup. To |
| 269 | make installed packages available during startup, call the function | 269 | make 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 |
| 271 | packages available after startup, invoke the command @kbd{M-x | 271 | packages available after startup, invoke the command @kbd{M-: |
| 272 | package-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 | |||
| 103 | directory instead. | 103 | directory instead. |
| 104 | 104 | ||
| 105 | @item | 105 | @item |
| 106 | It calls the function @code{package-initialize} to activate any | 106 | It calls the function @code{package-activate-all} to activate any |
| 107 | optional Emacs Lisp package that has been installed. @xref{Packaging | 107 | optional Emacs Lisp package that has been installed. @xref{Packaging |
| 108 | Basics}. However, Emacs doesn't initialize packages when | 108 | Basics}. 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 |
| 110 | with one of the options @samp{-q}, @samp{-Q}, or @samp{--batch}. To | 110 | with one of the options @samp{-q}, @samp{-Q}, or @samp{--batch}. To |
| 111 | initialize packages in the latter case, @code{package-initialize} | 111 | activate the packages in the latter case, @code{package-activate-all} |
| 112 | should be called explicitly (e.g., via the @samp{--funcall} option). | 112 | should 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 | |||
| 105 | evaluates the autoload definitions in @file{@var{name}-autoloads.el}. | 105 | evaluates 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 |
| 109 | current session. This is done after loading the early init file, but | 109 | current session. This is done after loading the early init file, but |
| 110 | before loading the regular init file (@pxref{Startup Summary}). | 110 | before loading the regular init file (@pxref{Startup Summary}). |
| 111 | Packages are not automatically made available if the user option | 111 | Packages 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 |
| 113 | init file. | 113 | init file. |
| 114 | 114 | ||
| 115 | @deffn Command package-initialize &optional no-activate | 115 | @defun package-activate-all |
| 116 | This function initializes Emacs' internal record of which packages are | 116 | This function makes the packages available to the current session. |
| 117 | installed, and makes the packages available to the current session. | ||
| 118 | The user option @code{package-load-list} specifies which packages to | 117 | The user option @code{package-load-list} specifies which packages to |
| 119 | make available; by default, all installed packages are made available. | 118 | make available; by default, all installed packages are made available. |
| 120 | If called during startup, this function also sets | 119 | If called during startup, this function also sets |
| @@ -122,15 +121,20 @@ If called during startup, this function also sets | |||
| 122 | evaluating package autoloads more than once. @xref{Package | 121 | evaluating package autoloads more than once. @xref{Package |
| 123 | Installation,,, emacs, The GNU Emacs Manual}. | 122 | Installation,,, emacs, The GNU Emacs Manual}. |
| 124 | 123 | ||
| 125 | The optional argument @var{no-activate}, if non-@code{nil}, causes | 124 | In most cases, you should not need to call @code{package-activate-all}, |
| 126 | Emacs to update its record of installed packages without actually | ||
| 127 | making them available; it is for internal use only. | ||
| 128 | |||
| 129 | In most cases, you should not need to call @code{package-initialize}, | ||
| 130 | as this is done automatically during startup. Simply make sure to put | 125 | as this is done automatically during startup. Simply make sure to put |
| 131 | any code that should run before @code{package-initialize} in the early | 126 | any code that should run before @code{package-activate-all} in the early |
| 132 | init file, and any code that should run after it in the primary init | 127 | init file, and any code that should run after it in the primary init |
| 133 | file (@pxref{Init File,,, emacs, The GNU Emacs Manual}). | 128 | file (@pxref{Init File,,, emacs, The GNU Emacs Manual}). |
| 129 | @end defun | ||
| 130 | |||
| 131 | @deffn Command package-initialize &optional no-activate | ||
| 132 | This function initializes Emacs' internal record of which packages are | ||
| 133 | installed, and then calls @code{package-activate-all}. | ||
| 134 | |||
| 135 | The optional argument @var{no-activate}, if non-@code{nil}, causes | ||
| 136 | Emacs to update its record of installed packages without actually | ||
| 137 | making them available. | ||
| 134 | @end deffn | 138 | @end deffn |
| 135 | 139 | ||
| 136 | @node Simple Packages | 140 | @node Simple Packages |