Commit Graph

9 Commits

Author SHA1 Message Date
Pierre Neidhardt 66ae22f276 Update ambrevar's email address 2018-08-27 10:42:28 +02:00
James Nguyen 1177456348 Require evil-collection instead of evil
Remove declare-function workaround.
2018-06-19 18:14:50 -07:00
James Nguyen 04268dcadc Remove .el in declare-function 2018-06-08 10:32:02 -07:00
James Nguyen 36f56362cc Add declare-functions for evil-collection-define-key
Adding for byte compiling.

TODO: Should look into doing an import instead since we shouldn't need
to declare a function that our library should know about.

I think there was some circular dependency around evil-collection-*
requiring evil-collection.el so I went with the quick and dirty
approach of doing a declare-function. If someone has a better idea,
feel free to change this!
2018-06-08 10:18:17 -07:00
James Nguyen 7f6c7d849f Add headers 2018-05-26 01:07:22 -07:00
James Nguyen 669fc380a7 Git-timemachine: Don't sharp quote 2018-04-21 11:27:17 -07:00
William Carroll 3026a3831c Support additional keybindings
Instead of using hooks to ensure keybindings, use `evil-define-minor-mode-key`,
which combine `evil-define-key` and `evil-normalize-keymaps` to ensure that
bindings take effect for minor modes.

Per PR feedback, additional functionality is supported. Also, the require
statement is more defensive for those users that don't have `git-timemachine`
installed as a dependency.
2018-04-20 20:10:15 -07:00
William Carroll 799866e90e Add licensing information
Adds licensing copy, which was taken from another module in this repository.
2018-04-20 20:10:15 -07:00
William Carroll 9298988cc4 Support git-timemachine
Supports evil bindings for git-timemachine. On my machine, git-timemachine
starts with evil in normal mode, which is problematic when trying to access the
keybindings "n" and "p", which navigate to the next and previous revisions.
Additionally, normal mode eclispses "q", which exits the mode.

I tried using `(evil-set-initial-state 'git-timemachine-mode 'motion)`, but that
didn't work. I assume this is because `git-timemachine` is a minor-mode. To work
around this, I used `add-hook` to ensure motion mode was the initial state.

Once motion mode is the initial state, "p" and "q" become available.
Unfortunately, "n" is still not. To get around this, I used a buffer-local
binding in the local motion state map to map "n" appropriately. One known
shortcoming of this approach is that there is no cleanup done after exiting the
mode.

Any suggestions are eagerly welcomed. Forgive any crude techniques that I used
to get this functioning. I just wanted to broach the discussion with some of the
other maintainers to get some insights and hopefully augment my implementation
as needed.
2018-04-20 20:10:15 -07:00