Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disabling mouse scrolling in Emacs

Tags:

emacs

Everything I've found on the internet has told me that emacs disables mouse scrolling by default, but mine is very enthusiastic and scrolls to its hearts content when my thumbs get too close to the trackpad on my laptop. I have not given it permission to do so, and here is my .emacs to prove it:

;; Line by line scrolling                                                                                                                                      
(setq scroll-step 1)

;; Turn off backup file creation                                                                                                                               
;;(setq make-backup-files nil)                                                                                                                                 

;; Enable backup files                                                                                                                                         
(setq make-backup-files t)

;; Save all backup files to this directory                                                                                                                     
(setq backup-directory-alist (quote ((".*" . "~/.emacs_backups/"))))

;; Show column number                                                                                                                                          
(column-number-mode 1)

;; Fix C indenting                                                                                                                                             
(setq c-default-style "bsd"
      c-basic-offset 8)

Every once and a while my thumbs will brush the track pad, and suddenly I'll be typing in the middle of another line way up or way below from where I had just been. How can I stop this from happening?

EDIT Running M-x customize-option mouse-wheel-mode yields:

Mouse Wheel Mode: [Hide Value] [Toggle] off (nil)

[State]: CHANGED outside Customize; operating on it here may be unreliable.

Non-nil if Mouse-Wheel mode is enabled. [Hide Rest]
See the command mouse-wheel-mode' for a description of this minor mode.
Setting this variable directly does not take effect;
either customize it (see the info node
Easy Customization')
or call the function `mouse-wheel-mode'. Groups: [Mouse]

like image 603
Colin Woodbury Avatar asked Oct 30 '25 19:10

Colin Woodbury


1 Answers

It's enabled by default (at least since Emacs 23).

To turn it off (locally):

(mouse-wheel-mode -1)

To turn it off (globally):

M-x customize-option mouse-wheel-mode ; set to nil and save

But maybe you just want to adjust the settings: Take a look at M-x customize-group mouse RET

like image 104
Michael Markert Avatar answered Nov 01 '25 14:11

Michael Markert