Hi Keshav, On Mon, Jul 16 2012 (04:12), Keshav Kini <[email protected]> wrote:
evil-mode is so evil that it has stained my cursor black, as black as the soul of evil-mode!
[...]
Then I suspected that the theme was just badly designed. But on a hunch, I tried commenting out the line "(evil-mode 1)", and restarted Emacs. The cursor was white! And running "M-x evil-mode" made it black again.
Yes, Evil is the culprit in a way. Here is the relevant code: (defcustom evil-default-cursor (list (or (frame-parameter nil 'cursor-color) "black") t) ... Which is correct (and keep in mind black is also emacs' default color), but is only evaluated once.
How can I fix this? Is it a bug in evil-mode, or am I just doing something wrong?
As a workaround: Load the theme before you load evil (not just before enabling!). or Set `evil-default-cursor' yourself (Here[1] is a truly evil cursor function). For a less makeshift version I'd suggest either 1) change the default value of `evil-default-cursor' to nil and evaluate the code above instead always if `evil-default-cursor' is nil 2) advise load-theme and update `evil-default-cursor' But 2. would only fix color themes. What do you think? Frank? Vegard? Michael Footnotes: [1] https://github.com/cofi/dotfiles/blob/master/emacs.d/config/cofi-evil.el#L25...