diff --git a/global.org b/global.org index 4120313..c304cac 100644 --- a/global.org +++ b/global.org @@ -96,25 +96,12 @@ (setq focus-follows-mouse nil) #+END_SRC *** TODO Find out what of the above is necessary given the disable-mouse mode below -*** TODO The following minor mode implementation should be replaced by [https://github.com/purcell/disable-mouse/] -#+BEGIN_SRC emacs-lisp -(define-minor-mode disable-mouse-mode - "A minor-mode that disables all mouse keybinds." - :global t - :lighter "" - :keymap (make-sparse-keymap)) - -(dolist (type '(mouse down-mouse drag-mouse - double-mouse triple-mouse)) - (dolist (prefix '("" C- M- S- M-S- C-M- C-S- C-M-S-)) - ;; Yes, I actually HAD to go up to 7 here. - (dotimes (n 7) - (let ((k (format "%s%s-%s" prefix type n))) - (define-key disable-mouse-mode-map - (vector (intern k)) #'ignore))))) - -(disable-mouse-mode 1) -#+END_SRC + Use the ~disable-mouse~ package by Steve Purcell available at + [https://github.com/purcell/disable-mouse] + #+BEGIN_SRC emacs-lisp + (require 'disable-mouse) + (global-disable-mouse-mode) + #+END_SRC ** Window behavior Prevent compilation window eating up other windows #+BEGIN_SRC emacs-lisp