Shammer's Philosophy

My private adversaria

Disabled mouse action on Emacs

Intoroduce disable-mouse package

I was bothered Emacs unexpectedly pop up menu on my Jessie and looking for how to disable this pop up, and find a package to do it, named disable-mouse. This package is provided via melpa.

Installation procedure

  1. add repository to $HOME/.emacs.d/init.el like below
  2. restart Emacs
  3. M-x package-list-packages
  4. select disable-mouse
  5. click Install button
  6. add disable-mouse action like below

The section added to init.el

;; Package configuration
(if (< emacs-major-version 24)
    ;; For important compatibility libraries like cl-lib
    (progn
      (add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/"))
      (package-initialize))
  (progn
    (require 'package)
    (add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/") t)
    (package-initialize)))  
...
;; Disable mouse
(require 'disable-mouse)
(global-disable-mouse-mode)