Turning Off Native OS X Scrolling for Emacs

One of the minor annoyances of Emacs on the Mac is that it's easy to inadvertently scroll an Emacs window even if Emacs doesn't have focus. Usually this happens when I'm working in a browser or in Reeder and I use the trackpad to try to scroll the display but the cursor is sitting on an Emacs window. I tried turning off the scroll bar but the window would still scroll if the cursor was in it.

The other day I was looking through Magnar Sveen's emacs.d and discovered the answer. All you need do is add

(mouse-wheel-mode -1)

to your .emacs or init.el file.

As I say, it's a minor thing but if you too are bothered by it, now you know what to do.

This entry was posted in General and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>