diff options
| author | Glenn Morris | 2008-03-15 02:59:15 +0000 |
|---|---|---|
| committer | Glenn Morris | 2008-03-15 02:59:15 +0000 |
| commit | 706531d9fa9eaf35e7188c1718f338e14cf5c340 (patch) | |
| tree | 259ad9dbdb4ab854c62e44b59516f17916ce7166 | |
| parent | cc7fff4f6498861cb732baff25d663c1ae389712 (diff) | |
| download | emacs-706531d9fa9eaf35e7188c1718f338e14cf5c340.tar.gz emacs-706531d9fa9eaf35e7188c1718f338e14cf5c340.zip | |
(number-chinese-months, calendar-chinese-from-absolute): Use nth, caar.
| -rw-r--r-- | lisp/calendar/cal-china.el | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lisp/calendar/cal-china.el b/lisp/calendar/cal-china.el index 5581348baef..f66645e918b 100644 --- a/lisp/calendar/cal-china.el +++ b/lisp/calendar/cal-china.el | |||
| @@ -212,7 +212,7 @@ are never leap months." | |||
| 212 | ;; List is too short for a leap month. | 212 | ;; List is too short for a leap month. |
| 213 | (number-chinese-months (cdr list) (1+ start)) | 213 | (number-chinese-months (cdr list) (1+ start)) |
| 214 | (if (and (cddr list) ; at least two more months... | 214 | (if (and (cddr list) ; at least two more months... |
| 215 | (<= (car (cddr list)) | 215 | (<= (nth 2 list) |
| 216 | (chinese-zodiac-sign-on-or-after (cadr list)))) | 216 | (chinese-zodiac-sign-on-or-after (cadr list)))) |
| 217 | ;; Next month is a leap month. | 217 | ;; Next month is a leap month. |
| 218 | (cons (list (+ start 0.5) (cadr list)) | 218 | (cons (list (+ start 0.5) (cadr list)) |
| @@ -371,18 +371,18 @@ Gregorian date Sunday, December 31, 1 BC." | |||
| 371 | (list (append (chinese-year (1- g-year)) | 371 | (list (append (chinese-year (1- g-year)) |
| 372 | (chinese-year g-year) | 372 | (chinese-year g-year) |
| 373 | (chinese-year (1+ g-year))))) | 373 | (chinese-year (1+ g-year))))) |
| 374 | (while (<= (car (cdr (car (cdr list)))) date) | 374 | (while (<= (cadr (cadr list)) date) |
| 375 | ;; The first month on the list is in Chinese year c-year. | 375 | ;; The first month on the list is in Chinese year c-year. |
| 376 | ;; Date is on or after start of second month on list... | 376 | ;; Date is on or after start of second month on list... |
| 377 | (if (= 1 (car (car (cdr list)))) | 377 | (if (= 1 (caar (cdr list))) |
| 378 | ;; Second month on list is a new Chinese year... | 378 | ;; Second month on list is a new Chinese year... |
| 379 | (setq c-year (1+ c-year))) | 379 | (setq c-year (1+ c-year))) |
| 380 | ;; ...so first month on list is of no interest. | 380 | ;; ...so first month on list is of no interest. |
| 381 | (setq list (cdr list))) | 381 | (setq list (cdr list))) |
| 382 | (list (/ (1- c-year) 60) | 382 | (list (/ (1- c-year) 60) |
| 383 | (calendar-mod c-year 60) | 383 | (calendar-mod c-year 60) |
| 384 | (car (car list)) | 384 | (caar list) |
| 385 | (1+ (- date (car (cdr (car list)))))))) | 385 | (1+ (- date (cadr (car list))))))) |
| 386 | 386 | ||
| 387 | ;; Bound in generate-calendar. | 387 | ;; Bound in generate-calendar. |
| 388 | (defvar displayed-month) | 388 | (defvar displayed-month) |