emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/calendar/cal-china.el,v


From: Glenn Morris
Subject: [Emacs-diffs] Changes to emacs/lisp/calendar/cal-china.el,v
Date: Sat, 08 Mar 2008 03:39:49 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Glenn Morris <gm>       08/03/08 03:39:49

Index: cal-china.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/calendar/cal-china.el,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -b -r1.29 -r1.30
--- cal-china.el        7 Mar 2008 04:41:58 -0000       1.29
+++ cal-china.el        8 Mar 2008 03:39:49 -0000       1.30
@@ -51,11 +51,9 @@
 
 (require 'lunar)
 
-(defvar chinese-calendar-celestial-stem
-  ["Jia" "Yi" "Bing" "Ding" "Wu" "Ji" "Geng" "Xin" "Ren" "Gui"])
-
-(defvar chinese-calendar-terrestrial-branch
-  ["Zi" "Chou" "Yin" "Mao" "Chen" "Si" "Wu" "Wei" "Shen" "You" "Xu" "Hai"])
+(defgroup chinese-calendar nil
+  "Chinese calendar support."
+  :group 'calendar)
 
 (defcustom chinese-calendar-time-zone
   '(if (< year 1928)
@@ -131,6 +129,15 @@
   :type 'integer
   :group 'chinese-calendar)
 
+;;; End of user options.
+
+
+(defconst chinese-calendar-celestial-stem
+  ["Jia" "Yi" "Bing" "Ding" "Wu" "Ji" "Geng" "Xin" "Ren" "Gui"])
+
+(defconst chinese-calendar-terrestrial-branch
+  ["Zi" "Chou" "Yin" "Mao" "Chen" "Si" "Wu" "Wei" "Shen" "You" "Xu" "Hai"])
+
 (defun chinese-zodiac-sign-on-or-after (d)
   "Absolute date of first new Zodiac sign on or after absolute date d.
 The Zodiac signs begin when the sun's longitude is a multiple of 30 degrees."
@@ -374,6 +381,7 @@
                  (format "Chinese New Year (%s)"
                          (calendar-chinese-sexagesimal-name (+ y 57))))))))))
 
+;;;###autoload
 (defun calendar-chinese-date-string (&optional date)
   "String of Chinese date of Gregorian DATE.
 Defaults to today's date if DATE is not given."
@@ -415,6 +423,7 @@
           (aref chinese-calendar-celestial-stem (% (1- n) 10))
           (aref chinese-calendar-terrestrial-branch (% (1- n) 12))))
 
+;;;###autoload
 (defun calendar-print-chinese-date ()
   "Show the Chinese date equivalents of date."
   (interactive)
@@ -422,6 +431,7 @@
   (message "Chinese date: %s"
            (calendar-chinese-date-string (calendar-cursor-to-date t))))
 
+;;;###autoload
 (defun calendar-goto-chinese-date (date &optional noecho)
   "Move cursor to Chinese date DATE.
 Echo Chinese date unless NOECHO is t."
@@ -431,11 +441,11 @@
                (calendar-current-date))))
           (cycle (calendar-read
                   "Chinese calendar cycle number (>44): "
-                  '(lambda (x) (> x 44))
+                  (lambda (x) (> x 44))
                   (int-to-string (car c))))
           (year (calendar-read
                  "Year in Chinese cycle (1..60): "
-                 '(lambda (x) (and (<= 1 x) (<= x 60)))
+                 (lambda (x) (and (<= 1 x) (<= x 60)))
                  (int-to-string (car (cdr c)))))
           (month-list (make-chinese-month-assoc-list
                        (chinese-months cycle year)))
@@ -453,7 +463,7 @@
                   29))
           (day (calendar-read
                 (format "Chinese calendar day (1-%d): " last)
-                '(lambda (x) (and (<= 1 x) (<= x last))))))
+                (lambda (x) (and (<= 1 x) (<= x last))))))
      (list (list cycle year month day))))
   (calendar-goto-date (calendar-gregorian-from-absolute
                        (calendar-absolute-from-chinese date)))
@@ -462,13 +472,13 @@
 (defun chinese-months (c y)
   "A list of the months in cycle C, year Y of the Chinese calendar."
   (let* ((l (memq 1 (append
-                     (mapcar '(lambda (x)
+                     (mapcar (lambda (x)
                                 (car x))
                              (chinese-year (extract-calendar-year
                                             (calendar-gregorian-from-absolute
                                              (calendar-absolute-from-chinese
                                               (list c y 1 1))))))
-                     (mapcar '(lambda (x)
+                     (mapcar (lambda (x)
                                 (if (> (car x) 11) (car x)))
                              (chinese-year (extract-calendar-year
                                             (calendar-gregorian-from-absolute
@@ -498,5 +508,9 @@
 
 (provide 'cal-china)
 
-;;; arch-tag: 7e5b7e0d-676c-47e3-8696-93e7ea0ab644
+;; Local Variables:
+;; generated-autoload-file: "cal-loaddefs.el"
+;; End:
+
+;; arch-tag: 7e5b7e0d-676c-47e3-8696-93e7ea0ab644
 ;;; cal-china.el ends here




reply via email to

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