aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/calendar/cal-mayan.el20
2 files changed, 16 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 3dbfdb43f6b..f5f4de05570 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -32,6 +32,12 @@
32 32
33 * calendar/cal-iso.el (calendar-iso-read-args): Doc fix. 33 * calendar/cal-iso.el (calendar-iso-read-args): Doc fix.
34 34
35 * calendar/cal-mayan.el (calendar-string-to-mayan-long-count)
36 (calendar-mayan-haab-to-string, calendar-mayan-tzolkin-to-string)
37 (calendar-read-mayan-haab-date, calendar-read-mayan-tzolkin-date)
38 (calendar-next-calendar-round-date)
39 (calendar-mayan-long-count-common-era): Doc fixes.
40
35 * calendar/cal-move.el (calendar-scroll-left, calendar-scroll-right): 41 * calendar/cal-move.el (calendar-scroll-left, calendar-scroll-right):
36 Doc fix. 42 Doc fix.
37 43
diff --git a/lisp/calendar/cal-mayan.el b/lisp/calendar/cal-mayan.el
index b3ed1c89887..8efb5c2581a 100644
--- a/lisp/calendar/cal-mayan.el
+++ b/lisp/calendar/cal-mayan.el
@@ -93,7 +93,7 @@ but some use 1137140. Using 1232041 gives you Spinden's correlation; using
93 (apply 'format (cons "%s.%s.%s.%s.%s" mayan-long-count))) 93 (apply 'format (cons "%s.%s.%s.%s.%s" mayan-long-count)))
94 94
95(defun calendar-string-to-mayan-long-count (str) 95(defun calendar-string-to-mayan-long-count (str)
96 "Given STR, a string of format \"%d.%d.%d.%d.%d\", return list of nums." 96 "Given STR, a string of format \"%d.%d.%d.%d.%d\", return list of numbers."
97 (let ((rlc nil) 97 (let ((rlc nil)
98 (c (length str)) 98 (c (length str))
99 (cc 0)) 99 (cc 0))
@@ -162,7 +162,7 @@ Echo Mayan date if NOECHO is t."
162 (or noecho (calendar-print-mayan-date))) 162 (or noecho (calendar-print-mayan-date)))
163 163
164(defun calendar-mayan-haab-to-string (haab) 164(defun calendar-mayan-haab-to-string (haab)
165 "Convert Mayan haab date (a pair) into its traditional written form." 165 "Convert Mayan HAAB date (a pair) into its traditional written form."
166 (let ((month (cdr haab)) 166 (let ((month (cdr haab))
167 (day (car haab))) 167 (day (car haab)))
168 ;; 19th month consists of 5 special days 168 ;; 19th month consists of 5 special days
@@ -226,7 +226,7 @@ Echo Mayan date if NOECHO is t."
226 (or noecho (calendar-print-mayan-date))) 226 (or noecho (calendar-print-mayan-date)))
227 227
228(defun calendar-mayan-tzolkin-to-string (tzolkin) 228(defun calendar-mayan-tzolkin-to-string (tzolkin)
229 "Convert Mayan tzolkin date (a pair) into its traditional written form." 229 "Convert Mayan TZOLKIN date (a pair) into its traditional written form."
230 (format "%d %s" 230 (format "%d %s"
231 (car tzolkin) 231 (car tzolkin)
232 (aref calendar-mayan-tzolkin-names-array (1- (cdr tzolkin))))) 232 (aref calendar-mayan-tzolkin-names-array (1- (cdr tzolkin)))))
@@ -252,7 +252,7 @@ Returns nil if such a tzolkin-haab combination is impossible."
252 nil))) 252 nil)))
253 253
254(defun calendar-read-mayan-haab-date () 254(defun calendar-read-mayan-haab-date ()
255 "Prompt for a Mayan haab date" 255 "Prompt for a Mayan haab date."
256 (let* ((completion-ignore-case t) 256 (let* ((completion-ignore-case t)
257 (haab-day (calendar-read 257 (haab-day (calendar-read
258 "Haab kin (0-19): " 258 "Haab kin (0-19): "
@@ -268,7 +268,7 @@ Returns nil if such a tzolkin-haab combination is impossible."
268 (cons haab-day haab-month))) 268 (cons haab-day haab-month)))
269 269
270(defun calendar-read-mayan-tzolkin-date () 270(defun calendar-read-mayan-tzolkin-date ()
271 "Prompt for a Mayan tzolkin date" 271 "Prompt for a Mayan tzolkin date."
272 (let* ((completion-ignore-case t) 272 (let* ((completion-ignore-case t)
273 (tzolkin-count (calendar-read 273 (tzolkin-count (calendar-read
274 "Tzolkin kin (1-13): " 274 "Tzolkin kin (1-13): "
@@ -283,10 +283,10 @@ Returns nil if such a tzolkin-haab combination is impossible."
283 (cons tzolkin-count tzolkin-name))) 283 (cons tzolkin-count tzolkin-name)))
284 284
285;;;###autoload 285;;;###autoload
286(defun calendar-next-calendar-round-date 286(defun calendar-next-calendar-round-date (tzolkin-date haab-date
287 (tzolkin-date haab-date &optional noecho) 287 &optional noecho)
288 "Move cursor to next instance of Mayan HAAB-DATE TZOLKIN-DATE combination. 288 "Move cursor to next instance of Mayan TZOLKIN-DATE HAAB-DATE combination.
289Echo Mayan date if NOECHO is t." 289Echo Mayan date unless NOECHO is non-nil."
290 (interactive (list (calendar-read-mayan-tzolkin-date) 290 (interactive (list (calendar-read-mayan-tzolkin-date)
291 (calendar-read-mayan-haab-date))) 291 (calendar-read-mayan-haab-date)))
292 (let ((date (calendar-mayan-tzolkin-haab-on-or-before 292 (let ((date (calendar-mayan-tzolkin-haab-on-or-before
@@ -372,7 +372,7 @@ Defaults to today's date if DATE is not given."
372 (or noecho (calendar-print-mayan-date))) 372 (or noecho (calendar-print-mayan-date)))
373 373
374(defun calendar-mayan-long-count-common-era (lc) 374(defun calendar-mayan-long-count-common-era (lc)
375 "T if long count represents date in the Common Era." 375 "Return non-nil if long count LC represents a date in the Common Era."
376 (let ((base (calendar-mayan-long-count-from-absolute 1))) 376 (let ((base (calendar-mayan-long-count-from-absolute 1)))
377 (while (and (not (null base)) (= (car lc) (car base))) 377 (while (and (not (null base)) (= (car lc) (car base)))
378 (setq lc (cdr lc) 378 (setq lc (cdr lc)