I'm developing a mode for Emacs, and everytime I switch to its buffer, viper gets turned on. I've modified viper-mode to trace where viper-mode is being called, and surprisingly set-viper-state-in-major-mode is called by running the viper-post-command-hooks, set to nil. Any idea of what is going on?
Thanks!
EDIT: For the benefit of all beings, here is what I found out: as instructed by Trey, I started emacs with -Q and manually loaded both viper and my package. As I could reproduce the bug, the problem was on one of these packages. After line-by-line filtering, I discovered that the innoquous-looking (kill-all-local-variables) was causing the problem.
There's something in initialization that's causing it.
First try starting without your
.emacs
emacs -q. If the problem persists, then the trigger is in thesite-start.el
. So, talk to whomever installed Emacs and get them to remove the customizations there. You can also always use the -Q startup option to avoid loading thesite-start.el
.If the problem isn't in
site-start.el
, and you don't think it's in your.emacs
, it might be in a customdefault.el
file, which you can prevent from being loaded by adding:to your
.emacs
.If you still have a problem, then I'm 99% sure it's in your .emacs.
To be 100% sure, try emacs -Q, which runs Emacs with no customizations. If the problem persists, download and install your own Emacs b/c you surely can't trust the installation you're using.
So, now if you're convinced it's in your
.emacs
, start cutting out parts of your.emacs
, or introduce an error in your.emacs
with(error "frog")
, and progressively rule out which portions of your.emacs
are causing the problem.g'luck