| Age | Commit message (Collapse) | Author |
|
|
|
|
|
* evil-core: refactored `evil-get-auxiliary-keymap`
In `evil-get-auxilliary-keymap`, there's already a check on `state` when entering the function.
Should `state` be `nil`, it won't enter the `let*` form.
Hence the binding specification
`(aux (if state (lookup-key map key) map))`
always reduces to
`(aux (lookup-key map key))`
This commit removed unnecessary `if` form.
* minor changes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This reverts commit e9391ae769bee189ef6144b8861b117d5c948a80, and
removes spurious debug messages.
|
|
This reverts commit c6086a7b0b44963071096e3ed7545f617de88915.
|
|
|
|
|
|
|
|
|
|
Fix #1180
|
|
|
|
|
|
Version 1.2.15 was accidentally tagged as 1.12.15, and released as
such by MELPA Stable, so now I guess we have to run with it.
|
|
|
|
|
|
Add evil-send-leader and evil-send-localleader which will push the symbol
<leader> or <localleader> into the unread-command-events list. This allows one
to bind a key to evil-send-leader to make it a leader key and activate bindings
like the following.
(defun hi ()
(interactive)
(message "hi"))
(define-key evil-normal-state-map (kbd "<leader> h") 'hi)
For convenience, evil-set-leader can be used as follows
(evil-set-leader 'normal (kbd "C-c"))
An optional argument makes it a localleader.
|
|
|
|
|
|
|
|
|
|
assq uses more memory for some reason. See #1037
|
|
Allow auxiliary maps to be intercept maps
|
|
In some situations, we don't use the match data. So we might as well not capture
it.
|
|
Previously this was done in evil-initial-state-for-buffer, but it's easier to
recursively follow all parent branches (including those from aliases) within
evil-initial-state.
|
|
|
|
Teach evil-initial-state to look at aliases for a mode when they exist and to
handle nil for modes
Search parent modes (and their aliases) for defined initial states in
evil-initial-state-for-buffer.
One effect is that
(evil-set-initial-state 'special-mode 'motion)
now makes motion state the default for all major modes that derive from special
mode and don't have defaults set for them.
|
|
|
|
|
|
Because we delay some bindings using after-load-functions, definitions that
throw errors such as (evil-define-key* 'normal emacs-lisp-mode-map "a" blah)
become very disruptive. To deal with this situation, wrap the definition in
condition-case-unless-debug so that we only print a warning message.
|
|
Give it a meaning when KEYMAP is global or local.
Explicitly mention this in the docstrings of evil-define-key and
evil-define-key*.
|
|
If the parent keymap already has an auxiliary keymap, ignore it. For
example, if the user attempted to bind a key in emacs-lisp-mode-map
before this commit, evil-define-key* could define the key in the
corresponding auxiliary keymap in lisp-shared-mode-map instead of
creating a new auxiliary keymap in emacs-lisp-mode-map. This resulted in
keys bound in emacs-lisp-mode-map with evil-define-key potentially being
bound in other keymaps that inherit from lisp-shared-mode-map (e.g.
lisp-mode-map).
Addresses #709.
|
|
In evil-define-key, allow keymap to be 'global, 'local or some other quoted
symbol, which is assumed to be a minor mode.
Using 'global, corresponds to making a global binding in the corresponding
global evil keymap (similar to evil-global-set-key). Using 'local, corresponds
to making a local binding in the corresponding local evil keymap (similar to
evil-local-set-key).
Any other quoted symbol is assumed to be the name of a minor mode, and the
binding is dispatched to evil-define-minor-mode-key.
Make evil-define-key* support global and local symbols.
Allow a list of states in evil-define-minor-mode-key.
This makes evil-define-key serve as a general keybinding function.
|
|
See #733
|
|
|
|
This avoids having to input ESC ESC ESC in Terminals when trying to
exit out of Minibuffer/Ivy/Helm/etc.
Can then write something like this for Ivy to escape out.
(eval-after-load 'evil
(lambda ()
(define-key ivy-minibuffer-map [escape] 'minibuffer-keyboard-quit)))
|
|
|
|
Introduced by previous commit
|
|
and into a new function evil-define-key*. evil-define-key* tries
bind the keys on invocation which leads to more predictable behavior.
For example, if there is a typo in the keymap then using
evil-define-key will never bind its keys, whereas evil-define-key*
will signal an error right away. It is also a function instead of
a macro which is much more predictable inside of loops and functions
when the file is compiled and the macros are expanded.
|
|
Support a common pattern of putting the same binding in multiple
states and avoid difficulties with using evil-define-key inside
of a dolist loop due to it being a macro.
|
|
Without this if there is an auxiliary keymap in the parent map
it gets used automatically, which may not be what you want. This
option allows you to create a keymap in the passed map if it
doesn't exist (even if it exists in the parent).
|
|
|
|
|
|
|
|
|