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


From: Glenn Morris
Subject: [Emacs-diffs] Changes to emacs/lisp/calendar/cal-iso.el,v
Date: Sat, 08 Mar 2008 03:43:25 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Glenn Morris <gm>       08/03/08 03:43:25

Index: cal-iso.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/calendar/cal-iso.el,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- cal-iso.el  8 Jan 2008 20:44:03 -0000       1.17
+++ cal-iso.el  8 Mar 2008 03:43:25 -0000       1.18
@@ -36,8 +36,6 @@
 
 ;;; Code:
 
-(defvar date)
-
 (require 'calendar)
 
 (defun calendar-absolute-from-iso (date)
@@ -54,7 +52,7 @@
     (+ (calendar-dayname-on-or-before
         1 (+ 3 (calendar-absolute-from-gregorian (list 1 1 year))))
        (* 7 (1- week))
-       (if (= day 0) 6 (1- day)))))
+       (if (zerop day) 6 (1- day)))))
 
 (defun calendar-iso-from-absolute (date)
   "Compute the `ISO commercial date' corresponding to the absolute DATE.
@@ -76,6 +74,7 @@
      (% date 7)
      year)))
 
+;;;###autoload
 (defun calendar-iso-date-string (&optional date)
   "String of ISO date of Gregorian DATE.
 Defaults to today's date if DATE is not given."
@@ -88,6 +87,7 @@
             (extract-calendar-month iso-date)
             (extract-calendar-year iso-date))))
 
+;;;###autoload
 (defun calendar-print-iso-date ()
   "Show equivalent ISO date for the date under the cursor."
   (interactive)
@@ -99,7 +99,7 @@
   (let* ((today (calendar-current-date))
          (year (calendar-read
                 "ISO calendar year (>0): "
-                '(lambda (x) (> x 0))
+                (lambda (x) (> x 0))
                 (int-to-string (extract-calendar-year today))))
          (no-weeks (extract-calendar-month
                     (calendar-iso-from-absolute
@@ -109,13 +109,14 @@
                           (list 1 4 (1+ year))))))))
          (week (calendar-read
                 (format "ISO calendar week (1-%d): " no-weeks)
-                '(lambda (x) (and (> x 0) (<= x no-weeks)))))
+                (lambda (x) (and (> x 0) (<= x no-weeks)))))
          (day (if dayflag (calendar-read
                            "ISO day (1-7): "
-                           '(lambda (x) (and (<= 1 x) (<= x 7))))
+                           (lambda (x) (and (<= 1 x) (<= x 7))))
                 1)))
     (list (list week day year))))
 
+;;;###autoload
 (defun calendar-goto-iso-date (date &optional noecho)
   "Move cursor to ISO DATE; echo ISO date unless NOECHO is t."
   (interactive (calendar-iso-read-args t))
@@ -123,6 +124,7 @@
                        (calendar-absolute-from-iso date)))
   (or noecho (calendar-print-iso-date)))
 
+;;;###autoload
 (defun calendar-goto-iso-week (date &optional noecho)
   "Move cursor to ISO DATE; echo ISO date unless NOECHO is t.
 Interactively, goes to the first day of the specified week."
@@ -131,11 +133,17 @@
                        (calendar-absolute-from-iso date)))
   (or noecho (calendar-print-iso-date)))
 
+(defvar date)
+
 (defun diary-iso-date ()
   "ISO calendar equivalent of date diary entry."
   (format "ISO date: %s" (calendar-iso-date-string date)))
 
 (provide 'cal-iso)
 
-;;; arch-tag: 3c0154cc-d30f-4981-9f60-42bdf7a468f6
+;; Local Variables:
+;; generated-autoload-file: "cal-loaddefs.el"
+;; End:
+
+;; arch-tag: 3c0154cc-d30f-4981-9f60-42bdf7a468f6
 ;;; cal-iso.el ends here




reply via email to

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