1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-17 05:30:43 -08:00

(calendar-mode-map): Make mouse-1 and 3 clicks on the scroll-bar

scroll the calendar window rather than the buffer.
This commit is contained in:
Glenn Morris 2009-09-22 07:37:58 +00:00
parent d8899a7416
commit daedbbc2a9
2 changed files with 11 additions and 0 deletions

View file

@ -1,5 +1,8 @@
2009-09-22 Glenn Morris <rgm@gnu.org>
* 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).

View file

@ -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'.")