Correct last `evil-leader/set-key` in documentation

This commit is contained in:
Fabien Dubosson 2016-01-03 21:04:11 +01:00 committed by syl20bnr
parent c8e1ee0026
commit 11c692dc0f
2 changed files with 9 additions and 9 deletions

View File

@ -593,7 +593,7 @@ bindings live. There are two related commands from this package which are used
as follows.
#+BEGIN_SRC emacs-lisp
(evil-leader/set-key "C-]" 'forward-char)
(spacemacs/set-leader-keys "C-]" 'forward-char)
(spacemacs/set-leader-keys-for-major-mode 'emacs-lisp-mode "C-]" 'forward-char)
#+END_SRC
@ -609,7 +609,7 @@ like ~SPC ac~ for =calc-dispatch=. Nesting bindings is easy.
#+BEGIN_SRC emacs-lisp
(spacemacs/declare-prefix "]" "bracket-prefix")
(evil-leader/set-key "]]" 'double-bracket-command)
(spacemacs/set-leader-keys "]]" 'double-bracket-command)
#+END_SRC
The first line declares ~SPC ]~ to be a prefix and the second binds the key
@ -1190,7 +1190,7 @@ Additional text objects are defined in Spacemacs:
~SPC o~ and ~SPC m o~ are reserved for the user. Setting key bindings behind
these is *guaranteed* to never conflict with Spacemacs default key bindings.
*Example:* Put =(evil-leader/set-key "oc" 'org-capture)= inside
*Example:* Put =(spacemacs/set-leader-keys "oc" 'org-capture)= inside
=dotspacemacs/user-config= in your =~/.spacemacs= file, to be able to use ~SPC o
c~ to run org mode capture.

View File

@ -300,11 +300,11 @@ another sequence. For instance, if you want to switch ~SPC S~ (spelling) with
~SPC d~ (used by dash) to make the former easier to reach, you can use:
#+begin_src emacs-lisp
(defun my-evil-leader/swap-keys (key1 key2)
(defun dear-leader/swap-keys (key1 key2)
(let ((map1 (lookup-key evil-leader--default-map key1))
(map2 (lookup-key evil-leader--default-map key2)))
(evil-leader/set-key key1 map2 key2 map1)))
(my-evil-leader/swap-keys "S" "d")
(spacemacs/set-leader-keys key1 map2 key2 map1)))
(dear-leader/swap-keys "S" "d")
#+end_src
If you want to define your own alias, like using ~SPC é~ (because it's an
@ -312,10 +312,10 @@ unmapped key on your keyboard-layout for instance) for accessing ~SPC w~
(windows management), you can use this:
#+begin_src emacs-lisp
(defun my-evil-leader/alias-of (key1 key2)
(defun dear-leader/alias-of (key1 key2)
(let ((map (lookup-key evil-leader--default-map key2)))
(evil-leader/set-key key1 map)))
(my-evil-leader/alias-of "é" "w")
(spacemacs/set-leader-keys key1 map)))
(dear-leader/alias-of "é" "w")
#+end_src
** Restore the sentence delimiter to two spaces?