diff options
| author | Gerd Moellmann | 1999-11-11 14:01:46 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 1999-11-11 14:01:46 +0000 |
| commit | 8ed8f294a336df8dc526b226e3ec33a4f80992a4 (patch) | |
| tree | 3164084b6390d0013fb0e68664fea0b9a680143d | |
| parent | 44336afbad0a9d629b72b7e9ab3e9b9478297db6 (diff) | |
| download | emacs-8ed8f294a336df8dc526b226e3ec33a4f80992a4.tar.gz emacs-8ed8f294a336df8dc526b226e3ec33a4f80992a4.zip | |
Fix copyright notice. Don't require 'cl at run time.
| -rw-r--r-- | lisp/mwheel.el | 28 |
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 @@ | |||
| 4 | ;; Maintainer: William M. Perry <wmperry@gnu.org> | 4 | ;; Maintainer: William M. Perry <wmperry@gnu.org> |
| 5 | ;; Keywords: mouse | 5 | ;; Keywords: mouse |
| 6 | 6 | ||
| 7 | ;; This file is part of Emacs. | 7 | ;; This file is part of GNU Emacs. |
| 8 | 8 | ||
| 9 | ;; XEmacs is free software; you can redistribute it and/or modify it | 9 | ;; GNU Emacs is free software; you can redistribute it and/or modify |
| 10 | ;; under the terms of the GNU General Public License as published by | 10 | ;; it under the terms of the GNU General Public License as published by |
| 11 | ;; the Free Software Foundation; either version 2, or (at your option) | 11 | ;; the Free Software Foundation; either version 2, or (at your option) |
| 12 | ;; any later version. | 12 | ;; any later version. |
| 13 | 13 | ||
| 14 | ;; XEmacs is distributed in the hope that it will be useful, but | 14 | ;; GNU Emacs is distributed in the hope that it will be useful, |
| 15 | ;; WITHOUT ANY WARRANTY; without even the implied warranty of | 15 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 16 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 17 | ;; General Public License for more details. | 17 | ;; GNU General Public License for more details. |
| 18 | 18 | ||
| 19 | ;; You should have received a copy of the GNU General Public License | 19 | ;; You should have received a copy of the GNU General Public License |
| 20 | ;; along with XEmacs; see the file COPYING. If not, write to the | 20 | ;; along with GNU Emacs; see the file COPYING. If not, write to the |
| 21 | ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 21 | ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
| 22 | ;; Boston, MA 02111-1307, USA. | 22 | ;; Boston, MA 02111-1307, USA. |
| 23 | 23 | ||
| 24 | ;;; Synched up with: Not synched. | ||
| 25 | |||
| 26 | ;;; Commentary: | 24 | ;;; Commentary: |
| 27 | 25 | ||
| 28 | ;; This code will enable the use of the infamous 'wheel' on the new | 26 | ;; This code will enable the use of the infamous 'wheel' on the new |
| @@ -37,13 +35,11 @@ | |||
| 37 | ;; To enable this code, simply put this at the top of your .emacs | 35 | ;; To enable this code, simply put this at the top of your .emacs |
| 38 | ;; file: | 36 | ;; file: |
| 39 | ;; | 37 | ;; |
| 40 | ;; (autoload 'mwheel-install "mwheel" "Enable mouse wheel support.") | ||
| 41 | ;; (mwheel-install) | 38 | ;; (mwheel-install) |
| 42 | 39 | ||
| 43 | ;;; Code: | 40 | ;;; Code: |
| 44 | 41 | ||
| 45 | (require 'custom) | 42 | (require 'custom) |
| 46 | (require 'cl) | ||
| 47 | 43 | ||
| 48 | (defcustom mwheel-scroll-amount '(5 . 1) | 44 | (defcustom mwheel-scroll-amount '(5 . 1) |
| 49 | "Amount to scroll windows by when spinning the mouse wheel. | 45 | "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." | |||
| 92 | (cdr mwheel-scroll-amount) | 88 | (cdr mwheel-scroll-amount) |
| 93 | (car mwheel-scroll-amount)))) | 89 | (car mwheel-scroll-amount)))) |
| 94 | (unwind-protect | 90 | (unwind-protect |
| 95 | (case (mwheel-event-button event) | 91 | (let ((button (mwheel-event-button event))) |
| 96 | (4 (scroll-down amt)) | 92 | (cond ((= button 4) (scroll-down amt)) |
| 97 | (5 (scroll-up amt)) | 93 | ((= button 5) (scroll-up amt)) |
| 98 | (otherwise (error "Bad binding in mwheel-scroll"))) | 94 | (t (error "Bad binding in mwheel-scroll")))) |
| 99 | (if curwin (select-window curwin))))) | 95 | (if curwin (select-window curwin))))) |
| 100 | 96 | ||
| 101 | ;;;###autoload | 97 | ;;;###autoload |