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-mayan.el,v


From: Glenn Morris
Subject: [Emacs-diffs] Changes to emacs/lisp/calendar/cal-mayan.el,v
Date: Fri, 04 Apr 2008 07:27:24 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Glenn Morris <gm>       08/04/04 07:27:24

Index: cal-mayan.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/calendar/cal-mayan.el,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -b -r1.39 -r1.40
--- cal-mayan.el        1 Apr 2008 02:42:05 -0000       1.39
+++ cal-mayan.el        4 Apr 2008 07:27:24 -0000       1.40
@@ -73,7 +73,7 @@
   "Convert MAYAN-LONG-COUNT into traditional written form."
   (apply 'format (cons "%s.%s.%s.%s.%s" mayan-long-count)))
 
-(defun calendar-string-to-mayan-long-count (str)
+(defun calendar-mayan-string-from-long-count (str)
   "Given STR, a string of format \"%d.%d.%d.%d.%d\", return list of numbers."
   (let ((end 0)
         rlc)
@@ -127,13 +127,16 @@
             (calendar-mayan-haab-to-string haab))))
 
 ;;;###cal-autoload
-(defun calendar-print-mayan-date ()
+(defun calendar-mayan-print-date ()
   "Show the Mayan long count, tzolkin, and haab equivalents of date."
   (interactive)
   (message "Mayan date: %s"
            (calendar-mayan-date-string (calendar-cursor-to-date t))))
 
-(defun calendar-read-mayan-haab-date ()
+(define-obsolete-function-alias 'calendar-print-mayan-date
+  'calendar-mayan-print-date "23.1")
+
+(defun calendar-mayan-read-haab-date ()
   "Prompt for a Mayan haab date."
   (let* ((completion-ignore-case t)
          (haab-day (calendar-read
@@ -149,7 +152,7 @@
                        (calendar-make-alist haab-month-list 1) t))))
     (cons haab-day haab-month)))
 
-(defun calendar-read-mayan-tzolkin-date ()
+(defun calendar-mayan-read-tzolkin-date ()
   "Prompt for a Mayan tzolkin date."
   (let* ((completion-ignore-case t)
          (tzolkin-count (calendar-read
@@ -165,29 +168,35 @@
     (cons tzolkin-count tzolkin-name)))
 
 ;;;###cal-autoload
-(defun calendar-next-haab-date (haab-date &optional noecho)
+(defun calendar-mayan-next-haab-date (haab-date &optional noecho)
   "Move cursor to next instance of Mayan HAAB-DATE.
 Echo Mayan date unless NOECHO is non-nil."
-  (interactive (list (calendar-read-mayan-haab-date)))
+  (interactive (list (calendar-mayan-read-haab-date)))
   (calendar-goto-date
    (calendar-gregorian-from-absolute
     (calendar-mayan-haab-on-or-before
      haab-date
      (+ 365
         (calendar-absolute-from-gregorian (calendar-cursor-to-date))))))
-  (or noecho (calendar-print-mayan-date)))
+  (or noecho (calendar-mayan-print-date)))
+
+(define-obsolete-function-alias 'calendar-next-haab-date
+  'calendar-mayan-next-haab-date "23.1")
 
 ;;;###cal-autoload
-(defun calendar-previous-haab-date (haab-date &optional noecho)
+(defun calendar-mayan-previous-haab-date (haab-date &optional noecho)
   "Move cursor to previous instance of Mayan HAAB-DATE.
 Echo Mayan date unless NOECHO is non-nil."
-  (interactive (list (calendar-read-mayan-haab-date)))
+  (interactive (list (calendar-mayan-read-haab-date)))
   (calendar-goto-date
    (calendar-gregorian-from-absolute
     (calendar-mayan-haab-on-or-before
      haab-date
      (1- (calendar-absolute-from-gregorian (calendar-cursor-to-date))))))
-  (or noecho (calendar-print-mayan-date)))
+  (or noecho (calendar-mayan-print-date)))
+
+(define-obsolete-function-alias 'calendar-previous-haab-date
+  'calendar-mayan-previous-haab-date "23.1")
 
 (defun calendar-mayan-haab-to-string (haab)
   "Convert Mayan HAAB date (a pair) into its traditional written form."
@@ -227,29 +236,35 @@
         260)))
 
 ;;;###cal-autoload
-(defun calendar-next-tzolkin-date (tzolkin-date &optional noecho)
+(defun calendar-mayan-next-tzolkin-date (tzolkin-date &optional noecho)
   "Move cursor to next instance of Mayan TZOLKIN-DATE.
 Echo Mayan date unless NOECHO is non-nil."
-  (interactive (list (calendar-read-mayan-tzolkin-date)))
+  (interactive (list (calendar-mayan-read-tzolkin-date)))
   (calendar-goto-date
    (calendar-gregorian-from-absolute
     (calendar-mayan-tzolkin-on-or-before
      tzolkin-date
      (+ 260
         (calendar-absolute-from-gregorian (calendar-cursor-to-date))))))
-  (or noecho (calendar-print-mayan-date)))
+  (or noecho (calendar-mayan-print-date)))
+
+(define-obsolete-function-alias 'calendar-next-tzolkin-date
+  'calendar-mayan-next-tzolkin-date "23.1")
 
 ;;;###cal-autoload
-(defun calendar-previous-tzolkin-date (tzolkin-date &optional noecho)
+(defun calendar-mayan-previous-tzolkin-date (tzolkin-date &optional noecho)
   "Move cursor to previous instance of Mayan TZOLKIN-DATE.
 Echo Mayan date unless NOECHO is non-nil."
-  (interactive (list (calendar-read-mayan-tzolkin-date)))
+  (interactive (list (calendar-mayan-read-tzolkin-date)))
   (calendar-goto-date
    (calendar-gregorian-from-absolute
     (calendar-mayan-tzolkin-on-or-before
      tzolkin-date
      (1- (calendar-absolute-from-gregorian (calendar-cursor-to-date))))))
-  (or noecho (calendar-print-mayan-date)))
+  (or noecho (calendar-mayan-print-date)))
+
+(define-obsolete-function-alias 'calendar-previous-tzolkin-date
+  'calendar-mayan-previous-tzolkin-date "23.1")
 
 (defun calendar-mayan-tzolkin-to-string (tzolkin)
   "Convert Mayan TZOLKIN date (a pair) into its traditional written form."
@@ -278,12 +293,12 @@
       nil)))
 
 ;;;###cal-autoload
-(defun calendar-next-calendar-round-date (tzolkin-date haab-date
+(defun calendar-mayan-next-round-date (tzolkin-date haab-date
                                                        &optional noecho)
   "Move cursor to next instance of Mayan TZOLKIN-DATE HAAB-DATE combination.
 Echo Mayan date unless NOECHO is non-nil."
-  (interactive (list (calendar-read-mayan-tzolkin-date)
-                     (calendar-read-mayan-haab-date)))
+  (interactive (list (calendar-mayan-read-tzolkin-date)
+                     (calendar-mayan-read-haab-date)))
   (let ((date (calendar-mayan-tzolkin-haab-on-or-before
                tzolkin-date haab-date
                (+ 18980 (calendar-absolute-from-gregorian
@@ -293,15 +308,18 @@
                (calendar-mayan-tzolkin-to-string tzolkin-date)
                (calendar-mayan-haab-to-string haab-date))
       (calendar-goto-date (calendar-gregorian-from-absolute date))
-      (or noecho (calendar-print-mayan-date)))))
+      (or noecho (calendar-mayan-print-date)))))
+
+(define-obsolete-function-alias 'calendar-next-calendar-round-date
+  'calendar-mayan-next-round-date "23.1")
 
 ;;;###cal-autoload
-(defun calendar-previous-calendar-round-date
+(defun calendar-mayan-previous-round-date
   (tzolkin-date haab-date &optional noecho)
   "Move to previous instance of Mayan TZOLKIN-DATE HAAB-DATE combination.
 Echo Mayan date unless NOECHO is non-nil."
-  (interactive (list (calendar-read-mayan-tzolkin-date)
-                     (calendar-read-mayan-haab-date)))
+  (interactive (list (calendar-mayan-read-tzolkin-date)
+                     (calendar-mayan-read-haab-date)))
   (let ((date (calendar-mayan-tzolkin-haab-on-or-before
                tzolkin-date haab-date
                (1- (calendar-absolute-from-gregorian
@@ -311,9 +329,12 @@
                (calendar-mayan-tzolkin-to-string tzolkin-date)
                (calendar-mayan-haab-to-string haab-date))
       (calendar-goto-date (calendar-gregorian-from-absolute date))
-      (or noecho (calendar-print-mayan-date)))))
+      (or noecho (calendar-mayan-print-date)))))
 
-(defun calendar-absolute-from-mayan-long-count (c)
+(define-obsolete-function-alias 'calendar-previous-calendar-round-date
+  'calendar-mayan-previous-round-date "23.1")
+
+(defun calendar-mayan-long-count-to-absolute (c)
   "Compute the absolute date corresponding to the Mayan Long Count C.
 Long count is a list (baktun katun tun uinal kin)"
   (+ (* (nth 0 c) 144000)               ; baktun
@@ -333,13 +354,13 @@
     (or (null lc) (> (car lc) (car base)))))
 
 ;;;###cal-autoload
-(defun calendar-goto-mayan-long-count-date (date &optional noecho)
+(defun calendar-mayan-goto-long-count-date (date &optional noecho)
   "Move cursor to Mayan long count DATE.
 Echo Mayan date unless NOECHO is non-nil."
   (interactive
    (let (datum)
      (while (not (setq datum
-                       (calendar-string-to-mayan-long-count
+                       (calendar-mayan-string-from-long-count
                         (read-string
                          "Mayan long count (baktun.katun.tun.uinal.kin): "
                          (calendar-mayan-long-count-to-string
@@ -351,8 +372,11 @@
      datum))
   (calendar-goto-date
    (calendar-gregorian-from-absolute
-    (calendar-absolute-from-mayan-long-count date)))
-  (or noecho (calendar-print-mayan-date)))
+    (calendar-mayan-long-count-to-absolute date)))
+  (or noecho (calendar-mayan-print-date)))
+
+(define-obsolete-function-alias 'calendar-goto-mayan-long-count-date
+  'calendar-mayan-goto-long-count-date "23.1")
 
 (defvar date)
 




reply via email to

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