aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorhrls <viktor.kharitonovich@gmail.com>2020-10-30 14:33:37 +0300
committerGitHub <noreply@github.com>2020-10-30 13:33:37 +0200
commitd1daf274e8ca2eb0f20475b8f314bb955167c6a1 (patch)
tree0b07b09dc0228f9eaafebef42dc5fd7282ac009f /doc
parent2d807449561d2d651b79bea948409c823b8e57f6 (diff)
[Docs] Improve use-package configuration examples (#1592)
Diffstat (limited to 'doc')
-rw-r--r--doc/modules/ROOT/pages/installation.adoc18
1 files changed, 10 insertions, 8 deletions
diff --git a/doc/modules/ROOT/pages/installation.adoc b/doc/modules/ROOT/pages/installation.adoc
index db5fbb3..7e481b9 100644
--- a/doc/modules/ROOT/pages/installation.adoc
+++ b/doc/modules/ROOT/pages/installation.adoc
@@ -85,10 +85,11 @@ the `master` branch, declare the following in your Emacs initialization file
----
(use-package projectile
:ensure t
- :config
- (define-key projectile-mode-map (kbd "s-p") 'projectile-command-map)
- (define-key projectile-mode-map (kbd "C-c p") 'projectile-command-map)
- (projectile-mode +1))
+ :init
+ (projectile-mode +1)
+ :bind (:map projectile-mode-map
+ ("s-p" . projectile-command-map)
+ ("C-c p" . projectile-command-map)))
----
However, if you wanted to be a bit more conservative and only use the stable
@@ -99,10 +100,11 @@ releases of Projectile, you'd declare the following:
(use-package projectile
:ensure t
:pin melpa-stable
- :config
- (define-key projectile-mode-map (kbd "s-p") 'projectile-command-map)
- (define-key projectile-mode-map (kbd "C-c p") 'projectile-command-map)
- (projectile-mode +1))
+ :init
+ (projectile-mode +1)
+ :bind (:map projectile-mode-map
+ ("s-p" . projectile-command-map)
+ ("C-c p" . projectile-command-map)))
----
After placing one of the above s-expressions, evaluate it, for it to take effect