; Fix some minor issues in use-package.texi

* doc/misc/use-package.texi: Fix some minor issues.
This commit is contained in:
Stefan Kangas 2022-12-10 12:59:30 +01:00
parent 1b7ece2095
commit 2f1269c333

View file

@ -652,12 +652,11 @@ elisp, GNU Emacs Lisp Reference Manual}). Further, this value is fixed at
whatever was determined during compilation, to avoid looking up the whatever was determined during compilation, to avoid looking up the
same information again on each startup. For example: same information again on each startup. For example:
@c FIXME: the below should use shell-command-to-string, surely?
@lisp @lisp
@group @group
(eval-and-compile (eval-and-compile
(defun ess-site-load-path () (defun ess-site-load-path ()
(shell-command "find ~ -path ess/lisp"))) (shell-command-to-string "find ~ -path ess/lisp")))
@end group @end group
@group @group
@ -739,10 +738,8 @@ function and variable definitions that will:
@enumerate @enumerate
@item @item
@c FIXME: ``within a guard block''? what's that??
Make the byte-compiler happy: it will not complain about functions Make the byte-compiler happy: it will not complain about functions
whose definitions are unknown because you have them within a guard whose definitions are unknown.
block.
@item @item
Define functions and variables that will be used in an @code{:if} Define functions and variables that will be used in an @code{:if}
@ -1684,9 +1681,9 @@ them directly to the developers of that package manager.
Some users might want to byte-compile their init file to make Emacs Some users might want to byte-compile their init file to make Emacs
startup faster. This is not recommended in most cases, as the startup faster. This is not recommended in most cases, as the
speed-up is often too small to be worth it, and can lead to confusion speed-up is usually too small to be worth it, and it can lead to
if the byte-compiled files are out-of-date. If you still want to do confusion if the byte-compiled files are out-of-date. If you still
it, this chapter explains how to do that. want to do it, this chapter explains how to do that.
@code{use-package} always loads every library that it can while a file @code{use-package} always loads every library that it can while a file
is being byte-compiled. This helps silence spurious warnings about is being byte-compiled. This helps silence spurious warnings about
@ -1962,7 +1959,7 @@ together with @code{:ensure}.
@end group @end group
@end lisp @end lisp
For example, on a @code{Debian GNU/Linux} system, this would call For example, on a Debian GNU/Linux system, this would call
@samp{apt-get install foo}. @samp{apt-get install foo}.
If the package is named differently than the binary, you can use a If the package is named differently than the binary, you can use a
@ -1976,11 +1973,10 @@ cons in the form of @code{(binary . package-name)}. For example:
@end group @end group
@end lisp @end lisp
On a @code{Debian GNU/Linux} system, this would call @code{apt install On a Debian GNU/Linux system, this would call @code{apt install foo}
foo} if Emacs could not locate the executable if Emacs could not locate the executable @code{foocmd}.@footnote{For
@code{foocmd}.@footnote{For manual testing, you could use the manual testing, you could use the @code{executable-find} function,
@code{executable-find} function, which is what @samp{system-packages} which is what @samp{system-packages} uses internally.}
uses internally.}
@code{:ensure-system-package} can also take a cons where the @code{:ensure-system-package} can also take a cons where the
@code{cdr} is a string that will get called by @code{cdr} is a string that will get called by