aboutsummaryrefslogtreecommitdiff
path: root/evil-core.el
AgeCommit message (Collapse)Author
2019-12-17Bump version to 1.2.16Eivind Fonn
2019-12-11Bump version to 1.2.151.2.15Eivind Fonn
2019-11-29evil-core.el: Add <leader> functionalityJustin Burkett
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.
2019-11-19Declare documentation stringsAlexander Shukaev
2019-01-04Bump version to 1.2.141.2.14Eivind Fonn
2019-01-03Clarify docstring for evil-set-initial-stateEivind Fonn
2018-09-11Add option to enable Evil in minibuffer(s)Alexander Shukaev
2018-04-08Use local-variable-p instead of assqAaron Jensen
assq uses more memory for some reason. See #1037
2018-03-20Merge pull request #1013 from noctuid/intercept-auxVasilij Schneidermann
Allow auxiliary maps to be intercept maps
2018-03-07Use string-match-p when possibleRudi Grinberg
In some situations, we don't use the match data. So we might as well not capture it.
2018-01-25Teach evil-initial-state about parent modesJustin Burkett
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.
2018-01-25Throw error on circular major-mode parent referenceJustin Burkett
2018-01-25Use initial states of parent major modesJustin Burkett
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.
2018-01-08Allow auxiliary maps to be intercept mapsnoctuid
2017-11-26Merge branch 'noctuid-evil-define-key-ignore-parent'Vasilij Schneidermann
2017-11-26Handle errors in key definitions in evil-define-keyJustin Burkett
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.
2017-11-26Improve handling of nil state in evil-define-keyJustin Burkett
Give it a meaning when KEYMAP is global or local. Explicitly mention this in the docstrings of evil-define-key and evil-define-key*.
2017-11-23Always create new auxiliary map in evil-define-key*noctuid
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.
2017-11-21Generalize use of KEYMAP in evil-define-keyJustin Burkett
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.
2017-11-06Add interactive argument to evil-mode autoloadFice T
See #733
2017-10-02update version to 1.2.131.2.13Eivind Fonn
2017-06-24Use evil-esc in minibuffersJames Nguyen
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)))
2017-02-15Remove support for Emacs < 24Eivind Fonn
2016-05-25evil-core.el: Fix evil-define-key macro expansionjustbur
Introduced by previous commit
2016-05-25evil-core.el: Factor function out of evil-define-keyjustbur
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.
2016-05-19evil-core.el: Allow list of states in evil-define-keyjustbur
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.
2016-04-11evil-core.el: Add ignore-parent option to get-auxiliary-keymapjustbur
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).
2016-04-05Merge stableFrank Fischer
2016-04-05update version to 1.2.121.2.12Frank Fischer
2016-03-24Indent evil-define-minor-mode-key like evil-define-keyjustbur
2016-03-20Ensure autoload of `evil-mode` loads evil.el (fix #642)Frank Fischer
2016-03-10Fix arg list in evil-define-minor-mode-keyjustbur
BINDINGS was denoted as &optional when it should be &rest.
2016-03-10Move definition of evil-modejustbur
evil-mode was defined last in the loading sequence, after an advice had been defined for it, which raised a warning at load time. There does not seem to be any reason to defer defining evil-mode to the end of the load sequence as it just defines a minor mode and all of the constituent functions have been defined at this point.
2016-03-07Merge with stableFrank Fischer
2016-03-07update version to 1.2.111.2.11Frank Fischer
2016-02-13run 'make indent', move evil-jump-hook into evil-jumps.el; delegate jump ↵Bailey Ling
commands so that they can be compiled
2016-01-24Flip priority of minor-mode and auxiliary mapsjustbur
Since evil-define-key can be used for major-mode keys, if someone defines all of their minor-mode keys with evil-define-minor-mode-key they can be shadowed by the major-mode ones. Consider defining keys for org-mode using evil-define-key and keys for org-capture-mode using evil-define-minor-mode key. The former might shadow the latter and there is no good way to fix this in the current priority order.
2016-01-24Fix bug introduced by minor-mode-keymapsjustbur
evil-normalize-keymaps was activating inactive minor modes in the keymaps introduced by evil-define-minor-mode-key. This adds a guard to make sure that this does not happen.
2016-01-18Merge stableFrank Fischer
2016-01-18update version to 1.2.101.2.10Frank Fischer
2016-01-17Fix parameter name in `evil-get-minor-mode-keymap`Frank Fischer
2016-01-17Cleanup comments and fix docsting in prev commitjustbur
2016-01-16Add evil-define-minor-mode-key and supporting funcsjustbur
evil-define-minor-mode-key is similar to evil-define-key, except it associates bindings with a minor-mode symbol instead of a specific keymap. This has the advantage of automatically picking up on when a minor-mode is enabled or disabled through standard Emacs mechanisms, instead of requiring a call to evil-normalize-keymaps to activate the binding after the mode is toggled. This is meant to supplement usage of evil-define-key.
2016-01-16Merge stableFrank Fischer
2016-01-15evil-core: Set evil-local-mode var to nil in disabled buffersjustbur
It is possible for (evil-disabled-buffer-p) to return t, but for the evil-local-mode variable to be left as t. This means that functions that check the value of evil-local-mode wrongly assume that evil-local-mode is enabled in these buffers. One such function is evil-refresh-cursor.
2016-01-11update version to 1.2.91.2.9Frank Fischer
2016-01-05Merge stableFrank Fischer
2015-11-09update version to 1.2.81.2.8Frank Fischer
2015-11-08Merge stableFrank Fischer
2015-11-02update version to 1.2.71.2.7Frank Fischer