Mercurial > emacs
changeset 92967:4151ef80cb37
(number-chinese-months, calendar-chinese-from-absolute): Use nth, caar.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Sat, 15 Mar 2008 02:59:15 +0000 |
parents | 446f7aee7bf1 |
children | e2f0046a8cb4 |
files | lisp/calendar/cal-china.el |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/calendar/cal-china.el Sat Mar 15 02:58:39 2008 +0000 +++ b/lisp/calendar/cal-china.el Sat Mar 15 02:59:15 2008 +0000 @@ -212,7 +212,7 @@ ;; List is too short for a leap month. (number-chinese-months (cdr list) (1+ start)) (if (and (cddr list) ; at least two more months... - (<= (car (cddr list)) + (<= (nth 2 list) (chinese-zodiac-sign-on-or-after (cadr list)))) ;; Next month is a leap month. (cons (list (+ start 0.5) (cadr list)) @@ -371,18 +371,18 @@ (list (append (chinese-year (1- g-year)) (chinese-year g-year) (chinese-year (1+ g-year))))) - (while (<= (car (cdr (car (cdr list)))) date) + (while (<= (cadr (cadr list)) date) ;; The first month on the list is in Chinese year c-year. ;; Date is on or after start of second month on list... - (if (= 1 (car (car (cdr list)))) + (if (= 1 (caar (cdr list))) ;; Second month on list is a new Chinese year... (setq c-year (1+ c-year))) ;; ...so first month on list is of no interest. (setq list (cdr list))) (list (/ (1- c-year) 60) (calendar-mod c-year 60) - (car (car list)) - (1+ (- date (car (cdr (car list)))))))) + (caar list) + (1+ (- date (cadr (car list))))))) ;; Bound in generate-calendar. (defvar displayed-month)