changeset 93844:bf9ef749c23e

Replace int-to-string with number-to-string.
author Glenn Morris <rgm@gnu.org>
date Tue, 08 Apr 2008 07:07:17 +0000
parents 61357badb5fa
children 042fe558f6ee
files lisp/calendar/cal-bahai.el lisp/calendar/cal-china.el lisp/calendar/cal-coptic.el lisp/calendar/cal-french.el lisp/calendar/cal-hebrew.el lisp/calendar/cal-islam.el lisp/calendar/cal-iso.el lisp/calendar/cal-julian.el lisp/calendar/cal-move.el lisp/calendar/cal-persia.el lisp/calendar/cal-tex.el lisp/calendar/calendar.el lisp/calendar/holidays.el
diffstat 13 files changed, 40 insertions(+), 37 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/calendar/cal-bahai.el	Tue Apr 08 07:04:17 2008 +0000
+++ b/lisp/calendar/cal-bahai.el	Tue Apr 08 07:07:17 2008 +0000
@@ -135,12 +135,12 @@
                                  (<= d 0))
                             "Ayyám-i-Há"
                           (aref calendar-bahai-month-name-array (1- m))))
-             (day (int-to-string
+             (day (number-to-string
                    (if (<= d 0)
                        (+ d (if (calendar-bahai-leap-year-p y) 5 4))
                      d)))
-             (year (int-to-string y))
-             (month (int-to-string m))
+             (year (number-to-string y))
+             (month (number-to-string m))
              dayname)
         ;; Can't call calendar-date-string because of monthname oddity.
         (mapconcat 'eval calendar-date-display-form "")))))
@@ -164,7 +164,7 @@
          (year (calendar-read
                 "Bahá'í calendar year (not 0): "
                 (lambda (x) (not (zerop x)))
-                (int-to-string
+                (number-to-string
                  (calendar-extract-year
                   (calendar-bahai-from-absolute
                    (calendar-absolute-from-gregorian today))))))
--- a/lisp/calendar/cal-china.el	Tue Apr 08 07:04:17 2008 +0000
+++ b/lisp/calendar/cal-china.el	Tue Apr 08 07:07:17 2008 +0000
@@ -537,9 +537,9 @@
                       (cons (format "%s (second)" (car l)) (cadr l)))
                 (calendar-chinese-months-to-alist (cddr l)))
              (append
-              (list (cons (int-to-string (car l)) (car l)))
+              (list (cons (number-to-string (car l)) (car l)))
               (calendar-chinese-months-to-alist (cdr l))))
-         (list (cons (int-to-string (car l)) (car l))))))
+         (list (cons (number-to-string (car l)) (car l))))))
 
 (defun calendar-chinese-months (c y)
   "A list of the months in cycle C, year Y of the Chinese calendar."
@@ -569,11 +569,11 @@
           (cycle (calendar-read
                   "Chinese calendar cycle number (>44): "
                   (lambda (x) (> x 44))
-                  (int-to-string (car c))))
+                  (number-to-string (car c))))
           (year (calendar-read
                  "Year in Chinese cycle (1..60): "
                  (lambda (x) (and (<= 1 x) (<= x 60)))
-                 (int-to-string (cadr c))))
+                 (number-to-string (cadr c))))
           (month-list (calendar-chinese-months-to-alist
                        (calendar-chinese-months cycle year)))
           (month (cdr (assoc
--- a/lisp/calendar/cal-coptic.el	Tue Apr 08 07:04:17 2008 +0000
+++ b/lisp/calendar/cal-coptic.el	Tue Apr 08 07:07:17 2008 +0000
@@ -122,10 +122,10 @@
     (if (< y 1)
         ""
       (let ((monthname (aref calendar-coptic-month-name-array (1- m)))
-            (day (int-to-string (calendar-extract-day coptic-date)))
+            (day (number-to-string (calendar-extract-day coptic-date)))
             (dayname nil)
-            (month (int-to-string m))
-            (year (int-to-string y)))
+            (month (number-to-string m))
+            (year (number-to-string y)))
         (mapconcat 'eval calendar-date-display-form "")))))
 
 ;;;###cal-autoload
@@ -147,7 +147,7 @@
          (year (calendar-read
                 (format "%s calendar year (>0): " calendar-coptic-name)
                 (lambda (x) (> x 0))
-                (int-to-string
+                (number-to-string
                  (calendar-extract-year
                   (calendar-coptic-from-absolute
                    (calendar-absolute-from-gregorian today))))))
--- a/lisp/calendar/cal-french.el	Tue Apr 08 07:04:17 2008 +0000
+++ b/lisp/calendar/cal-french.el	Tue Apr 08 07:07:17 2008 +0000
@@ -213,7 +213,7 @@
                        "Année de la Révolution (>0): "
                      "Anne'e de la Re'volution (>0): ")
                    (lambda (x) (> x 0))
-                   (int-to-string
+                   (number-to-string
                     (calendar-extract-year
                      (calendar-french-from-absolute
                       (calendar-absolute-from-gregorian
--- a/lisp/calendar/cal-hebrew.el	Tue Apr 08 07:04:17 2008 +0000
+++ b/lisp/calendar/cal-hebrew.el	Tue Apr 08 07:07:17 2008 +0000
@@ -242,7 +242,7 @@
          (year (calendar-read
                 "Hebrew calendar year (>3760): "
                 (lambda (x) (> x 3760))
-                (int-to-string
+                (number-to-string
                  (calendar-extract-year
                   (calendar-hebrew-from-absolute
                    (calendar-absolute-from-gregorian today))))))
@@ -738,7 +738,7 @@
                     (year (calendar-read
                            "Year of death (>0): "
                            (lambda (x) (> x 0))
-                           (int-to-string (calendar-extract-year today))))
+                           (number-to-string (calendar-extract-year today))))
                     (month-array calendar-month-name-array)
                     (completion-ignore-case t)
                     (month (cdr (assoc-string
@@ -757,7 +757,7 @@
                        (format "Starting year of Yahrzeit table (>%d): "
                                death-year)
                        (lambda (x) (> x death-year))
-                       (int-to-string (1+ death-year))))
+                       (number-to-string (1+ death-year))))
           (end-year (calendar-read
                      (format "Ending year of Yahrzeit table (>=%d): "
                              start-year)
--- a/lisp/calendar/cal-islam.el	Tue Apr 08 07:04:17 2008 +0000
+++ b/lisp/calendar/cal-islam.el	Tue Apr 08 07:07:17 2008 +0000
@@ -153,7 +153,7 @@
          (year (calendar-read
                 "Islamic calendar year (>0): "
                 (lambda (x) (> x 0))
-                (int-to-string
+                (number-to-string
                  (calendar-extract-year
                   (calendar-islamic-from-absolute
                    (calendar-absolute-from-gregorian today))))))
--- a/lisp/calendar/cal-iso.el	Tue Apr 08 07:04:17 2008 +0000
+++ b/lisp/calendar/cal-iso.el	Tue Apr 08 07:07:17 2008 +0000
@@ -102,7 +102,7 @@
   (let* ((year (calendar-read
                 "ISO calendar year (>0): "
                 (lambda (x) (> x 0))
-                (int-to-string (calendar-extract-year
+                (number-to-string (calendar-extract-year
                                 (calendar-current-date)))))
          (no-weeks (calendar-extract-month
                     (calendar-iso-from-absolute
--- a/lisp/calendar/cal-julian.el	Tue Apr 08 07:04:17 2008 +0000
+++ b/lisp/calendar/cal-julian.el	Tue Apr 08 07:07:17 2008 +0000
@@ -106,7 +106,7 @@
           (year (calendar-read
                  "Julian calendar year (>0): "
                  (lambda (x) (> x 0))
-                 (int-to-string
+                 (number-to-string
                   (calendar-extract-year
                    (calendar-julian-from-absolute
                     (calendar-absolute-from-gregorian
@@ -170,7 +170,7 @@
 (defun calendar-astro-date-string (&optional date)
   "String of astronomical (Julian) day number after noon UTC of Gregorian DATE.
 Defaults to today's date if DATE is not given."
-  (int-to-string
+  (number-to-string
    (ceiling
     (calendar-astro-from-absolute
      (calendar-absolute-from-gregorian (or date (calendar-current-date)))))))
--- a/lisp/calendar/cal-move.el	Tue Apr 08 07:04:17 2008 +0000
+++ b/lisp/calendar/cal-move.el	Tue Apr 08 07:07:17 2008 +0000
@@ -365,7 +365,7 @@
    (let* ((year (calendar-read
                  "Year (>0): "
                  (lambda (x) (> x 0))
-                 (int-to-string (calendar-extract-year
+                 (number-to-string (calendar-extract-year
                                  (calendar-current-date)))))
           (last (if (calendar-leap-year-p year) 366 365))
           (day (calendar-read
--- a/lisp/calendar/cal-persia.el	Tue Apr 08 07:04:17 2008 +0000
+++ b/lisp/calendar/cal-persia.el	Tue Apr 08 07:07:17 2008 +0000
@@ -152,9 +152,9 @@
          (y (calendar-extract-year persian-date))
          (m (calendar-extract-month persian-date))
          (monthname (aref calendar-persian-month-name-array (1- m)))
-         (day (int-to-string (calendar-extract-day persian-date)))
-         (year (int-to-string y))
-         (month (int-to-string m))
+         (day (number-to-string (calendar-extract-day persian-date)))
+         (year (number-to-string y))
+         (month (number-to-string m))
          dayname)
     (mapconcat 'eval calendar-date-display-form "")))
 
@@ -174,7 +174,7 @@
   (let* ((year (calendar-read
                 "Persian calendar year (not 0): "
                 (lambda (x) (not (zerop x)))
-                (int-to-string
+                (number-to-string
                  (calendar-extract-year
                   (calendar-persian-from-absolute
                    (calendar-absolute-from-gregorian
--- a/lisp/calendar/cal-tex.el	Tue Apr 08 07:04:17 2008 +0000
+++ b/lisp/calendar/cal-tex.el	Tue Apr 08 07:07:17 2008 +0000
@@ -1102,7 +1102,7 @@
             (insert "\\rightday")
           (insert "\\leftday"))
         (cal-tex-arg (cal-tex-LaTeXify-string (calendar-day-name date)))
-        (cal-tex-arg (int-to-string (calendar-extract-day date)))
+        (cal-tex-arg (number-to-string (calendar-extract-day date)))
         (cal-tex-arg (cal-tex-latexify-list diary-list date))
         (cal-tex-arg (cal-tex-latexify-list holidays date))
         (cal-tex-arg (eval cal-tex-daily-string))
@@ -1202,7 +1202,7 @@
       (dotimes (jdummy 3)
         (insert "\\leftday")
         (cal-tex-arg (cal-tex-LaTeXify-string (calendar-day-name date)))
-        (cal-tex-arg (int-to-string (calendar-extract-day date)))
+        (cal-tex-arg (number-to-string (calendar-extract-day date)))
         (cal-tex-arg (cal-tex-latexify-list diary-list date))
         (cal-tex-arg (cal-tex-latexify-list holidays date))
         (cal-tex-arg (eval cal-tex-daily-string))
@@ -1233,7 +1233,7 @@
       (dotimes (jdummy 2)
         (insert "\\rightday")
         (cal-tex-arg (cal-tex-LaTeXify-string (calendar-day-name date)))
-        (cal-tex-arg (int-to-string (calendar-extract-day date)))
+        (cal-tex-arg (number-to-string (calendar-extract-day date)))
         (cal-tex-arg (cal-tex-latexify-list diary-list date))
         (cal-tex-arg (cal-tex-latexify-list holidays date))
         (cal-tex-arg (eval cal-tex-daily-string))
@@ -1242,7 +1242,7 @@
       (dotimes (jdummy 2)
         (insert "\\weekend")
         (cal-tex-arg (cal-tex-LaTeXify-string (calendar-day-name date)))
-        (cal-tex-arg (int-to-string (calendar-extract-day date)))
+        (cal-tex-arg (number-to-string (calendar-extract-day date)))
         (cal-tex-arg (cal-tex-latexify-list diary-list date))
         (cal-tex-arg (cal-tex-latexify-list holidays date))
         (cal-tex-arg (eval cal-tex-daily-string))
@@ -1488,7 +1488,7 @@
                      "\\multicolumn{7}{c}{"
                      (cal-tex-month-name month)
                      " "
-                     (int-to-string year)
+                     (number-to-string year)
                      "}\\\\[1mm]\n")))
     (dotimes (i 7)
       (setq str
@@ -1504,7 +1504,7 @@
     (dotimes (idummy blank-days)
       (setq str (concat str " & ")))
     (dotimes (i last)
-      (setq str (concat str (int-to-string (1+ i)))
+      (setq str (concat str (number-to-string (1+ i)))
             str (concat str (if (zerop (mod (+ i 1 blank-days) 7))
                                 (if (= i (1- last))
                                     ""
--- a/lisp/calendar/calendar.el	Tue Apr 08 07:04:17 2008 +0000
+++ b/lisp/calendar/calendar.el	Tue Apr 08 07:07:17 2008 +0000
@@ -2258,7 +2258,7 @@
   (let* ((year (calendar-read
                 "Year (>0): "
                 (lambda (x) (> x 0))
-                (int-to-string (calendar-extract-year
+                (number-to-string (calendar-extract-year
                                 (calendar-current-date)))))
          (month-array calendar-month-name-array)
          (completion-ignore-case t)
@@ -2536,9 +2536,9 @@
   (let* ((dayname (unless nodayname (calendar-day-name date abbreviate)))
          (month (calendar-extract-month date))
          (monthname (calendar-month-name month abbreviate))
-         (day (int-to-string (calendar-extract-day date)))
-         (month (int-to-string month))
-         (year (int-to-string (calendar-extract-year date))))
+         (day (number-to-string (calendar-extract-day date)))
+         (month (number-to-string month))
+         (year (number-to-string (calendar-extract-year date))))
     (mapconcat 'eval calendar-date-display-form "")))
 
 (defun calendar-dayname-on-or-before (dayname date)
--- a/lisp/calendar/holidays.el	Tue Apr 08 07:04:17 2008 +0000
+++ b/lisp/calendar/holidays.el	Tue Apr 08 07:07:17 2008 +0000
@@ -33,6 +33,7 @@
 (require 'calendar)
 (require 'hol-loaddefs)
 
+;; FIXME name that makes sense
 ;;;###diary-autoload
 (defun calendar-holiday-list ()
   "Form the list of holidays that occur on dates in the calendar window.
@@ -54,6 +55,7 @@
 (defvar displayed-month)                ; from calendar-generate
 (defvar displayed-year)
 
+;; FIXME name that makes sense
 ;;;###cal-autoload
 (defun calendar-list-holidays ()
   "Create a buffer containing the holidays for the current calendar window.
@@ -128,13 +130,13 @@
    (let* ((start-year (calendar-read
                        "Starting year of holidays (>0): "
                        (lambda (x) (> x 0))
-                       (int-to-string (calendar-extract-year
+                       (number-to-string (calendar-extract-year
                                        (calendar-current-date)))))
           (end-year (calendar-read
                      (format "Ending year (inclusive) of holidays (>=%s): "
                              start-year)
                      (lambda (x) (>= x start-year))
-                     (int-to-string start-year)))
+                     (number-to-string start-year)))
           (completion-ignore-case t)
           (lists
            (list
@@ -235,6 +237,7 @@
           (insert (mapconcat 'identity holiday-list "\n")))
         (message "Checking holidays...done")))))
 
+;; FIXME move to calendar?
 ;;;###cal-autoload
 (defun calendar-mark-holidays ()
   "Mark notable days in the calendar window."