Fix for packaging
Fix for using undeclared variables issue
Add autoload cookies for lazy loading

And use named function instead of anonymous function, because
anonymous function cannot be removed from hook.
Merge pull request #136 from syohex/fix-for-package

emacs mode: Fix for package