unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* fix for calendar mode-line mouse bindings
@ 2002-09-06 17:34 Dave Love
  0 siblings, 0 replies; only message in thread
From: Dave Love @ 2002-09-06 17:34 UTC (permalink / raw)


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 ()

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-09-06 17:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-06 17:34 fix for calendar mode-line mouse bindings Dave Love

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).