summaryrefslogtreecommitdiff
path: root/lisp/mwheel.el
diff options
context:
space:
mode:
authorGerd Moellmann <gerd@gnu.org>1999-11-11 14:01:46 +0000
committerGerd Moellmann <gerd@gnu.org>1999-11-11 14:01:46 +0000
commit0642a24bd57c8732a82461b5e9db976967a613c9 (patch)
tree154402f58e76e7c4bb0936fbeb10e4f0d8f7770e /lisp/mwheel.el
parent32c8aa14b98970ebd20b73293062638bf609f5d9 (diff)
downloademacs-0642a24bd57c8732a82461b5e9db976967a613c9.tar.gz
Fix copyright notice. Don't require 'cl at run time.
Diffstat (limited to 'lisp/mwheel.el')
-rw-r--r--lisp/mwheel.el28
1 files changed, 12 insertions, 16 deletions
diff --git a/lisp/mwheel.el b/lisp/mwheel.el
index f27b2634c8d..d6b562b55e3 100644
--- a/lisp/mwheel.el
+++ b/lisp/mwheel.el
@@ -4,25 +4,23 @@
;; Maintainer: William M. Perry <wmperry@gnu.org>
;; Keywords: mouse
-;; This file is part of Emacs.
+;; This file is part of GNU Emacs.
-;; XEmacs is free software; you can redistribute it and/or modify it
-;; under the terms of the GNU General Public License as published by
+;; GNU Emacs is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.
-;; XEmacs is distributed in the hope that it will be useful, but
-;; WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with XEmacs; see the file COPYING. If not, write to the
+;; along with GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
-;;; Synched up with: Not synched.
-
;;; Commentary:
;; This code will enable the use of the infamous 'wheel' on the new
@@ -37,13 +35,11 @@
;; To enable this code, simply put this at the top of your .emacs
;; file:
;;
-;; (autoload 'mwheel-install "mwheel" "Enable mouse wheel support.")
;; (mwheel-install)
;;; Code:
(require 'custom)
-(require 'cl)
(defcustom mwheel-scroll-amount '(5 . 1)
"Amount to scroll windows by when spinning the mouse wheel.
@@ -92,10 +88,10 @@ This can be slightly disconcerting, but some people may prefer it."
(cdr mwheel-scroll-amount)
(car mwheel-scroll-amount))))
(unwind-protect
- (case (mwheel-event-button event)
- (4 (scroll-down amt))
- (5 (scroll-up amt))
- (otherwise (error "Bad binding in mwheel-scroll")))
+ (let ((button (mwheel-event-button event)))
+ (cond ((= button 4) (scroll-down amt))
+ ((= button 5) (scroll-up amt))
+ (t (error "Bad binding in mwheel-scroll"))))
(if curwin (select-window curwin)))))
;;;###autoload