andre-r / centered-cursor-mode.el

An emacs minor mode for smooth scrolling
GNU General Public License v2.0
60 stars 12 forks source link

dev branch breaks emacs on terminal #15

Closed Sleepful closed 3 years ago

Sleepful commented 3 years ago

I get mwheel-scroll-up-function is void, also everything looks black

Sleepful commented 3 years ago

Here is the work-around with use-package

(use-package! centered-cursor-mode
  :init (setq mwheel-scroll-up-function 1 mwheel-scroll-down-function 1)
  )

Side note:use-package! with a ! is almost the same thing as plain use-package, it's a doom-emacs macro

andre-r commented 3 years ago

I updated the dev branch. Can you please test it?

Sleepful commented 3 years ago

Nope, this breaks it further:

Error in private config: config.el, (void-variable mouse-wheel-mode)
Sleepful commented 3 years ago

I had to add this instead:

(use-package! centered-cursor-mode
  :init (setq mwheel-scroll-up-function 1 mwheel-scroll-down-function 1 mouse-wheel-mode 1)

and then I had to do this in centered-cursor-mode.el:

(when (boundp 'mouse-wheel-mode)

notice the apostrophe.

However, the apostrophe isn't enough, I still had to add setq mouse-wheel-mode 1 as shown above.