Commit 0581e7e7 authored by Stefan Monnier's avatar Stefan Monnier
Browse files

(calendar-mode-map): Use new calendar-scroll-* names.

(mouse-scroll-calendar-left, mouse-scroll-calendar-right): Remove.
Use calendar-scroll-* directly instead.
parent ab895089
2007-07-27 Stefan Monnier <monnier@iro.umontreal.ca> 2007-07-27 Stefan Monnier <monnier@iro.umontreal.ca>
* calendar/cal-move.el (calendar-scroll-left, calendar-scroll-right):
Behave like mouse-scroll-calendar-* when used from the mouse.
* calendar/cal-menu.el (cal-menu-scroll-menu)
(cal-menu-global-mouse-menu): Use new names.
* calendar/cal-move.el (calendar-scroll-left, calendar-scroll-right) * calendar/cal-move.el (calendar-scroll-left, calendar-scroll-right)
(calendar-scroll-left-three-months) (calendar-scroll-left-three-months)
(calendar-scroll-right-three-months): Clean up namespace. (calendar-scroll-right-three-months): Clean up namespace.
...@@ -13,6 +7,16 @@ ...@@ -13,6 +7,16 @@
(scroll-calendar-left-three-months) (scroll-calendar-left-three-months)
(scroll-calendar-right-three-months): Add compatibility aliases. (scroll-calendar-right-three-months): Add compatibility aliases.
* calendar/cal-move.el (calendar-scroll-left, calendar-scroll-right):
Behave like mouse-scroll-calendar-* when used from the mouse.
* calendar/cal-menu.el (cal-menu-scroll-menu)
(cal-menu-global-mouse-menu):
* calendar/calendar.el (calendar-mode-map):
Use new calendar-scroll-* names.
(mouse-scroll-calendar-left, mouse-scroll-calendar-right):
Remove. Use calendar-scroll-* directly instead.
2007-07-26 Stefan Monnier <monnier@iro.umontreal.ca> 2007-07-26 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/advice.el (ad-interactive-p, ad-interactive-form): Remove. * emacs-lisp/advice.el (ad-interactive-p, ad-interactive-form): Remove.
......
...@@ -1493,19 +1493,19 @@ return negative results." ...@@ -1493,19 +1493,19 @@ return negative results."
"Move the cursor backward ARG years." "Move the cursor backward ARG years."
t) t)
(autoload 'scroll-calendar-left "cal-move" (autoload 'calendar-scroll-left "cal-move"
"Scroll the displayed calendar left by ARG months." "Scroll the displayed calendar left by ARG months."
t) t)
(autoload 'scroll-calendar-right "cal-move" (autoload 'calendar-scroll-right "cal-move"
"Scroll the displayed calendar window right by ARG months." "Scroll the displayed calendar window right by ARG months."
t) t)
(autoload 'scroll-calendar-left-three-months "cal-move" (autoload 'calendar-scroll-left-three-months "cal-move"
"Scroll the displayed calendar window left by 3*ARG months." "Scroll the displayed calendar window left by 3*ARG months."
t) t)
(autoload 'scroll-calendar-right-three-months "cal-move" (autoload 'calendar-scroll-right-three-months "cal-move"
"Scroll the displayed calendar window right by 3*ARG months." "Scroll the displayed calendar window right by 3*ARG months."
t) t)
...@@ -2224,14 +2224,14 @@ movement commands will not work correctly." ...@@ -2224,14 +2224,14 @@ movement commands will not work correctly."
downcase-region upcase-region kill-region downcase-region upcase-region kill-region
copy-region-as-kill capitalize-region write-region)) copy-region-as-kill capitalize-region write-region))
(define-key map (vector 'remap c) 'calendar-not-implemented)) (define-key map (vector 'remap c) 'calendar-not-implemented))
(define-key map "<" 'scroll-calendar-right) (define-key map "<" 'calendar-scroll-right)
(define-key map "\C-x<" 'scroll-calendar-right) (define-key map "\C-x<" 'calendar-scroll-right)
(define-key map [prior] 'scroll-calendar-right-three-months) (define-key map [prior] 'calendar-scroll-right-three-months)
(define-key map "\ev" 'scroll-calendar-right-three-months) (define-key map "\ev" 'calendar-scroll-right-three-months)
(define-key map ">" 'scroll-calendar-left) (define-key map ">" 'calendar-scroll-left)
(define-key map "\C-x>" 'scroll-calendar-left) (define-key map "\C-x>" 'calendar-scroll-left)
(define-key map [next] 'scroll-calendar-left-three-months) (define-key map [next] 'calendar-scroll-left-three-months)
(define-key map "\C-v" 'scroll-calendar-left-three-months) (define-key map "\C-v" 'calendar-scroll-left-three-months)
(define-key map "\C-b" 'calendar-backward-day) (define-key map "\C-b" 'calendar-backward-day)
(define-key map "\C-p" 'calendar-backward-week) (define-key map "\C-p" 'calendar-backward-week)
(define-key map "\e{" 'calendar-backward-month) (define-key map "\e{" 'calendar-backward-month)
...@@ -2383,7 +2383,7 @@ movement commands will not work correctly." ...@@ -2383,7 +2383,7 @@ movement commands will not work correctly."
'help-echo "mouse-1: previous month" 'help-echo "mouse-1: previous month"
'mouse-face 'mode-line-highlight 'mouse-face 'mode-line-highlight
'keymap (make-mode-line-mouse-map 'mouse-1 'keymap (make-mode-line-mouse-map 'mouse-1
'mouse-scroll-calendar-right)) 'calendar-scroll-right))
"Calendar" "Calendar"
(concat (concat
(propertize (propertize
...@@ -2412,7 +2412,7 @@ movement commands will not work correctly." ...@@ -2412,7 +2412,7 @@ movement commands will not work correctly."
'help-echo "mouse-1: next month" 'help-echo "mouse-1: next month"
'mouse-face 'mode-line-highlight 'mouse-face 'mode-line-highlight
'keymap (make-mode-line-mouse-map 'keymap (make-mode-line-mouse-map
'mouse-1 'mouse-scroll-calendar-left))) 'mouse-1 'calendar-scroll-left)))
"The mode line of the calendar buffer. "The mode line of the calendar buffer.
This must be a list of items that evaluate to strings--those strings are This must be a list of items that evaluate to strings--those strings are
...@@ -2439,24 +2439,6 @@ under the cursor: ...@@ -2439,24 +2439,6 @@ under the cursor:
(extract-calendar-year iso-date))) (extract-calendar-year iso-date)))
\"\"))") \"\"))")
(defun mouse-scroll-calendar-left (event)
"Scroll the displayed calendar left by one month.
Maintains the relative position of the cursor
with respect to the calendar as well as possible."
(interactive "e")
(save-selected-window
(select-window (posn-window (event-start event)))
(scroll-calendar-left 1)))
(defun mouse-scroll-calendar-right (event)
"Scroll the displayed calendar right by one month.
Maintains the relative position of the cursor
with respect to the calendar as well as possible."
(interactive "e")
(save-selected-window
(select-window (posn-window (event-start event)))
(scroll-calendar-right 1)))
(defun mouse-calendar-other-month (event) (defun mouse-calendar-other-month (event)
"Display a three-month calendar centered around a specified month and year." "Display a three-month calendar centered around a specified month and year."
(interactive "e") (interactive "e")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment