aboutsummaryrefslogtreecommitdiffstats
path: root/doc/misc
diff options
context:
space:
mode:
authorStefan Kangas2022-12-12 09:05:53 +0100
committerStefan Kangas2022-12-12 09:05:53 +0100
commitfcd0b377e0e25b7b68bd51229098edb30972352b (patch)
tree372c6ec23588ef8f80d47f408abd4a71f68b702a /doc/misc
parentb889eced4449555373e53c26c280dffa548dcfc3 (diff)
parent06ef030f9363a33646369e8583cbac695810fe80 (diff)
downloademacs-fcd0b377e0e25b7b68bd51229098edb30972352b.tar.gz
emacs-fcd0b377e0e25b7b68bd51229098edb30972352b.zip
Merge from origin/emacs-29
06ef030f936 use-package.texi: New section "Manual installation" f4ce6fa7d3e Revert "Revert "Improve last change to xfaces.c" (05ece1e... b8d2ec920f3 Revert "Improve last change to xfaces.c" (05ece1eb8b) 24c8c28ae61 Do not pare arguments unnecessarily. 9c0d7bb73bb Add automated tests for Eglot d3669cfe156 Eglot: allow skipping compile-time warnings about LSP int... 04b7e01885d ; project.el: Bump version. f2876014adb Add customizale faces for tree-sitter explorer 3e349ee1198 Fix error message when installing non-existent package 733cdeabfb9 Don't use diff-mode buffer as a patch when it's visiting ... 87475f4af21 Fix pcase rx patterns using rx-let bindings (bug#59814) 4893a156317 Fix use-package-defaults defcustom type (bug#59941) 074b7e6f4d1 ; * lisp/use-package/bind-key.el: Remove ineffective back... 864ed9dfa1f ; * lisp/progmodes/dockerfile-ts-mode.el: use \' instead ... 9f7e5584a4f * lisp/language/indian.el: Improve Brahmi composition rul... 78ad33bb05f ; Minor cleanup of last change in xfaces.c. 2024ade271d ; Improve docs of relaxing face-font attribute match (bug...
Diffstat (limited to 'doc/misc')
-rw-r--r--doc/misc/use-package.texi78
1 files changed, 48 insertions, 30 deletions
diff --git a/doc/misc/use-package.texi b/doc/misc/use-package.texi
index 0aa8975f30a..c587d23d74b 100644
--- a/doc/misc/use-package.texi
+++ b/doc/misc/use-package.texi
@@ -248,10 +248,6 @@ packages using the built-in @code{install-package} command, it will do
248this automatically for you. Packages shipped with Emacs (built-in 248this automatically for you. Packages shipped with Emacs (built-in
249packages) are always available. 249packages) are always available.
250 250
251If you install packages manually, you must make sure they are
252available on your @code{load-path}. @xref{Lisp Libraries,,, emacs,
253GNU Emacs Manual}, for details.
254
255Some packages have more than one library. In those cases, you might 251Some packages have more than one library. In those cases, you might
256need more than one @code{use-package} declaration to make sure the 252need more than one @code{use-package} declaration to make sure the
257package is properly loaded. For complex configurations, you might 253package is properly loaded. For complex configurations, you might
@@ -267,8 +263,7 @@ on Emacs start. @xref{Installing packages}, for details.
267* Conditional loading:: Loading packages conditionally. 263* Conditional loading:: Loading packages conditionally.
268* Loading sequentially:: Loading packages in sequence. 264* Loading sequentially:: Loading packages in sequence.
269* Load dependencies:: Don't load without dependencies. 265* Load dependencies:: Don't load without dependencies.
270* Load path:: Using a custom @code{load-path}. 266* Manual installation:: Loading manually installed packages.
271* Manual autoloads:: Setting up autoloads manually.
272@end menu 267@end menu
273 268
274@node Loading basics 269@node Loading basics
@@ -623,36 +618,54 @@ As a convenience, a list of such packages may be specified:
623For more complex logic, such as that supported by @code{:after}, 618For more complex logic, such as that supported by @code{:after},
624simply use @code{:if} and the appropriate Lisp expression. 619simply use @code{:if} and the appropriate Lisp expression.
625 620
621@node Manual installation
622@section Manually installed package
623
624When installing packages manually, without Emacs' built-in package
625manager (@file{package.el}), it will obviously not help you set up
626autoloads or add it to your @code{load-path}. You must do it
627yourself. However, use-package makes this more convenient.
628
629@menu
630* Load path:: Using a custom @code{load-path}.
631* Manual autoloads:: Setting up autoloads manually.
632@end menu
633
626@node Load path 634@node Load path
627@section Setting a custom @code{load-path} 635@subsection Setting a custom @code{load-path}
628@cindex custom @code{load-path} for loading a package 636@cindex custom @code{load-path} for loading a package
629@cindex @code{load-path}, add directories for loading a package 637@cindex @code{load-path}, add directories for loading a package
630 638
639When installing packages manually, you must make sure its libraries
640are available on your @code{load-path}. @xref{Lisp Libraries,,,
641emacs, GNU Emacs Manual}, for more details about package loading.
642
631@findex :load-path 643@findex :load-path
632If a package resides in some directory that is not in your 644The @code{:load-path} keyword provides a convenient way to add
633@code{load-path}, use the @code{:load-path} keyword to add it. It 645directories to your load path. It takes as argument a symbol, a
634takes as argument a symbol, a function, a string or a list of strings. 646function, a string or a list of strings. If a directory is specified
635If a directory is specified as a relative file name, it is expanded 647as a relative file name, it is expanded relative to
636relative to @code{user-emacs-directory}. 648@code{user-emacs-directory}.
637 649
638For example: 650For example:
639 651
640@lisp 652@lisp
641@group 653@group
642(use-package ess-site 654(use-package org
643 :load-path "site-lisp/ess/lisp/" 655 :load-path "site-lisp/org/lisp/"
644 :commands R) 656 :commands org-mode)
645@end group 657@end group
646@end lisp 658@end lisp
647 659
648Note that when using a symbol or a function to provide a dynamically 660When using a symbol or a function to provide a dynamically generated
649generated list of directories, you must inform the byte-compiler of this 661list of directories, you must inform the byte-compiler of this
650definition so that the value is available at byte-compilation time. 662definition, so that the value is available at byte-compilation time.
651This is done by using the special form @code{eval-and-compile} (as 663This is done by using the special form @code{eval-and-compile} (as
652opposed to @code{eval-when-compile}, @pxref{Eval During Compile,,, 664opposed to @code{eval-when-compile}, @pxref{Eval During Compile,,,
653elisp, GNU Emacs Lisp Reference Manual}). Further, this value is fixed at 665elisp, GNU Emacs Lisp Reference Manual}). Furthermore, this value is
654whatever was determined during compilation, to avoid looking up the 666fixed to the value it had during compilation. If the operation is
655same information again on each startup. For example: 667costly, you do not have to repeat it again on each startup. For
668example:
656 669
657@lisp 670@lisp
658@group 671@group
@@ -669,20 +682,25 @@ same information again on each startup. For example:
669@end lisp 682@end lisp
670 683
671@node Manual autoloads 684@node Manual autoloads
672@section Setting up autoloads manually 685@subsection Setting up autoloads manually
686
687Packages often document how to set up its autoloads when it is being
688manually installed. If it does, follow those instructions.
689Otherwise, you might want to set them up manually.
690
673@cindex autoloads for packages, setting up manually 691@cindex autoloads for packages, setting up manually
674@cindex package autoloads, setting up manually 692@cindex package autoloads, setting up manually
675 693
676@findex :commands 694@findex :commands
677@findex :autoload 695@findex :autoload
678To autoload an interactive command, use the @code{:commands} keyword. 696To autoload an interactive command, use the @code{:commands} keyword,
679When you use the @code{:commands} keyword, it creates autoloads for 697which takes either a symbol or a list of symbols as its argument. It
680those commands (which defers loading of the module until those commands are 698creates autoloads for those commands (which defers loading of the
681used). The @code{:commands} keyword takes either a symbol or a list 699module until those commands are used).
682of symbols as its argument. 700
683 701The @code{:autoload} keyword takes the same arguments as
684The @code{:autoload} keyword works like @code{:commands}, but is used 702@code{:commands}, but is used to autoload non-interactive functions.
685to autoload non-interactive functions. Here is an example: 703Here is an example:
686 704
687@lisp 705@lisp
688@group 706@group