all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ben Wong" <benjamin.a.wong@gmail.com>
Subject: Re: Patch for Chinese Mid-Autumn Festival
Date: Tue, 19 Sep 2006 22:04:16 -0700	[thread overview]
Message-ID: <47e8c68d0609192204i50223e8p9b76943ebe46d20c@mail.gmail.com> (raw)
In-Reply-To: <xyd59rqour.fsf@fencepost.gnu.org>

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	other threads:[~2006-09-20  5:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-19 10:47 Patch for Chinese Mid-Autumn Festival Ben Wong
2006-09-20  2:00 ` Glenn Morris
2006-09-20  5:04   ` Ben Wong [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47e8c68d0609192204i50223e8p9b76943ebe46d20c@mail.gmail.com \
    --to=benjamin.a.wong@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.