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

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

[nongnu] elpa/bind-map e239bbdaef 44/97: Always use global evil maps


From: ELPA Syncer
Subject: [nongnu] elpa/bind-map e239bbdaef 44/97: Always use global evil maps
Date: Thu, 20 Jan 2022 07:59:18 -0500 (EST)

branch: elpa/bind-map
commit e239bbdaefa17f7057ae97cb844e3e2ab0ce57bc
Author: justbur <justin@burkett.cc>
Commit: justbur <justin@burkett.cc>

    Always use global evil maps
    
    It's possible the hooks activating the overriding maps are not run, so
    we keep the bindings in the global maps so they are still available in
    these cases.
---
 bind-map.el | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/bind-map.el b/bind-map.el
index 00afef3639..e64b45eb18 100644
--- a/bind-map.el
+++ b/bind-map.el
@@ -140,7 +140,7 @@ suitable for use in `kbd'.
 :override-minor-modes BOOL
 
 If non nil, make keys in :keys override the minor-mode maps, by
-using `emulation-mode-map-alists' instead of `global-map'. If
+using `emulation-mode-map-alists' instead of the `global-map'. If
 either :major-modes or :minor-modes is specified, this setting
 has no effect.
 
@@ -156,10 +156,11 @@ use `bind-map-default-evil-states'.
 
 :evil-use-local BOOL
 
-This places all evil bindings in the local state maps for evil.
-These maps have high precedence and will mask most other evil
-bindings. If either :major-modes or :minor-modes is specified,
-this setting has no effect.
+This places all evil bindings in the local state maps for
+evil (as well as the global ones). These maps have high
+precedence and will mask most other evil bindings. If
+either :major-modes or :minor-modes is specified, this setting
+has no effect.
 
 :major-modes (MODE1 MODE2 ...)
 
@@ -237,9 +238,9 @@ Declare a prefix command for MAP named COMMAND-NAME."
              (global-set-key (kbd key) ',prefix-cmd)))
          (dolist (key (list ,@evil-keys))
            (dolist (state ',evil-states)
-             (if ,evil-use-local
-                 (push (list state (kbd key) ',prefix-cmd) 
bind-map-local-bindings)
-               (evil-global-set-key state (kbd key) ',prefix-cmd))))))))
+             (when ,evil-use-local
+               (push (list state (kbd key) ',prefix-cmd) 
bind-map-local-bindings))
+             (evil-global-set-key state (kbd key) ',prefix-cmd)))))))
 (put 'bind-map 'lisp-indent-function 'defun)
 
 ;;;###autoload



reply via email to

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