Mercurial > emacs
comparison lisp/calendar/calendar.el @ 74851:4b70fa58f083
(calendar-mode-map): Switch < and >.
(calendar-mode-line-format): Use mouse-1 bindings, and tweak formatting.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Sat, 23 Dec 2006 19:07:12 +0000 |
parents | 099deb7b2cbd |
children | 7a3f13e2dd57 bc10a33dd40b |
comparison
equal
deleted
inserted
replaced
74850:c775c3d9b89a | 74851:4b70fa58f083 |
---|---|
2197 (dolist (c '(narrow-to-region mark-word mark-sexp mark-paragraph | 2197 (dolist (c '(narrow-to-region mark-word mark-sexp mark-paragraph |
2198 mark-defun mark-whole-buffer mark-page | 2198 mark-defun mark-whole-buffer mark-page |
2199 downcase-region upcase-region kill-region | 2199 downcase-region upcase-region kill-region |
2200 copy-region-as-kill capitalize-region write-region)) | 2200 copy-region-as-kill capitalize-region write-region)) |
2201 (define-key map (vector 'remap c) 'calendar-not-implemented)) | 2201 (define-key map (vector 'remap c) 'calendar-not-implemented)) |
2202 (define-key map ">" 'scroll-calendar-right) | 2202 (define-key map "<" 'scroll-calendar-right) |
2203 (define-key map "\C-x>" 'scroll-calendar-right) | 2203 (define-key map "\C-x<" 'scroll-calendar-right) |
2204 (define-key map [prior] 'scroll-calendar-right-three-months) | 2204 (define-key map [prior] 'scroll-calendar-right-three-months) |
2205 (define-key map "\ev" 'scroll-calendar-right-three-months) | 2205 (define-key map "\ev" 'scroll-calendar-right-three-months) |
2206 (define-key map "<" 'scroll-calendar-left) | 2206 (define-key map ">" 'scroll-calendar-left) |
2207 (define-key map "\C-x<" 'scroll-calendar-left) | 2207 (define-key map "\C-x>" 'scroll-calendar-left) |
2208 (define-key map [next] 'scroll-calendar-left-three-months) | 2208 (define-key map [next] 'scroll-calendar-left-three-months) |
2209 (define-key map "\C-v" 'scroll-calendar-left-three-months) | 2209 (define-key map "\C-v" 'scroll-calendar-left-three-months) |
2210 (define-key map "\C-b" 'calendar-backward-day) | 2210 (define-key map "\C-b" 'calendar-backward-day) |
2211 (define-key map "\C-p" 'calendar-backward-week) | 2211 (define-key map "\C-p" 'calendar-backward-week) |
2212 (define-key map "\e{" 'calendar-backward-month) | 2212 (define-key map "\e{" 'calendar-backward-month) |
2335 ;; Calendar mode is suitable only for specially formatted data. | 2335 ;; Calendar mode is suitable only for specially formatted data. |
2336 (put 'calendar-mode 'mode-class 'special) | 2336 (put 'calendar-mode 'mode-class 'special) |
2337 | 2337 |
2338 (defvar calendar-mode-line-format | 2338 (defvar calendar-mode-line-format |
2339 (list | 2339 (list |
2340 (propertize (substitute-command-keys | 2340 (propertize "<" |
2341 "\\<calendar-mode-map>\\[scroll-calendar-left]") | 2341 'help-echo "mouse-1: previous month" |
2342 'help-echo "mouse-2: scroll left" | |
2343 'mouse-face 'mode-line-highlight | 2342 'mouse-face 'mode-line-highlight |
2344 'keymap (make-mode-line-mouse-map 'mouse-2 | 2343 'keymap (make-mode-line-mouse-map 'mouse-1 |
2345 'mouse-scroll-calendar-left)) | 2344 'mouse-scroll-calendar-right)) |
2346 "Calendar" | 2345 "Calendar" |
2347 (concat | 2346 (concat |
2348 (propertize | 2347 (propertize |
2349 (substitute-command-keys | 2348 (substitute-command-keys |
2350 "\\<calendar-mode-map>\\[calendar-goto-info-node] info") | 2349 "\\<calendar-mode-map>\\[calendar-goto-info-node] info") |
2351 'help-echo "mouse-2: read Info on Calendar" | 2350 'help-echo "mouse-1: read Info on Calendar" |
2352 'mouse-face 'mode-line-highlight | 2351 'mouse-face 'mode-line-highlight |
2353 'keymap (make-mode-line-mouse-map 'mouse-2 'calendar-goto-info-node)) | 2352 'keymap (make-mode-line-mouse-map 'mouse-1 'calendar-goto-info-node)) |
2354 "/" | 2353 " / " |
2355 (propertize | 2354 (propertize |
2356 (substitute-command-keys | 2355 (substitute-command-keys |
2357 "\\<calendar-mode-map>\\[calendar-other-month] other") | 2356 " \\<calendar-mode-map>\\[calendar-other-month] other") |
2358 'help-echo "mouse-2: choose another month" | 2357 'help-echo "mouse-1: choose another month" |
2359 'mouse-face 'mode-line-highlight | 2358 'mouse-face 'mode-line-highlight |
2360 'keymap (make-mode-line-mouse-map | 2359 'keymap (make-mode-line-mouse-map |
2361 'mouse-2 'mouse-calendar-other-month)) | 2360 'mouse-1 'mouse-calendar-other-month)) |
2362 "/" | 2361 " / " |
2363 (propertize | 2362 (propertize |
2364 (substitute-command-keys | 2363 (substitute-command-keys |
2365 "\\<calendar-mode-map>\\[calendar-goto-today] today") | 2364 "\\<calendar-mode-map>\\[calendar-goto-today] today") |
2366 'help-echo "mouse-2: go to today's date" | 2365 'help-echo "mouse-1: go to today's date" |
2367 'mouse-face 'mode-line-highlight | 2366 'mouse-face 'mode-line-highlight |
2368 'keymap (make-mode-line-mouse-map 'mouse-2 #'calendar-goto-today))) | 2367 'keymap (make-mode-line-mouse-map 'mouse-1 #'calendar-goto-today))) |
2369 '(calendar-date-string (calendar-current-date) t) | 2368 '(calendar-date-string (calendar-current-date) t) |
2370 (propertize (substitute-command-keys | 2369 (propertize ">" |
2371 "\\<calendar-mode-map>\\[scroll-calendar-right]") | 2370 'help-echo "mouse-1: next month" |
2372 'help-echo "mouse-2: scroll right" | |
2373 'mouse-face 'mode-line-highlight | 2371 'mouse-face 'mode-line-highlight |
2374 'keymap (make-mode-line-mouse-map | 2372 'keymap (make-mode-line-mouse-map |
2375 'mouse-2 'mouse-scroll-calendar-right))) | 2373 'mouse-1 'mouse-scroll-calendar-left))) |
2376 "The mode line of the calendar buffer. | 2374 "The mode line of the calendar buffer. |
2377 | 2375 |
2378 This must be a list of items that evaluate to strings--those strings are | 2376 This must be a list of items that evaluate to strings--those strings are |
2379 evaluated and concatenated together, evenly separated by blanks. The variable | 2377 evaluated and concatenated together, evenly separated by blanks. The variable |
2380 `date' is available for use as the date under (or near) the cursor; `date' | 2378 `date' is available for use as the date under (or near) the cursor; `date' |