From: yamaoka Date: Tue, 17 Aug 1999 12:45:58 +0000 (+0000) Subject: (gnus-wheel-summary-scroll): Use `event-basic-type' instead of `event-button' X-Git-Tag: t-gnus-6_13_0-04~2 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dae679c1c9a7a50b599d504ad23d2d0e61457dcd;p=elisp%2Fgnus.git- (gnus-wheel-summary-scroll): Use `event-basic-type' instead of `event-button' under FSF Emacsen. --- diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 08afcdf..70f2d7c 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -9539,29 +9539,35 @@ treated as multipart/mixed." (let ((amount (if (memq 'shift (event-modifiers event)) (car gnus-wheel-scroll-amount) (cdr gnus-wheel-scroll-amount))) - (direction (- (* (event-button event) 2) 9)) + (direction (- (* (static-if (featurep 'xemacs) + (event-button event) + (cond ((eq 'mouse-4 (event-basic-type event)) + 4) + ((eq 'mouse-5 (event-basic-type event)) + 5))) + 2) 9)) edge) (gnus-summary-scroll-up (* amount direction)) (when (gnus-eval-in-buffer-window gnus-article-buffer - (save-restriction - (widen) + (save-restriction + (widen) (and (if (< 0 direction) (gnus-article-next-page 0) (gnus-article-prev-page 0) (bobp)) - (if (setq edge (get-text-property + (if (setq edge (get-text-property (point-min) 'gnus-wheel-edge)) (setq edge (* edge direction)) (setq edge -1)) (or (plusp edge) (progn - (put-text-property (point-min) (point-max) + (put-text-property (point-min) (point-max) 'gnus-wheel-edge direction) nil)) (or (> edge gnus-wheel-edge-resistance) (progn - (put-text-property (point-min) (point-max) - 'gnus-wheel-edge + (put-text-property (point-min) (point-max) + 'gnus-wheel-edge (* (1+ edge) direction)) nil)) (eq last-command 'gnus-wheel-summary-scroll))