aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorSean Whitton2025-10-11 13:56:21 +0100
committerSean Whitton2025-10-11 13:56:21 +0100
commit2acd9702de4f6a3c4915549ade6fca7bbac4ca6c (patch)
tree0a43934c29c2a81d4ad5b376a9bf1a4d04796fdc /doc
parent1170c277463eb2cc5e121a2ac9e91ad61973a2f8 (diff)
downloademacs-2acd9702de4f6a3c4915549ade6fca7bbac4ca6c.tar.gz
emacs-2acd9702de4f6a3c4915549ade6fca7bbac4ca6c.zip
; Simplify last change slightly, improve wording, add xref.
Diffstat (limited to 'doc')
-rw-r--r--doc/misc/use-package.texi14
1 files changed, 8 insertions, 6 deletions
diff --git a/doc/misc/use-package.texi b/doc/misc/use-package.texi
index bd76f0e77b6..dc586ca9ae9 100644
--- a/doc/misc/use-package.texi
+++ b/doc/misc/use-package.texi
@@ -1074,8 +1074,10 @@ autoloaded from the given package. However, this does not work if one of
1074those commands is actually a keymap, since keymaps are not functions, 1074those commands is actually a keymap, since keymaps are not functions,
1075and cannot be autoloaded using the built-in @code{autoload} function. 1075and cannot be autoloaded using the built-in @code{autoload} function.
1076 1076
1077When you define a keymap using @code{defvar-keymap}, you make it behave 1077When you define a keymap using @code{defvar-keymap} you can add the
1078as a function, including @code{:prefix t} in the keymap definition. 1078required function definition by including @code{:prefix t} in the keymap
1079definition (@pxref{Creating Keymaps,,, elisp, GNU Emacs Lisp Reference
1080Manual}).
1079 1081
1080For example: 1082For example:
1081 1083
@@ -1088,13 +1090,13 @@ For example:
1088 "B" #'foo-command-b) 1090 "B" #'foo-command-b)
1089 1091
1090(use-package foo 1092(use-package foo
1091 :bind (("C-c x" . foo-mode-exit) 1093 :bind (("C-c p" . foo-command-map)))
1092 ("C-c p" . foo-command-map)))
1093@end group 1094@end group
1094@end lisp 1095@end lisp
1095 1096
1096would create the bindings for the key sequences @code{"C-c p A"}, 1097@noindent
1097@code{"C-c p B"} and @code{"C-c x"} for package @code{foo}. 1098would create the bindings for the key sequences @code{"C-c p A"}, and
1099@code{"C-c p B"} for package @code{foo}.
1098 1100
1099@findex :bind-keymap 1101@findex :bind-keymap
1100Alternatively, to handle this case, @code{use-package} offers a special, limited 1102Alternatively, to handle this case, @code{use-package} offers a special, limited