diff options
| author | Sean Whitton | 2025-10-11 13:56:21 +0100 |
|---|---|---|
| committer | Sean Whitton | 2025-10-11 13:56:21 +0100 |
| commit | 2acd9702de4f6a3c4915549ade6fca7bbac4ca6c (patch) | |
| tree | 0a43934c29c2a81d4ad5b376a9bf1a4d04796fdc /doc | |
| parent | 1170c277463eb2cc5e121a2ac9e91ad61973a2f8 (diff) | |
| download | emacs-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.texi | 14 |
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 | |||
| 1074 | those commands is actually a keymap, since keymaps are not functions, | 1074 | those commands is actually a keymap, since keymaps are not functions, |
| 1075 | and cannot be autoloaded using the built-in @code{autoload} function. | 1075 | and cannot be autoloaded using the built-in @code{autoload} function. |
| 1076 | 1076 | ||
| 1077 | When you define a keymap using @code{defvar-keymap}, you make it behave | 1077 | When you define a keymap using @code{defvar-keymap} you can add the |
| 1078 | as a function, including @code{:prefix t} in the keymap definition. | 1078 | required function definition by including @code{:prefix t} in the keymap |
| 1079 | definition (@pxref{Creating Keymaps,,, elisp, GNU Emacs Lisp Reference | ||
| 1080 | Manual}). | ||
| 1079 | 1081 | ||
| 1080 | For example: | 1082 | For 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 | ||
| 1096 | would 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}. | 1098 | would 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 |
| 1100 | Alternatively, to handle this case, @code{use-package} offers a special, limited | 1102 | Alternatively, to handle this case, @code{use-package} offers a special, limited |