Path: 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 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