Commit graph

54 commits

Author SHA1 Message Date
syl20bnr 82fdd9a511 Use evil in holy-mode
Motivation

While disabling Evil in holy-mode makes its implementation shorter and
sounds elegant on the paper, in practice it puts a big burden on the
configuration parts which need to know if Evil is enable or not. This is
a bad separation of concerns and the bunch of fixes that we were forced
to do in the past weeks shows this issue. Those fixes were about
removing the knowledge of the activation of Evil by implementing new
dispatching functions to be used by layers, this is cumbersome and makes
Spacemacs layer configuration more subtle which is not good. There was
additional bad consequences of the removal of Evil state like the
impossibility to use Evil lisp state or iedit states, or we would have
been forced to implement a temporary activation of Evil which is
awkward.

Instead I reintroduce Evil as the central piece of Spacemacs design thus
Evil is now re-enabled in holy-mode. It provides the abstraction we need
to isolate editing styles and be able to grow the Spacemacs
configuration coverage sanely. Layers don't need to check whether the
holy mode is active or not and they don't need to know if Evil is
available (it is always available). We also don't need to write
additional dispatching functions, this is the job of Evil, and I think
it provides everything for this. Ideally configuration layer should be
implemented with only Evil in mind and the holy-mode (and hybrid-mode)
should magically make it work for Emacs style users, for instance we can
freely use `evil-insert-state` anywhere in the code without any guard.

Evil is now even more part of Spacemacs, we can really say that
Spacemacs is Emacs+Evil which is now an indivisible pair. Spacemacs
needed this stable API to continue on the right track.

While these changes should be rather transparent to the user, I'm sorry
for this experimental period, I failed to see all the implications of
such a change, I was just excited about the possibility to make Evil
optional. The reality is that Spacemacs has to embrace it and keep its
strong position on being Emacs+Evil at the core.

Implementation

- insert, motion and normal states are forced to emacs state using an
advice on `evil-insert-state`, `evil-motion-state` and
`evil-normal-state` respectively. These functions can be used freely in
the layer configuration.
- A new general hook `spacemacs-editing-style-hook` allow to hook any
code that need to be configured based on the editing style. Functions
hooked to this hook takes the current style as parameter, this
basically generalize the hook used to setup hjkl navigation bindings.
- ESC has been removed from the emacs state map.
- Revert unneeded changes
  - Revert "evil: enter insert-state only from normal-state"
    commit bdd702dfbe.
  - Revert "avoid being evil in deft with emacs editing style"
    commit f3a16f49ed.

Additional changes

All editing style packages have been moved to a layer called
`spacemacs-editing-styles`

Notes

I did not have time to attack hybrid mode, I should be able to do it
later.
2016-03-13 21:16:55 -04:00
Eivind Fonn 411be27ed1 Remove enable-semantic-mode function
- No reason to require semantic manually
- Don't set submodes in a hook function (hard to change for user)
2016-03-10 23:13:19 -05:00
Allen Li 974c92e758 Make pylookup use std completing-read function 2016-03-03 20:51:18 +01:00
justbur 39e06feba9 Use unless-debug version of condition-case
It's not possible to get full backtraces in these instances when an
error is signaled, and I think we should generate full backtraces when
debug-on-error is enabled as a general rule.

I had to make this change at one place to track down the root of problem
2 in #5200.
2016-03-03 20:30:30 +01:00
darkfeline 6d331bc5a4 Fix pylookup binding
Fix pylookup binding
2016-02-24 23:18:56 -08:00
justbur e69d5500bc evil-jumps: Fix old function names
evil-jumper--push is now evil--jumps-push
2016-02-23 20:45:18 +01:00
Alejandro Catalina bdd702dfbe evil: enter insert-state only from normal-state 2016-02-23 20:42:59 +01:00
Eivind Fonn f3a15840b9 Add anaconda-eldoc-mode 2016-02-16 23:02:07 -05:00
justbur aab007d225 evil-jumper: Remove obsolete package
The functionality is now incorporated into the evil core and this
package has been marked as obsolete.
2016-02-16 21:23:07 -05:00
Fabien Dubosson 06cb27e1dc [doc] Fix some additional SPC : to SPC SPC 2016-02-07 14:39:54 +01:00
Jaakko Luttinen 34df7b03b0 Add key binding for going back in anaconda mode
There are keybindings `C-o` and `M-*` to go back already, but it could
be a good idea to add an entry to `SPC m g` (or `, g`) menu where the
other movement commands are.
2016-02-02 21:23:17 +01:00
Eivind Fonn e29ac21345 Register all REPLs and make SPC m ' bindings 2016-01-31 23:39:25 -05:00
Eivind Fonn e9f8377b92 Tweak flycheck loading process 2016-01-31 23:04:48 -05:00
Fabien Dubosson 7f201b5b98 Fix parenthesis code style in Python packages 2016-01-31 21:48:52 +01:00
Christoph Paulik 0cd242315b Add live-python mode to python layer as extension 2016-01-31 21:47:18 +01:00
Christoph Paulik f50859ab97 Revert "Set global pyenv version if no .python-version file exists"
This reverts commit bddf9de8f1.

When pyenv-auto-set-local-pyenv-version is set to 'on-visit then this
switched the python version when e.g. using jump to definition.
2016-01-26 01:21:02 -05:00
Christoph Paulik 0057df5cf5 Only load pyenv if it is installed
fix #4779
2016-01-24 14:42:59 +01:00
Christoph Paulik bddf9de8f1 Set global pyenv version if no .python-version file exists 2016-01-23 17:09:52 +01:00
Eivind Fonn 0f5d576ada Re-add py-yapf 2016-01-23 15:00:23 +01:00
syl20bnr 33ead6fc42 Deprecation of extensions and <pkg>-excluded-packages variables
As announced in previous releases, see CHANGELOG.next for more info
in the Breaking Changes section.
2016-01-17 22:06:04 -05:00
syl20bnr 046d86800c Clean copyrights and update for year 2016 2016-01-11 21:42:17 -05:00
Fredrik Bergroth c302ae4e67 Properly read version in .python-version
Fixes #4514
2016-01-11 01:13:09 -05:00
justbur b0ee301845 layers: Conditionally load helm packages
Only use them when the spacemacs-helm layer is used.
2016-01-09 13:36:03 -05:00
syl20bnr ae64d5b955 python: sort key bindings 2016-01-08 22:37:35 -05:00
Christoph Paulik d4dfb385e7 Improve Python virtual environment docs and keybindings
Inspired by the discussion in
https://github.com/syl20bnr/spacemacs/issues/2841 I thought it was
useful to improve the Documentation and provide keybindings for all the
useful `pyvenv` functions.
2016-01-08 21:04:28 +01:00
syl20bnr cddf18ff1e Update install layer section in REAMDE.org files 2016-01-06 00:21:55 -05:00
syl20bnr db5901b3be python: Remove call to dash -when-let
Plus remove unnecessary defer t
2015-12-19 22:33:24 -05:00
Fredrik Bergroth 577e7b2d86 Auto-activate local pyenv version 2015-12-19 22:30:07 -05:00
Eivind Fonn ac0ba50154 Make flycheck/flyspell hooks more explicit 2015-12-11 02:08:55 -05:00
hyh 979867447e Fix makefile for python version 2.7.10 2015-12-03 23:59:15 -05:00
Eivind Fonn c893383fe4 Fix some documentation bugs
- CSS links
- GIFS in published version
- Unify layer doc titles
- Change emoji layer emojis to an image
2015-12-03 23:50:29 -05:00
Fabien Dubosson 3a5c375c6c Correct forgotten python major mode bindings 2015-11-22 18:45:12 +01:00
justbur 9befd20a1a layers: Transition to new key bindings functions
Removes dependence on evil-leader centralizing control over the method
of key binding in core-keybindings.el
2015-11-21 18:22:51 +01:00
Eivind Fonn e7fbc84ff0 Remove package guards for evilified
See discussion in #3879
2015-11-21 11:07:14 +01:00
justbur b294461957 evilified-state: Make into local package 2015-11-18 23:35:01 -05:00
Wieland Hoffmann 602a21beb9 python: list the correct keybindings for interacting with pyenv 2015-11-16 12:39:16 +01:00
Eivind Fonn 38e48aa95d Highlight TODO keywords in all prog modes
Also make the colon optional
2015-11-14 00:34:05 -05:00
Eivind Fonn c3866382b2 Documentation update
- Add #+HTML_HEAD_EXTRA options to all org files
- HTMLize published documentation via CSS
2015-11-13 14:23:13 +01:00
Eivind Fonn 13c5b1d24b Convert documentation to publishable format 2015-11-01 23:40:29 -05:00
Diego Berrocal 358b38cec5 Add python prefixes for python 2015-10-29 19:29:46 +01:00
Wieland Hoffmann 104a1f8c9b Python: None of the keys start with m T, remove mention of it 2015-10-29 13:48:46 +01:00
Wieland Hoffmann 70ecefe79b python/doc: Fix a link to pylookup 2015-10-19 00:29:49 -04:00
Eivind Fonn 56ecd43753 Add variables to opt-in to flycheck/flyspell 2015-10-10 23:18:46 -04:00
Swaroop C H 0a6c619194 [python] Allow user to customize fill column 2015-10-07 15:51:40 -04:00
person808 c1b6293268 Replace eval-after-load with with-eval-after-load.
We now backport the macro for 24.3 so we can use it everywhere.
2015-10-07 15:51:39 -04:00
Eivind Fonn c1561eadb7 Fix pylookup
- Set executable bit on pylookup.py
- Add update functions to autoload
- Document use of update functions
- Fix path setup
2015-10-07 15:51:39 -04:00
person808 706185b771 Simplify setting anaconda-mode server directory.
There is now a built-in variable we can use to customize the directory.
2015-09-23 23:32:02 -04:00
Alexandr Skurikhin 4eb83f2079 python-mode: fix py-yapf for yapf >= 0.3.0
yapf >= 0.3.0 now returns 2 if source code was changed.
2015-09-23 23:11:04 -04:00
Robert O'Connor 24c642ff3d Add back and fix evil-matchit for python-mode 2015-09-23 23:09:08 -04:00
syl20bnr c505fde5e4 python: put anaconda-mode dir in cache dir 2015-09-22 19:28:53 -04:00