From daedbbc2a90ab02f0e1cfcb3532d78b0f6907055 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 22 Sep 2009 07:37:58 +0000 Subject: [PATCH] (calendar-mode-map): Make mouse-1 and 3 clicks on the scroll-bar scroll the calendar window rather than the buffer. --- lisp/ChangeLog | 3 +++ lisp/calendar/calendar.el | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a4548a9dae5..880dd09a6c9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2009-09-22 Glenn Morris + * calendar/calendar.el (calendar-mode-map): Make mouse-1 and 3 clicks on + the scroll-bar scroll the calendar window rather than the buffer. + * calendar/cal-menu.el (cal-menu-scroll-menu): Add a sub-section with commands that move point (as opposed to scrolling). diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index 2140e538492..2617c8004b7 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el @@ -1594,6 +1594,14 @@ line." (define-key map [down-mouse-2] (easy-menu-binding cal-menu-global-mouse-menu)) + ;; Left-click moves us forward in time, right-click backwards. + ;; cf scroll-bar.el. + (define-key map [vertical-scroll-bar mouse-1] 'calendar-scroll-left) + (define-key map [vertical-scroll-bar drag-mouse-1] 'calendar-scroll-left) + ;; down-mouse-2 stays as scroll-bar-drag. + (define-key map [vertical-scroll-bar mouse-3] 'calendar-scroll-right) + (define-key map [vertical-scroll-bar drag-mouse-3] 'calendar-scroll-right) + map) "Keymap for `calendar-mode'.") -- 2.39.2