Mercurial > emacs
comparison lisp/calendar/calendar.el @ 82151:7b6bc42d5f2c
(calendar-mode-map): Use new calendar-scroll-* names.
(mouse-scroll-calendar-left, mouse-scroll-calendar-right): Remove.
Use calendar-scroll-* directly instead.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Fri, 27 Jul 2007 06:28:39 +0000 |
parents | b98604865ea0 |
children | 3d0d3af343ac |
comparison
equal
deleted
inserted
replaced
82150:0d322d300115 | 82151:7b6bc42d5f2c |
---|---|
1491 | 1491 |
1492 (autoload 'calendar-backward-year "cal-move" | 1492 (autoload 'calendar-backward-year "cal-move" |
1493 "Move the cursor backward ARG years." | 1493 "Move the cursor backward ARG years." |
1494 t) | 1494 t) |
1495 | 1495 |
1496 (autoload 'scroll-calendar-left "cal-move" | 1496 (autoload 'calendar-scroll-left "cal-move" |
1497 "Scroll the displayed calendar left by ARG months." | 1497 "Scroll the displayed calendar left by ARG months." |
1498 t) | 1498 t) |
1499 | 1499 |
1500 (autoload 'scroll-calendar-right "cal-move" | 1500 (autoload 'calendar-scroll-right "cal-move" |
1501 "Scroll the displayed calendar window right by ARG months." | 1501 "Scroll the displayed calendar window right by ARG months." |
1502 t) | 1502 t) |
1503 | 1503 |
1504 (autoload 'scroll-calendar-left-three-months "cal-move" | 1504 (autoload 'calendar-scroll-left-three-months "cal-move" |
1505 "Scroll the displayed calendar window left by 3*ARG months." | 1505 "Scroll the displayed calendar window left by 3*ARG months." |
1506 t) | 1506 t) |
1507 | 1507 |
1508 (autoload 'scroll-calendar-right-three-months "cal-move" | 1508 (autoload 'calendar-scroll-right-three-months "cal-move" |
1509 "Scroll the displayed calendar window right by 3*ARG months." | 1509 "Scroll the displayed calendar window right by 3*ARG months." |
1510 t) | 1510 t) |
1511 | 1511 |
1512 (autoload 'calendar-cursor-to-nearest-date "cal-move" | 1512 (autoload 'calendar-cursor-to-nearest-date "cal-move" |
1513 "Move the cursor to the closest date." | 1513 "Move the cursor to the closest date." |
2222 (dolist (c '(narrow-to-region mark-word mark-sexp mark-paragraph | 2222 (dolist (c '(narrow-to-region mark-word mark-sexp mark-paragraph |
2223 mark-defun mark-whole-buffer mark-page | 2223 mark-defun mark-whole-buffer mark-page |
2224 downcase-region upcase-region kill-region | 2224 downcase-region upcase-region kill-region |
2225 copy-region-as-kill capitalize-region write-region)) | 2225 copy-region-as-kill capitalize-region write-region)) |
2226 (define-key map (vector 'remap c) 'calendar-not-implemented)) | 2226 (define-key map (vector 'remap c) 'calendar-not-implemented)) |
2227 (define-key map "<" 'scroll-calendar-right) | 2227 (define-key map "<" 'calendar-scroll-right) |
2228 (define-key map "\C-x<" 'scroll-calendar-right) | 2228 (define-key map "\C-x<" 'calendar-scroll-right) |
2229 (define-key map [prior] 'scroll-calendar-right-three-months) | 2229 (define-key map [prior] 'calendar-scroll-right-three-months) |
2230 (define-key map "\ev" 'scroll-calendar-right-three-months) | 2230 (define-key map "\ev" 'calendar-scroll-right-three-months) |
2231 (define-key map ">" 'scroll-calendar-left) | 2231 (define-key map ">" 'calendar-scroll-left) |
2232 (define-key map "\C-x>" 'scroll-calendar-left) | 2232 (define-key map "\C-x>" 'calendar-scroll-left) |
2233 (define-key map [next] 'scroll-calendar-left-three-months) | 2233 (define-key map [next] 'calendar-scroll-left-three-months) |
2234 (define-key map "\C-v" 'scroll-calendar-left-three-months) | 2234 (define-key map "\C-v" 'calendar-scroll-left-three-months) |
2235 (define-key map "\C-b" 'calendar-backward-day) | 2235 (define-key map "\C-b" 'calendar-backward-day) |
2236 (define-key map "\C-p" 'calendar-backward-week) | 2236 (define-key map "\C-p" 'calendar-backward-week) |
2237 (define-key map "\e{" 'calendar-backward-month) | 2237 (define-key map "\e{" 'calendar-backward-month) |
2238 (define-key map "\C-x[" 'calendar-backward-year) | 2238 (define-key map "\C-x[" 'calendar-backward-year) |
2239 (define-key map "\C-f" 'calendar-forward-day) | 2239 (define-key map "\C-f" 'calendar-forward-day) |
2381 (list | 2381 (list |
2382 (propertize "<" | 2382 (propertize "<" |
2383 'help-echo "mouse-1: previous month" | 2383 'help-echo "mouse-1: previous month" |
2384 'mouse-face 'mode-line-highlight | 2384 'mouse-face 'mode-line-highlight |
2385 'keymap (make-mode-line-mouse-map 'mouse-1 | 2385 'keymap (make-mode-line-mouse-map 'mouse-1 |
2386 'mouse-scroll-calendar-right)) | 2386 'calendar-scroll-right)) |
2387 "Calendar" | 2387 "Calendar" |
2388 (concat | 2388 (concat |
2389 (propertize | 2389 (propertize |
2390 (substitute-command-keys | 2390 (substitute-command-keys |
2391 "\\<calendar-mode-map>\\[calendar-goto-info-node] info") | 2391 "\\<calendar-mode-map>\\[calendar-goto-info-node] info") |
2410 '(calendar-date-string (calendar-current-date) t) | 2410 '(calendar-date-string (calendar-current-date) t) |
2411 (propertize ">" | 2411 (propertize ">" |
2412 'help-echo "mouse-1: next month" | 2412 'help-echo "mouse-1: next month" |
2413 'mouse-face 'mode-line-highlight | 2413 'mouse-face 'mode-line-highlight |
2414 'keymap (make-mode-line-mouse-map | 2414 'keymap (make-mode-line-mouse-map |
2415 'mouse-1 'mouse-scroll-calendar-left))) | 2415 'mouse-1 'calendar-scroll-left))) |
2416 "The mode line of the calendar buffer. | 2416 "The mode line of the calendar buffer. |
2417 | 2417 |
2418 This must be a list of items that evaluate to strings--those strings are | 2418 This must be a list of items that evaluate to strings--those strings are |
2419 evaluated and concatenated together, evenly separated by blanks. The variable | 2419 evaluated and concatenated together, evenly separated by blanks. The variable |
2420 `date' is available for use as the date under (or near) the cursor; `date' | 2420 `date' is available for use as the date under (or near) the cursor; `date' |
2436 (iso-date (calendar-iso-from-absolute d))) | 2436 (iso-date (calendar-iso-from-absolute d))) |
2437 (format \"ISO week %d of %d\" | 2437 (format \"ISO week %d of %d\" |
2438 (extract-calendar-month iso-date) | 2438 (extract-calendar-month iso-date) |
2439 (extract-calendar-year iso-date))) | 2439 (extract-calendar-year iso-date))) |
2440 \"\"))") | 2440 \"\"))") |
2441 | |
2442 (defun mouse-scroll-calendar-left (event) | |
2443 "Scroll the displayed calendar left by one month. | |
2444 Maintains the relative position of the cursor | |
2445 with respect to the calendar as well as possible." | |
2446 (interactive "e") | |
2447 (save-selected-window | |
2448 (select-window (posn-window (event-start event))) | |
2449 (scroll-calendar-left 1))) | |
2450 | |
2451 (defun mouse-scroll-calendar-right (event) | |
2452 "Scroll the displayed calendar right by one month. | |
2453 Maintains the relative position of the cursor | |
2454 with respect to the calendar as well as possible." | |
2455 (interactive "e") | |
2456 (save-selected-window | |
2457 (select-window (posn-window (event-start event))) | |
2458 (scroll-calendar-right 1))) | |
2459 | 2441 |
2460 (defun mouse-calendar-other-month (event) | 2442 (defun mouse-calendar-other-month (event) |
2461 "Display a three-month calendar centered around a specified month and year." | 2443 "Display a three-month calendar centered around a specified month and year." |
2462 (interactive "e") | 2444 (interactive "e") |
2463 (save-selected-window | 2445 (save-selected-window |