bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patch for Chinese Mid-Autumn Festival


From: Ben Wong
Subject: Re: Patch for Chinese Mid-Autumn Festival
Date: Tue, 19 Sep 2006 22:04:16 -0700

Oops. Here it is inline.

--- lisp/calendar/cal-china.el.orig     2001-07-16 00:46:48.000000000 -0700
+++ lisp/calendar/cal-china.el  2006-09-18 23:45:01.000000000 -0700
@@ -374,6 +374,15 @@
                 (format "Chinese New Year (%s)"
                         (calendar-chinese-sexagesimal-name (+ y 57))))))))))

+(defun holiday-mid-autumn-festival ()
+  "Date of Chinese Mid-Autumn (Harvest Moon) Festival."
+    (let ((moon-festival               ; 15th day of 8th lunar month
+          (calendar-gregorian-from-absolute
+           (+ (car (cdr (assoc 8 (chinese-year displayed-year)))) 14))))
+      (if (calendar-date-is-visible-p moon-festival)
+          (list (list moon-festival "Chinese Mid-Autumn Festival")))))
+
+
(defun calendar-chinese-date-string (&optional date)
  "String of Chinese date of Gregorian DATE.
Defaults to today's date if DATE is not given."
--- lisp/calendar/holidays.el.orig      2001-05-09 08:11:07.000000000 -0700
+++ lisp/calendar/holidays.el   2006-09-18 23:45:03.000000000 -0700
@@ -85,6 +85,10 @@
  "Date of Chinese New Year."
  t)

+(autoload 'holiday-mid-autumn-festival "cal-china"
+  "Date of Chinese Mid-Autumn (Harvest Moon) Festival."
+  t)
+
(autoload 'solar-equinoxes-solstices "solar"
  "Date and time of equinoxes and solstices, if visible in the calendar window.
Requires floating point."
--- lisp/calendar/calendar.el.orig      2003-01-29 00:12:34.000000000 -0800
+++ lisp/calendar/calendar.el   2006-09-19 03:00:35.000000000 -0700
@@ -819,7 +819,9 @@
;;;###autoload
(defcustom oriental-holidays
  '((if (fboundp 'atan)
-       (holiday-chinese-new-year)))
+       (holiday-chinese-new-year))
+    (if (fboundp 'atan)
+       (holiday-mid-autumn-festival)))
  "*Oriental holidays.
See the documentation for `calendar-holidays' for details."
  :type 'sexp



On 9/19/06, Glenn Morris <rgm@gnu.org> wrote:
"Ben Wong" wrote:

> There is at least one other very major Chinese holiday which GNU
> emacs should know about: the Mid-Autumn Festival. The changes needed
> to support it are fairly trivial and are included in the attached
> patch.

Umm, no patch seems to be attached...

Maybe send it again, but as inline text rather than an attachment?






reply via email to

[Prev in Thread] Current Thread [Next in Thread]