From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Ben Wong" Newsgroups: gmane.emacs.bugs Subject: Re: Patch for Chinese Mid-Autumn Festival Date: Tue, 19 Sep 2006 22:04:16 -0700 Message-ID: <47e8c68d0609192204i50223e8p9b76943ebe46d20c@mail.gmail.com> References: <47e8c68d0609190347j6189ae05q5adc10cdea6f4089@mail.gmail.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1158728674 28478 80.91.229.2 (20 Sep 2006 05:04:34 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 20 Sep 2006 05:04:34 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Sep 20 07:04:33 2006 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GPuG0-0001TZ-3V for geb-bug-gnu-emacs@m.gmane.org; Wed, 20 Sep 2006 07:04:24 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GPuFz-0007Lm-NI for geb-bug-gnu-emacs@m.gmane.org; Wed, 20 Sep 2006 01:04:23 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GPuFw-0007Jz-0V for bug-gnu-emacs@gnu.org; Wed, 20 Sep 2006 01:04:20 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GPuFu-0007Hs-BM for bug-gnu-emacs@gnu.org; Wed, 20 Sep 2006 01:04:19 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GPuFu-0007Hp-0l for bug-gnu-emacs@gnu.org; Wed, 20 Sep 2006 01:04:18 -0400 Original-Received: from [64.233.166.179] (helo=py-out-1112.google.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GPuJ7-0001zx-Au for bug-gnu-emacs@gnu.org; Wed, 20 Sep 2006 01:07:37 -0400 Original-Received: by py-out-1112.google.com with SMTP id d42so123727pyd for ; Tue, 19 Sep 2006 22:04:17 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=qRJtzNrcp16T3o3hMzi2R19kHt/LCQ3Ne+ofr+Vsm60bre/AzRzsAvXHd4g6hNAWd3NKjdMldm7sbPRoGNgM5cufRegVJA3TVtsdRWC4eZ4bFe1Y09JvTFZv6GzymbcD+RfLDzuzXa4b88ircBFreB0kZbAgojsIIG/RdJdHE14= Original-Received: by 10.35.69.11 with SMTP id w11mr27677427pyk; Tue, 19 Sep 2006 22:04:17 -0700 (PDT) Original-Received: by 10.35.110.19 with HTTP; Tue, 19 Sep 2006 22:04:16 -0700 (PDT) Original-To: bug-gnu-emacs@gnu.org In-Reply-To: Content-Disposition: inline X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:15337 Archived-At: 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 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? > >