I recently found yascroll and have added it to my .emacs to enable it permanently. Specifically, I added this line (as described here: https://github.com/m2ym/yascroll-el):
(global-yascroll-bar-mode 1)
When Emacs starts, evaluation of my .emacs halts with this error:
Symbol's function definition is void: global-yascroll-bar-mode
Strangely, though, everything works if I open .emacs and run M-x eval-buffer, which I thought was in essence the same thing.
I can also enable yascroll by simply running M-x global-yascroll-bar-mode. The problem only appears when Emacs is starting. What am I doing wrong?
customize variable
settings get set immediately, even if the mode they refer to hasn't been loaded yet. They just sit there doing nothing until their mode is loaded, and then they take effect. On the other hand, functions defined in modes, like(global-yascroll-bar-mode)
, can't be called until after the mode is loaded. That's why @lunaryorn 's answer works. – Tyler Dec 05 '14 at 17:32