🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.emacs
Article #9597

Re: Scrolling emacs windows under X using the mouse.

#9597
From: Sarantos Kapidakis
Date: Thu, 22 Feb 1990 19:33
19 lines
1207 bytes
Using condition-case, it works fine:

(defun x-mouse-scroll-down (arg)
  "Scrolls down a page of the window the mouse is pointing at."
  (setq curr-window (selected-window))
  (x-mouse-select arg)
  (condition-case nil (scroll-down nil) (beginning-of-buffer))
  (select-window curr-window))
(defun x-mouse-scroll-up (arg)
  "Scrolls down a page of the window the mouse is pointing at."
  (setq curr-window (selected-window))
  (x-mouse-select arg)
  (condition-case nil (scroll-up nil) (end-of-buffer))
  (select-window curr-window))
(define-key mouse-map x-button-m-left 'x-mouse-scroll-down)
(define-key mouse-map x-button-m-right 'x-mouse-scroll-up)

sarantos
Technical Details
Message-ID: <24430@princeton.Princeton.EDU>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!jarthur!usc!samsung!emory!mephisto!udel!princeton!notecnirp!sarantos
References: <52442@bbn.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!jarthur!usc!samsung!emory!mephisto!udel!princeton!notecnirp!sarantos
From: sarantos@notecnirp.Princeton.EDU (Sarantos Kapidakis)
Newsgroups: comp.emacs
Subject: Re: Scrolling emacs windows under X using the mouse.
Keywords: condition-case
Message-ID: <24430@princeton.Princeton.EDU>
Date: 22 Feb 90 19:33:12 GMT
References: <52442@bbn.COM>
Sender: news@princeton.Princeton.EDU
Reply-To: sarantos@notecnirp.UUCP (Sarantos Kapidakis)
Organization: Princeton University CS Dept
Lines: 19