X-Git-Url: http://git.chise.org/gitweb/?p=chise%2Fxemacs-chise.git.1;a=blobdiff_plain;f=lisp%2Fmwheel.el;h=094ca43d4055ef50fb867fa19755e4753e15912e;hp=03d439215ece52e32efaa8e11106eea386c0bc2c;hb=52b3dd1157cecb0f190b11a0874fcb0a5df5e0e2;hpb=98a6e4055a1fa624c592ac06f79287d55196ca37 diff --git a/lisp/mwheel.el b/lisp/mwheel.el index 03d4392..094ca43 100644 --- a/lisp/mwheel.el +++ b/lisp/mwheel.el @@ -17,7 +17,7 @@ ;; 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 XEmacs; see the file COPYING. If not, write to the ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, ;; Boston, MA 02111-1307, USA. @@ -91,11 +91,13 @@ This can be slightly disconcerting, but some people may prefer it." (amt (if (memq 'shift (event-modifiers event)) (cdr mwheel-scroll-amount) (car mwheel-scroll-amount)))) - (case (mwheel-event-button event) - (4 (scroll-down amt)) - (5 (scroll-up amt)) - (otherwise (error "Bad binding in mwheel-scroll"))) - (if curwin (select-window curwin)))) + (unwind-protect + (case (mwheel-event-button event) + (4 (scroll-down amt)) + (5 (scroll-up amt)) + (otherwise (error "Bad binding in mwheel-scroll"))) + (if curwin (select-window curwin))) + )) ;;;###autoload (defun mwheel-install () @@ -112,7 +114,7 @@ This can be slightly disconcerting, but some people may prefer it." (define-key global-map (car keys) 'mwheel-scroll) (setq keys (cdr keys))) (error nil)))) - + (provide 'mwheel) ;;; mwheel.el ends here