# HG changeset patch # User Glenn Morris # Date 1253605078 0 # Node ID c9587468d6376d3f0e358c42ee806d61c1e7d115 # Parent c9ff23f80f09cd18d0b50dbfd186148163293807 (calendar-mode-map): Make mouse-1 and 3 clicks on the scroll-bar scroll the calendar window rather than the buffer. diff -r c9ff23f80f09 -r c9587468d637 lisp/ChangeLog --- a/lisp/ChangeLog Tue Sep 22 07:15:31 2009 +0000 +++ b/lisp/ChangeLog Tue Sep 22 07:37:58 2009 +0000 @@ -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 -r c9ff23f80f09 -r c9587468d637 lisp/calendar/calendar.el --- a/lisp/calendar/calendar.el Tue Sep 22 07:15:31 2009 +0000 +++ b/lisp/calendar/calendar.el Tue Sep 22 07:37:58 2009 +0000 @@ -1594,6 +1594,14 @@ (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'.")