diff options
| author | Leo Liu | 2014-05-04 08:16:58 +0800 |
|---|---|---|
| committer | Leo Liu | 2014-05-04 08:16:58 +0800 |
| commit | bbdcf64f499636ba9567e8fed8f209e06380352c (patch) | |
| tree | 36f63f7f60f4b8972576b843b1354244e7f82f5f /doc | |
| parent | c3a435feddf2e1c1e74e41a05d4dd8a59bc766b0 (diff) | |
| download | emacs-bbdcf64f499636ba9567e8fed8f209e06380352c.tar.gz emacs-bbdcf64f499636ba9567e8fed8f209e06380352c.zip | |
Support Chinese diary entries in calendar and diary
* doc/emacs/cal-xtra.texi (Non-Gregorian Diary): Document new features for
Chinese calendar and diary.
* etc/NEWS: Mention support for Chinese dates in calendar and diary.
* lisp/calendar/cal-china.el (calendar-chinese-month-name-array): New var.
(calendar-chinese-from-absolute-for-diary)
(calendar-chinese-to-absolute-for-diary)
(calendar-chinese-mark-date-pattern, diary-chinese-mark-entries)
(diary-chinese-list-entries): New functions to list and mark
Chinese diary entries in the calendar window.
(diary-chinese-anniversary)
(diary-chinese-insert-anniversary-entry)
(diary-chinese-insert-entry, diary-chinese-insert-monthly-entry)
(diary-chinese-insert-yearly-entry): New commands to insert
Chinese diary entries.
* lisp/calendar/cal-menu.el (cal-menu-diary-menu): Add entries for
inserting Chinese diary entries.
* lisp/calendar/calendar.el (diary-chinese-entry-symbol): New
customizable variable.
(calendar-mode-map): Add bindings for inserting Chinese diary
entries.
* lisp/calendar/diary-lib.el (diary-font-lock-keywords): Support
font-locking Chinese dates.
Fixes: debbugs:17393
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/emacs/ChangeLog | 5 | ||||
| -rw-r--r-- | doc/emacs/cal-xtra.texi | 30 |
2 files changed, 29 insertions, 6 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index d7fa9c66729..46eee3c31a9 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2014-05-04 Leo Liu <sdl.web@gmail.com> | ||
| 2 | |||
| 3 | * cal-xtra.texi (Non-Gregorian Diary): Document new features for | ||
| 4 | Chinese calendar and diary. | ||
| 5 | |||
| 1 | 2014-04-30 Eli Zaretskii <eliz@gnu.org> | 6 | 2014-04-30 Eli Zaretskii <eliz@gnu.org> |
| 2 | 7 | ||
| 3 | * trouble.texi (Quitting, DEL Does Not Delete, Emergency Escape) | 8 | * trouble.texi (Quitting, DEL Does Not Delete, Emergency Escape) |
diff --git a/doc/emacs/cal-xtra.texi b/doc/emacs/cal-xtra.texi index 82864859473..cf1eba17dec 100644 --- a/doc/emacs/cal-xtra.texi +++ b/doc/emacs/cal-xtra.texi | |||
| @@ -517,7 +517,7 @@ the fourth pattern. | |||
| 517 | @subsection Diary Entries Using non-Gregorian Calendars | 517 | @subsection Diary Entries Using non-Gregorian Calendars |
| 518 | 518 | ||
| 519 | As well as entries based on the standard Gregorian calendar, your | 519 | As well as entries based on the standard Gregorian calendar, your |
| 520 | diary can have entries based on Bahá'í, Hebrew, or Islamic dates. | 520 | diary can have entries based on Bahá'í, Chinese, Hebrew, or Islamic dates. |
| 521 | Recognition of such entries can be time-consuming, however, and since | 521 | Recognition of such entries can be time-consuming, however, and since |
| 522 | most people don't use them, you must explicitly enable their use. If | 522 | most people don't use them, you must explicitly enable their use. If |
| 523 | you want the diary to recognize Hebrew-date diary entries, for example, | 523 | you want the diary to recognize Hebrew-date diary entries, for example, |
| @@ -531,22 +531,27 @@ you must do this: | |||
| 531 | @findex diary-islamic-mark-entries | 531 | @findex diary-islamic-mark-entries |
| 532 | @findex diary-bahai-list-entries | 532 | @findex diary-bahai-list-entries |
| 533 | @findex diary-bahai-mark-entries | 533 | @findex diary-bahai-mark-entries |
| 534 | @findex diary-chinese-list-entries | ||
| 535 | @findex diary-chinese-mark-entries | ||
| 534 | @smallexample | 536 | @smallexample |
| 535 | (add-hook 'diary-nongregorian-listing-hook 'diary-hebrew-list-entries) | 537 | (add-hook 'diary-nongregorian-listing-hook 'diary-hebrew-list-entries) |
| 536 | (add-hook 'diary-nongregorian-marking-hook 'diary-hebrew-mark-entries) | 538 | (add-hook 'diary-nongregorian-marking-hook 'diary-hebrew-mark-entries) |
| 537 | @end smallexample | 539 | @end smallexample |
| 538 | 540 | ||
| 539 | @noindent | 541 | @noindent |
| 540 | Similarly, for Islamic and Bahá'í entries, add | 542 | Similarly, for Islamic, Bahá'í and Chinese entries, add |
| 541 | @code{diary-islamic-list-entries} and @code{diary-islamic-mark-entries}, or | 543 | @code{diary-islamic-list-entries} and @code{diary-islamic-mark-entries}, |
| 542 | @code{diary-bahai-list-entries} and @code{diary-bahai-mark-entries}. | 544 | @code{diary-bahai-list-entries} and @code{diary-bahai-mark-entries}, |
| 545 | or @code{diary-chinese-list-entries} and @code{diary-chinese-mark-entries}. | ||
| 543 | 546 | ||
| 544 | @vindex diary-bahai-entry-symbol | 547 | @vindex diary-bahai-entry-symbol |
| 548 | @vindex diary-chinese-entry-symbol | ||
| 545 | @vindex diary-hebrew-entry-symbol | 549 | @vindex diary-hebrew-entry-symbol |
| 546 | @vindex diary-islamic-entry-symbol | 550 | @vindex diary-islamic-entry-symbol |
| 547 | These diary entries have the same formats as Gregorian-date diary | 551 | These diary entries have the same formats as Gregorian-date diary |
| 548 | entries; except that @code{diary-bahai-entry-symbol} (default @samp{B}) | 552 | entries; except that @code{diary-bahai-entry-symbol} (default @samp{B}) |
| 549 | must precede a Bahá'í date, @code{diary-hebrew-entry-symbol} (default | 553 | must precede a Bahá'í date, @code{diary-chinese-entry-symbol} (default |
| 554 | @samp{C}) a Chinese date, @code{diary-hebrew-entry-symbol} (default | ||
| 550 | @samp{H}) a Hebrew date, and @code{diary-islamic-entry-symbol} (default | 555 | @samp{H}) a Hebrew date, and @code{diary-islamic-entry-symbol} (default |
| 551 | @samp{I}) an Islamic date. Moreover, non-Gregorian month names may not | 556 | @samp{I}) an Islamic date. Moreover, non-Gregorian month names may not |
| 552 | be abbreviated (because the first three letters are often not unique). | 557 | be abbreviated (because the first three letters are often not unique). |
| @@ -573,7 +578,7 @@ nonmarking if preceded by @code{diary-nonmarking-symbol} (default | |||
| 573 | 578 | ||
| 574 | Here is a table of commands used in the calendar to create diary | 579 | Here is a table of commands used in the calendar to create diary |
| 575 | entries that match the selected date and other dates that are similar in | 580 | entries that match the selected date and other dates that are similar in |
| 576 | the Bahá'í, Hebrew, or Islamic calendars: | 581 | the Bahá'í, Chinese, Hebrew, or Islamic calendars: |
| 577 | 582 | ||
| 578 | @table @kbd | 583 | @table @kbd |
| 579 | @item i h d | 584 | @item i h d |
| @@ -594,6 +599,14 @@ the Bahá'í, Hebrew, or Islamic calendars: | |||
| 594 | @code{diary-bahai-insert-monthly-entry} | 599 | @code{diary-bahai-insert-monthly-entry} |
| 595 | @item i B y | 600 | @item i B y |
| 596 | @code{diary-bahai-insert-yearly-entry} | 601 | @code{diary-bahai-insert-yearly-entry} |
| 602 | @item i C d | ||
| 603 | @code{diary-chinese-insert-entry} | ||
| 604 | @item i C m | ||
| 605 | @code{diary-chinese-insert-monthly-entry} | ||
| 606 | @item i C y | ||
| 607 | @code{diary-chinese-insert-yearly-entry} | ||
| 608 | @item i C a | ||
| 609 | @code{diary-chinese-insert-anniversary-entry} | ||
| 597 | @end table | 610 | @end table |
| 598 | 611 | ||
| 599 | @findex diary-hebrew-insert-entry | 612 | @findex diary-hebrew-insert-entry |
| @@ -605,6 +618,11 @@ the Bahá'í, Hebrew, or Islamic calendars: | |||
| 605 | @findex diary-bahai-insert-entry | 618 | @findex diary-bahai-insert-entry |
| 606 | @findex diary-bahai-insert-monthly-entry | 619 | @findex diary-bahai-insert-monthly-entry |
| 607 | @findex diary-bahai-insert-yearly-entry | 620 | @findex diary-bahai-insert-yearly-entry |
| 621 | @findex diary-chinese-insert-entry | ||
| 622 | @findex diary-chinese-insert-monthly-entry | ||
| 623 | @findex diary-chinese-insert-yearly-entry | ||
| 624 | @findex diary-chinese-insert-anniversary-entry | ||
| 625 | |||
| 608 | These commands work much like the corresponding commands for ordinary | 626 | These commands work much like the corresponding commands for ordinary |
| 609 | diary entries: they apply to the date that point is on in the calendar | 627 | diary entries: they apply to the date that point is on in the calendar |
| 610 | window, and what they do is insert just the date portion of a diary | 628 | window, and what they do is insert just the date portion of a diary |