diff --git a/etc/NEWS b/etc/NEWS index 612d2d841cb..9452f32b03d 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2049,6 +2049,7 @@ DISABLE-URI non-nil. When starting these debuggers (e.g., 'M-x pdb') while visiting a file, pressing 'M-n' in the command prompt suggests a command line including the file name, using the minibuffer's "future history". + ** Calendar +++ @@ -2056,6 +2057,11 @@ the file name, using the minibuffer's "future history". This command recenters the month of the date at point. By default, it is bound to 'C-l' in the calendar buffer. +--- +*** Mouse wheel bindings for scrolling the calendar. +You can now use the mouse wheel to scroll the calendar by 3 months. +With the shift modifier, it scrolls by one month. With the meta +modifier, it scrolls by year. * New Modes and Packages in Emacs 31.1 diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index b0f6a9152d5..c448955450e 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el @@ -1587,12 +1587,18 @@ Otherwise, use the selected window of EVENT's frame." (define-key map (vector 'remap c) 'calendar-not-implemented)) (define-key map "<" 'calendar-scroll-right) (define-key map "\C-x<" 'calendar-scroll-right) + (define-key map [S-wheel-up] 'calendar-scroll-right) (define-key map [prior] 'calendar-scroll-right-three-months) (define-key map "\ev" 'calendar-scroll-right-three-months) + (define-key map [wheel-up] 'calendar-scroll-right-three-months) + (define-key map [M-wheel-up] 'calendar-backward-year) (define-key map ">" 'calendar-scroll-left) (define-key map "\C-x>" 'calendar-scroll-left) + (define-key map [S-wheel-down] 'calendar-scroll-left) (define-key map [next] 'calendar-scroll-left-three-months) (define-key map "\C-v" 'calendar-scroll-left-three-months) + (define-key map [wheel-down] 'calendar-scroll-left-three-months) + (define-key map [M-wheel-down] 'calendar-forward-year) (define-key map "\C-l" 'calendar-recenter) (define-key map "\C-b" 'calendar-backward-day) (define-key map "\C-p" 'calendar-backward-week)