changeset 92586:15aa69393e42

Unquote lambda functions. Add autoload cookies to functions formerly autoloaded in calendar.el. Set `generated-autoload-file' to "cal-loaddefs.el".
author Glenn Morris <rgm@gnu.org>
date Sat, 08 Mar 2008 03:43:25 +0000
parents c9eb56890fe0
children 267241a78df9
files lisp/calendar/cal-iso.el
diffstat 1 files changed, 15 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/calendar/cal-iso.el	Sat Mar 08 03:42:50 2008 +0000
+++ b/lisp/calendar/cal-iso.el	Sat Mar 08 03:43:25 2008 +0000
@@ -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