[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
fix for calendar mode-line mouse bindings
From: |
Dave Love |
Subject: |
fix for calendar mode-line mouse bindings |
Date: |
06 Sep 2002 18:34:31 +0100 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
This fixes the case where the calendar window isn't selected when
those bindings are invoked. Arguably the relevant Calendar commands
should initially make sure the Calendar buffer is selected (since they
use local variables).
2002-09-06 Dave Love <fx@gnu.org>
* calendar/calendar.el (calendar-mode-line-format): Select the
right window for mouse events.
*** calendar.el.~1.131.4.1.~ Wed Jan 16 20:35:46 2002
--- calendar.el Fri Sep 6 16:46:44 2002
***************
*** 2037,2047 ****
(defvar calendar-mode-line-format
(list
! (propertize (substitute-command-keys
! "\\<calendar-mode-map>\\[scroll-calendar-left]")
! 'help-echo "mouse-2: scroll left"
! 'keymap (make-mode-line-mouse-map 'mouse-2
! #'scroll-calendar-left))
"Calendar"
(concat
(propertize
--- 2037,2054 ----
(defvar calendar-mode-line-format
(list
! (propertize
! (substitute-command-keys
! "\\<calendar-mode-map>\\[scroll-calendar-left]")
! 'help-echo "mouse-2: scroll left"
! 'keymap (make-mode-line-mouse-map
! 'mouse-2
! '(lambda ()
! (interactive)
! (save-selected-window
! (select-window (posn-window (event-start
! last-command-event))))
! (scroll-calendar-left))))
"Calendar"
(concat
(propertize
***************
*** 2056,2065 ****
'help-echo "mouse-2: choose another month"
'keymap (make-mode-line-mouse-map
'mouse-2
! (lambda ()
! (interactive)
! (call-interactively
! 'calendar-other-month))))
"/"
(propertize
(substitute-command-keys
--- 2063,2074 ----
'help-echo "mouse-2: choose another month"
'keymap (make-mode-line-mouse-map
'mouse-2
! '(lambda ()
! (interactive)
! (save-selected-window
! (select-window (posn-window (event-start
! last-command-event)))
! (call-interactively 'calendar-other-month)))))
"/"
(propertize
(substitute-command-keys
***************
*** 2071,2077 ****
"\\<calendar-mode-map>\\[scroll-calendar-right]")
'help-echo "mouse-2: scroll right"
'keymap (make-mode-line-mouse-map
! 'mouse-2 #'scroll-calendar-right)))
"The mode line of the calendar buffer.")
(defun calendar-goto-info-node ()
--- 2080,2092 ----
"\\<calendar-mode-map>\\[scroll-calendar-right]")
'help-echo "mouse-2: scroll right"
'keymap (make-mode-line-mouse-map
! 'mouse-2
! '(lambda ()
! (interactive)
! (save-selected-window
! (select-window (posn-window (event-start
! last-command-event)))
! (scroll-calendar-left))))))
"The mode line of the calendar buffer.")
(defun calendar-goto-info-node ()
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- fix for calendar mode-line mouse bindings,
Dave Love <=