emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/evil-lisp-state 5aea6675bb 114/125: evil-lisp-state-leader


From: ELPA Syncer
Subject: [nongnu] elpa/evil-lisp-state 5aea6675bb 114/125: evil-lisp-state-leader is now a function
Date: Thu, 6 Jan 2022 04:58:45 -0500 (EST)

branch: elpa/evil-lisp-state
commit 5aea6675bba6cd3fbbdf23a45801d2997f917c31
Author: syl20bnr <sylvain.benner@gmail.com>
Commit: syl20bnr <sylvain.benner@gmail.com>

    evil-lisp-state-leader is now a function
---
 README.md          |  2 +-
 evil-lisp-state.el | 24 +++++++++++-------------
 2 files changed, 12 insertions(+), 14 deletions(-)

diff --git a/README.md b/README.md
index e3426b6f5c..40046fb4d7 100644
--- a/README.md
+++ b/README.md
@@ -117,7 +117,7 @@ It is also possible to define the key bindings globally by 
setting
 effect.
 
 The leader key is `SPC l` by default, it is possible to change it with the
-variable `evil-lisp-state-leader'.
+function `evil-lisp-state-leader`.
 
 If you don't want commands to enter in `lisp state` by default set the variable
 `evil-lisp-state-enter-lisp-state-on-command` to nil. Then use the
diff --git a/evil-lisp-state.el b/evil-lisp-state.el
index f175ac50f1..aba79864ed 100644
--- a/evil-lisp-state.el
+++ b/evil-lisp-state.el
@@ -100,7 +100,7 @@
 ;; `evil-lisp-state-major-modes' has no effect.
 
 ;; The leader key is `SPC l' by default, it is possible to
-;; change it with the variable `evil-lisp-state-leader'.
+;; change it with the function `evil-lisp-state-leader'.
 
 ;; If you don't want commands to enter in `lisp state' by default
 ;; set the variable `evil-lisp-state-enter-lisp-state-on-command'
@@ -126,11 +126,6 @@
   :prefix 'evil-lisp-state-)
 
 (eval-and-compile
-  (defcustom evil-lisp-state-leader "SPC l"
-    "Leader key."
-    :type 'string
-    :group 'evil-lisp-state)
-
   (defcustom evil-lisp-state-global nil
     "If non nil evil-lisp-state is available everywhere."
     :type 'boolean
@@ -170,13 +165,16 @@ If `evil-lisp-state-global' is non nil then this variable 
has no effect."
 
 
 ;; leader maps
-(bind-map evil-lisp-state-map
-  :evil-keys (evil-lisp-state-leader)
-  :evil-states (normal))
-(bind-map evil-lisp-state-major-modes-map
-  :evil-keys (evil-lisp-state-leader)
-  :evil-states (normal)
-  :major-modes (evil-lisp-state-major-modes))
+(defun evil-lisp-state-leader (leader)
+  "Set LEADER."
+  (bind-map evil-lisp-state-map
+    :evil-keys (evil-lisp-state-leader)
+    :evil-states (normal))
+  (bind-map evil-lisp-state-major-modes-map
+    :evil-keys (evil-lisp-state-leader)
+    :evil-states (normal)
+    :major-modes (evil-lisp-state-major-modes)))
+(evil-lisp-state-leader "SPC l")
 
 ;; escape
 (define-key evil-lisp-state-map [escape] 'evil-normal-state)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]