aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2008-03-08 03:45:43 +0000
committerGlenn Morris2008-03-08 03:45:43 +0000
commit5942f9afaa7d9a7ffbf9c3293ddc02f7c7c773a7 (patch)
tree37efe28640611a5f33e302e78689b63914f440cf
parent3627d02d9d4d952b1997a333b80d96a4bfd73ea7 (diff)
downloademacs-5942f9afaa7d9a7ffbf9c3293ddc02f7c7c773a7.tar.gz
emacs-5942f9afaa7d9a7ffbf9c3293ddc02f7c7c773a7.zip
Unquote lambda functions. Add autoload cookies to functions formerly
autoloaded in calendar.el. Set `generated-autoload-file' to "cal-loaddefs.el".
-rw-r--r--lisp/calendar/cal-mayan.el19
-rw-r--r--lisp/calendar/cal-move.el30
-rw-r--r--lisp/calendar/cal-persia.el13
3 files changed, 54 insertions, 8 deletions
diff --git a/lisp/calendar/cal-mayan.el b/lisp/calendar/cal-mayan.el
index 8f20f359a15..30b9cc26c38 100644
--- a/lisp/calendar/cal-mayan.el
+++ b/lisp/calendar/cal-mayan.el
@@ -138,6 +138,7 @@ but some use 1137140. Using 1232041 gives you Spinden's correlation; using
138 (calendar-mayan-haab-from-absolute 0) haab-date)) 138 (calendar-mayan-haab-from-absolute 0) haab-date))
139 365))) 139 365)))
140 140
141;;;###autoload
141(defun calendar-next-haab-date (haab-date &optional noecho) 142(defun calendar-next-haab-date (haab-date &optional noecho)
142 "Move cursor to next instance of Mayan HAAB-DATE. 143 "Move cursor to next instance of Mayan HAAB-DATE.
143Echo Mayan date if NOECHO is t." 144Echo Mayan date if NOECHO is t."
@@ -150,6 +151,7 @@ Echo Mayan date if NOECHO is t."
150 (calendar-absolute-from-gregorian (calendar-cursor-to-date)))))) 151 (calendar-absolute-from-gregorian (calendar-cursor-to-date))))))
151 (or noecho (calendar-print-mayan-date))) 152 (or noecho (calendar-print-mayan-date)))
152 153
154;;;###autoload
153(defun calendar-previous-haab-date (haab-date &optional noecho) 155(defun calendar-previous-haab-date (haab-date &optional noecho)
154 "Move cursor to previous instance of Mayan HAAB-DATE. 156 "Move cursor to previous instance of Mayan HAAB-DATE.
155Echo Mayan date if NOECHO is t." 157Echo Mayan date if NOECHO is t."
@@ -200,6 +202,7 @@ Echo Mayan date if NOECHO is t."
200 tzolkin-date)) 202 tzolkin-date))
201 260))) 203 260)))
202 204
205;;;###autoload
203(defun calendar-next-tzolkin-date (tzolkin-date &optional noecho) 206(defun calendar-next-tzolkin-date (tzolkin-date &optional noecho)
204 "Move cursor to next instance of Mayan TZOLKIN-DATE. 207 "Move cursor to next instance of Mayan TZOLKIN-DATE.
205Echo Mayan date if NOECHO is t." 208Echo Mayan date if NOECHO is t."
@@ -212,6 +215,7 @@ Echo Mayan date if NOECHO is t."
212 (calendar-absolute-from-gregorian (calendar-cursor-to-date)))))) 215 (calendar-absolute-from-gregorian (calendar-cursor-to-date))))))
213 (or noecho (calendar-print-mayan-date))) 216 (or noecho (calendar-print-mayan-date)))
214 217
218;;;###autoload
215(defun calendar-previous-tzolkin-date (tzolkin-date &optional noecho) 219(defun calendar-previous-tzolkin-date (tzolkin-date &optional noecho)
216 "Move cursor to previous instance of Mayan TZOLKIN-DATE. 220 "Move cursor to previous instance of Mayan TZOLKIN-DATE.
217Echo Mayan date if NOECHO is t." 221Echo Mayan date if NOECHO is t."
@@ -254,7 +258,7 @@ Returns nil if such a tzolkin-haab combination is impossible."
254 (let* ((completion-ignore-case t) 258 (let* ((completion-ignore-case t)
255 (haab-day (calendar-read 259 (haab-day (calendar-read
256 "Haab kin (0-19): " 260 "Haab kin (0-19): "
257 '(lambda (x) (and (>= x 0) (< x 20))))) 261 (lambda (x) (and (>= x 0) (< x 20)))))
258 (haab-month-list (append calendar-mayan-haab-month-name-array 262 (haab-month-list (append calendar-mayan-haab-month-name-array
259 (and (< haab-day 5) '("Uayeb")))) 263 (and (< haab-day 5) '("Uayeb"))))
260 (haab-month (cdr 264 (haab-month (cdr
@@ -270,7 +274,7 @@ Returns nil if such a tzolkin-haab combination is impossible."
270 (let* ((completion-ignore-case t) 274 (let* ((completion-ignore-case t)
271 (tzolkin-count (calendar-read 275 (tzolkin-count (calendar-read
272 "Tzolkin kin (1-13): " 276 "Tzolkin kin (1-13): "
273 '(lambda (x) (and (> x 0) (< x 14))))) 277 (lambda (x) (and (> x 0) (< x 14)))))
274 (tzolkin-name-list (append calendar-mayan-tzolkin-names-array nil)) 278 (tzolkin-name-list (append calendar-mayan-tzolkin-names-array nil))
275 (tzolkin-name (cdr 279 (tzolkin-name (cdr
276 (assoc-string 280 (assoc-string
@@ -280,6 +284,7 @@ Returns nil if such a tzolkin-haab combination is impossible."
280 (calendar-make-alist tzolkin-name-list 1) t)))) 284 (calendar-make-alist tzolkin-name-list 1) t))))
281 (cons tzolkin-count tzolkin-name))) 285 (cons tzolkin-count tzolkin-name)))
282 286
287;;;###autoload
283(defun calendar-next-calendar-round-date 288(defun calendar-next-calendar-round-date
284 (tzolkin-date haab-date &optional noecho) 289 (tzolkin-date haab-date &optional noecho)
285 "Move cursor to next instance of Mayan HAAB-DATE TZOLKIN-DATE combination. 290 "Move cursor to next instance of Mayan HAAB-DATE TZOLKIN-DATE combination.
@@ -297,6 +302,7 @@ Echo Mayan date if NOECHO is t."
297 (calendar-goto-date (calendar-gregorian-from-absolute date)) 302 (calendar-goto-date (calendar-gregorian-from-absolute date))
298 (or noecho (calendar-print-mayan-date))))) 303 (or noecho (calendar-print-mayan-date)))))
299 304
305;;;###autoload
300(defun calendar-previous-calendar-round-date 306(defun calendar-previous-calendar-round-date
301 (tzolkin-date haab-date &optional noecho) 307 (tzolkin-date haab-date &optional noecho)
302 "Move to previous instance of Mayan TZOLKIN-DATE HAAB-DATE combination. 308 "Move to previous instance of Mayan TZOLKIN-DATE HAAB-DATE combination.
@@ -325,6 +331,7 @@ Long count is a list (baktun katun tun uinal kin)"
325 (- ; days before absolute date 0 331 (- ; days before absolute date 0
326 calendar-mayan-days-before-absolute-zero))) 332 calendar-mayan-days-before-absolute-zero)))
327 333
334;;;###autoload
328(defun calendar-mayan-date-string (&optional date) 335(defun calendar-mayan-date-string (&optional date)
329 "String of Mayan date of Gregorian DATE. 336 "String of Mayan date of Gregorian DATE.
330Defaults to today's date if DATE is not given." 337Defaults to today's date if DATE is not given."
@@ -338,12 +345,14 @@ Defaults to today's date if DATE is not given."
338 (calendar-mayan-tzolkin-to-string tzolkin) 345 (calendar-mayan-tzolkin-to-string tzolkin)
339 (calendar-mayan-haab-to-string haab)))) 346 (calendar-mayan-haab-to-string haab))))
340 347
348;;;###autoload
341(defun calendar-print-mayan-date () 349(defun calendar-print-mayan-date ()
342 "Show the Mayan long count, tzolkin, and haab equivalents of date." 350 "Show the Mayan long count, tzolkin, and haab equivalents of date."
343 (interactive) 351 (interactive)
344 (message "Mayan date: %s" 352 (message "Mayan date: %s"
345 (calendar-mayan-date-string (calendar-cursor-to-date t)))) 353 (calendar-mayan-date-string (calendar-cursor-to-date t))))
346 354
355;;;###autoload
347(defun calendar-goto-mayan-long-count-date (date &optional noecho) 356(defun calendar-goto-mayan-long-count-date (date &optional noecho)
348 "Move cursor to Mayan long count DATE. Echo Mayan date unless NOECHO is t." 357 "Move cursor to Mayan long count DATE. Echo Mayan date unless NOECHO is t."
349 (interactive 358 (interactive
@@ -378,5 +387,9 @@ Defaults to today's date if DATE is not given."
378 387
379(provide 'cal-mayan) 388(provide 'cal-mayan)
380 389
381;;; arch-tag: 54f35144-cd0f-4873-935a-a60129de07df 390;; Local Variables:
391;; generated-autoload-file: "cal-loaddefs.el"
392;; End:
393
394;; arch-tag: 54f35144-cd0f-4873-935a-a60129de07df
382;;; cal-mayan.el ends here 395;;; cal-mayan.el ends here
diff --git a/lisp/calendar/cal-move.el b/lisp/calendar/cal-move.el
index 14691699aa9..020d6a05530 100644
--- a/lisp/calendar/cal-move.el
+++ b/lisp/calendar/cal-move.el
@@ -37,6 +37,7 @@
37 37
38(require 'calendar) 38(require 'calendar)
39 39
40;;;###autoload
40(defun calendar-goto-today () 41(defun calendar-goto-today ()
41 "Reposition the calendar window so the current date is visible." 42 "Reposition the calendar window so the current date is visible."
42 (interactive) 43 (interactive)
@@ -47,6 +48,7 @@
47 (calendar-cursor-to-visible-date today))) 48 (calendar-cursor-to-visible-date today)))
48 (run-hooks 'calendar-move-hook)) 49 (run-hooks 'calendar-move-hook))
49 50
51;;;###autoload
50(defun calendar-forward-month (arg) 52(defun calendar-forward-month (arg)
51 "Move the cursor forward ARG months. 53 "Move the cursor forward ARG months.
52Movement is backward if ARG is negative." 54Movement is backward if ARG is negative."
@@ -67,24 +69,28 @@ Movement is backward if ARG is negative."
67 (calendar-cursor-to-visible-date new-cursor-date))) 69 (calendar-cursor-to-visible-date new-cursor-date)))
68 (run-hooks 'calendar-move-hook)) 70 (run-hooks 'calendar-move-hook))
69 71
72;;;###autoload
70(defun calendar-forward-year (arg) 73(defun calendar-forward-year (arg)
71 "Move the cursor forward by ARG years. 74 "Move the cursor forward by ARG years.
72Movement is backward if ARG is negative." 75Movement is backward if ARG is negative."
73 (interactive "p") 76 (interactive "p")
74 (calendar-forward-month (* 12 arg))) 77 (calendar-forward-month (* 12 arg)))
75 78
79;;;###autoload
76(defun calendar-backward-month (arg) 80(defun calendar-backward-month (arg)
77 "Move the cursor backward by ARG months. 81 "Move the cursor backward by ARG months.
78Movement is forward if ARG is negative." 82Movement is forward if ARG is negative."
79 (interactive "p") 83 (interactive "p")
80 (calendar-forward-month (- arg))) 84 (calendar-forward-month (- arg)))
81 85
86;;;###autoload
82(defun calendar-backward-year (arg) 87(defun calendar-backward-year (arg)
83 "Move the cursor backward ARG years. 88 "Move the cursor backward ARG years.
84Movement is forward is ARG is negative." 89Movement is forward is ARG is negative."
85 (interactive "p") 90 (interactive "p")
86 (calendar-forward-month (* -12 arg))) 91 (calendar-forward-month (* -12 arg)))
87 92
93;;;###autoload
88(defun calendar-scroll-left (&optional arg event) 94(defun calendar-scroll-left (&optional arg event)
89 "Scroll the displayed calendar left by ARG months. 95 "Scroll the displayed calendar left by ARG months.
90If ARG is negative the calendar is scrolled right. Maintains the relative 96If ARG is negative the calendar is scrolled right. Maintains the relative
@@ -109,6 +115,7 @@ position of the cursor with respect to the calendar as well as possible."
109 (t (list month 1 year))))))) 115 (t (list month 1 year)))))))
110 (run-hooks 'calendar-move-hook))) 116 (run-hooks 'calendar-move-hook)))
111 117
118;;;###autoload
112(defun calendar-scroll-right (&optional arg event) 119(defun calendar-scroll-right (&optional arg event)
113 "Scroll the displayed calendar window right by ARG months. 120 "Scroll the displayed calendar window right by ARG months.
114If ARG is negative the calendar is scrolled left. Maintains the relative 121If ARG is negative the calendar is scrolled left. Maintains the relative
@@ -117,6 +124,7 @@ position of the cursor with respect to the calendar as well as possible."
117 last-nonmenu-event)) 124 last-nonmenu-event))
118 (calendar-scroll-left (- (or arg 1)) event)) 125 (calendar-scroll-left (- (or arg 1)) event))
119 126
127;;;###autoload
120(defun calendar-scroll-left-three-months (arg) 128(defun calendar-scroll-left-three-months (arg)
121 "Scroll the displayed calendar window left by 3*ARG months. 129 "Scroll the displayed calendar window left by 3*ARG months.
122If ARG is negative the calendar is scrolled right. Maintains the relative 130If ARG is negative the calendar is scrolled right. Maintains the relative
@@ -124,6 +132,7 @@ position of the cursor with respect to the calendar as well as possible."
124 (interactive "p") 132 (interactive "p")
125 (calendar-scroll-left (* 3 arg))) 133 (calendar-scroll-left (* 3 arg)))
126 134
135;;;###autoload
127(defun calendar-scroll-right-three-months (arg) 136(defun calendar-scroll-right-three-months (arg)
128 "Scroll the displayed calendar window right by 3*ARG months. 137 "Scroll the displayed calendar window right by 3*ARG months.
129If ARG is negative the calendar is scrolled left. Maintains the relative 138If ARG is negative the calendar is scrolled left. Maintains the relative
@@ -131,6 +140,7 @@ position of the cursor with respect to the calendar as well as possible."
131 (interactive "p") 140 (interactive "p")
132 (calendar-scroll-left (* -3 arg))) 141 (calendar-scroll-left (* -3 arg)))
133 142
143;;;###autoload
134(defun calendar-cursor-to-nearest-date () 144(defun calendar-cursor-to-nearest-date ()
135 "Move the cursor to the closest date. 145 "Move the cursor to the closest date.
136The position of the cursor is unchanged if it is already on a date. 146The position of the cursor is unchanged if it is already on a date.
@@ -156,6 +166,7 @@ Returns the list (month day year) giving the cursor position."
156 (re-search-backward "[0-9]" nil t))) 166 (re-search-backward "[0-9]" nil t)))
157 (calendar-cursor-to-date)))) 167 (calendar-cursor-to-date))))
158 168
169;;;###autoload
159(defun calendar-forward-day (arg) 170(defun calendar-forward-day (arg)
160 "Move the cursor forward ARG days. 171 "Move the cursor forward ARG days.
161Moves backward if ARG is negative." 172Moves backward if ARG is negative."
@@ -178,24 +189,28 @@ Moves backward if ARG is negative."
178 (calendar-cursor-to-visible-date new-cursor-date))) 189 (calendar-cursor-to-visible-date new-cursor-date)))
179 (run-hooks 'calendar-move-hook)) 190 (run-hooks 'calendar-move-hook))
180 191
192;;;###autoload
181(defun calendar-backward-day (arg) 193(defun calendar-backward-day (arg)
182 "Move the cursor back ARG days. 194 "Move the cursor back ARG days.
183Moves forward if ARG is negative." 195Moves forward if ARG is negative."
184 (interactive "p") 196 (interactive "p")
185 (calendar-forward-day (- arg))) 197 (calendar-forward-day (- arg)))
186 198
199;;;###autoload
187(defun calendar-forward-week (arg) 200(defun calendar-forward-week (arg)
188 "Move the cursor forward ARG weeks. 201 "Move the cursor forward ARG weeks.
189Moves backward if ARG is negative." 202Moves backward if ARG is negative."
190 (interactive "p") 203 (interactive "p")
191 (calendar-forward-day (* arg 7))) 204 (calendar-forward-day (* arg 7)))
192 205
206;;;###autoload
193(defun calendar-backward-week (arg) 207(defun calendar-backward-week (arg)
194 "Move the cursor back ARG weeks. 208 "Move the cursor back ARG weeks.
195Moves forward if ARG is negative." 209Moves forward if ARG is negative."
196 (interactive "p") 210 (interactive "p")
197 (calendar-forward-day (* arg -7))) 211 (calendar-forward-day (* arg -7)))
198 212
213;;;###autoload
199(defun calendar-beginning-of-week (arg) 214(defun calendar-beginning-of-week (arg)
200 "Move the cursor back ARG calendar-week-start-day's." 215 "Move the cursor back ARG calendar-week-start-day's."
201 (interactive "p") 216 (interactive "p")
@@ -207,6 +222,7 @@ Moves forward if ARG is negative."
207 (+ (mod (- day calendar-week-start-day) 7) 222 (+ (mod (- day calendar-week-start-day) 7)
208 (* 7 (1- arg))))))) 223 (* 7 (1- arg)))))))
209 224
225;;;###autoload
210(defun calendar-end-of-week (arg) 226(defun calendar-end-of-week (arg)
211 "Move the cursor forward ARG calendar-week-start-day+6's." 227 "Move the cursor forward ARG calendar-week-start-day+6's."
212 (interactive "p") 228 (interactive "p")
@@ -218,6 +234,7 @@ Moves forward if ARG is negative."
218 (+ (- 6 (mod (- day calendar-week-start-day) 7)) 234 (+ (- 6 (mod (- day calendar-week-start-day) 7))
219 (* 7 (1- arg))))))) 235 (* 7 (1- arg)))))))
220 236
237;;;###autoload
221(defun calendar-beginning-of-month (arg) 238(defun calendar-beginning-of-month (arg)
222 "Move the cursor backward ARG month beginnings." 239 "Move the cursor backward ARG month beginnings."
223 (interactive "p") 240 (interactive "p")
@@ -231,6 +248,7 @@ Moves forward if ARG is negative."
231 (calendar-cursor-to-visible-date (list month 1 year)) 248 (calendar-cursor-to-visible-date (list month 1 year))
232 (calendar-backward-month (1- arg))))) 249 (calendar-backward-month (1- arg)))))
233 250
251;;;###autoload
234(defun calendar-end-of-month (arg) 252(defun calendar-end-of-month (arg)
235 "Move the cursor forward ARG month ends." 253 "Move the cursor forward ARG month ends."
236 (interactive "p") 254 (interactive "p")
@@ -254,6 +272,7 @@ Moves forward if ARG is negative."
254 (calendar-cursor-to-visible-date last-day)))) 272 (calendar-cursor-to-visible-date last-day))))
255 (run-hooks 'calendar-move-hook)) 273 (run-hooks 'calendar-move-hook))
256 274
275;;;###autoload
257(defun calendar-beginning-of-year (arg) 276(defun calendar-beginning-of-year (arg)
258 "Move the cursor backward ARG year beginnings." 277 "Move the cursor backward ARG year beginnings."
259 (interactive "p") 278 (interactive "p")
@@ -273,6 +292,7 @@ Moves forward if ARG is negative."
273 (calendar-cursor-to-visible-date (list 1 1 displayed-year))))) 292 (calendar-cursor-to-visible-date (list 1 1 displayed-year)))))
274 (run-hooks 'calendar-move-hook)) 293 (run-hooks 'calendar-move-hook))
275 294
295;;;###autoload
276(defun calendar-end-of-year (arg) 296(defun calendar-end-of-year (arg)
277 "Move the cursor forward ARG year beginnings." 297 "Move the cursor forward ARG year beginnings."
278 (interactive "p") 298 (interactive "p")
@@ -292,6 +312,7 @@ Moves forward if ARG is negative."
292 (calendar-cursor-to-visible-date (list 12 31 displayed-year))))) 312 (calendar-cursor-to-visible-date (list 12 31 displayed-year)))))
293 (run-hooks 'calendar-move-hook)) 313 (run-hooks 'calendar-move-hook))
294 314
315;;;###autoload
295(defun calendar-cursor-to-visible-date (date) 316(defun calendar-cursor-to-visible-date (date)
296 "Move the cursor to DATE that is on the screen." 317 "Move the cursor to DATE that is on the screen."
297 (let* ((month (extract-calendar-month date)) 318 (let* ((month (extract-calendar-month date))
@@ -313,7 +334,7 @@ Moves forward if ARG is negative."
313 (- (calendar-day-of-week date) 334 (- (calendar-day-of-week date)
314 calendar-week-start-day) 335 calendar-week-start-day)
315 7)))))) 336 7))))))
316 337;;;###autoload
317(defun calendar-goto-date (date) 338(defun calendar-goto-date (date)
318 "Move cursor to DATE." 339 "Move cursor to DATE."
319 (interactive (list (calendar-read-date))) 340 (interactive (list (calendar-read-date)))
@@ -328,6 +349,7 @@ Moves forward if ARG is negative."
328 (calendar-cursor-to-visible-date date) 349 (calendar-cursor-to-visible-date date)
329 (run-hooks 'calendar-move-hook)) 350 (run-hooks 'calendar-move-hook))
330 351
352;;;###autoload
331(defun calendar-goto-day-of-year (year day &optional noecho) 353(defun calendar-goto-day-of-year (year day &optional noecho)
332 "Move cursor to YEAR, DAY number; echo DAY/YEAR unless NOECHO is t. 354 "Move cursor to YEAR, DAY number; echo DAY/YEAR unless NOECHO is t.
333Negative DAY counts backward from end of year." 355Negative DAY counts backward from end of year."
@@ -340,7 +362,7 @@ Negative DAY counts backward from end of year."
340 (last (if (calendar-leap-year-p year) 366 365)) 362 (last (if (calendar-leap-year-p year) 366 365))
341 (day (calendar-read 363 (day (calendar-read
342 (format "Day number (+/- 1-%d): " last) 364 (format "Day number (+/- 1-%d): " last)
343 '(lambda (x) (and (<= 1 (abs x)) (<= (abs x) last)))))) 365 (lambda (x) (and (<= 1 (abs x)) (<= (abs x) last))))))
344 (list year day))) 366 (list year day)))
345 (calendar-goto-date 367 (calendar-goto-date
346 (calendar-gregorian-from-absolute 368 (calendar-gregorian-from-absolute
@@ -361,5 +383,9 @@ Negative DAY counts backward from end of year."
361 383
362(provide 'cal-move) 384(provide 'cal-move)
363 385
386;; Local Variables:
387;; generated-autoload-file: "cal-loaddefs.el"
388;; End:
389
364;; arch-tag: d0883c46-7e16-4914-8ff8-8f67e699b781 390;; arch-tag: d0883c46-7e16-4914-8ff8-8f67e699b781
365;;; cal-move.el ends here 391;;; cal-move.el ends here
diff --git a/lisp/calendar/cal-persia.el b/lisp/calendar/cal-persia.el
index 2c28d5c8efc..c4f80ce80e5 100644
--- a/lisp/calendar/cal-persia.el
+++ b/lisp/calendar/cal-persia.el
@@ -140,6 +140,7 @@ Gregorian date Sunday, December 31, 1 BC."
140 (list month 1 year)))))) 140 (list month 1 year))))))
141 (list month day year))) 141 (list month day year)))
142 142
143;;;###autoload
143(defun calendar-persian-date-string (&optional date) 144(defun calendar-persian-date-string (&optional date)
144 "String of Persian date of Gregorian DATE. 145 "String of Persian date of Gregorian DATE.
145Defaults to today's date if DATE is not given." 146Defaults to today's date if DATE is not given."
@@ -155,12 +156,14 @@ Defaults to today's date if DATE is not given."
155 (year (int-to-string y))) 156 (year (int-to-string y)))
156 (mapconcat 'eval calendar-date-display-form "")))) 157 (mapconcat 'eval calendar-date-display-form ""))))
157 158
159;;;###autoload
158(defun calendar-print-persian-date () 160(defun calendar-print-persian-date ()
159 "Show the Persian calendar equivalent of the selected date." 161 "Show the Persian calendar equivalent of the selected date."
160 (interactive) 162 (interactive)
161 (message "Persian date: %s" 163 (message "Persian date: %s"
162 (calendar-persian-date-string (calendar-cursor-to-date t)))) 164 (calendar-persian-date-string (calendar-cursor-to-date t))))
163 165
166;;;###autoload
164(defun calendar-goto-persian-date (date &optional noecho) 167(defun calendar-goto-persian-date (date &optional noecho)
165 "Move cursor to Persian date DATE. 168 "Move cursor to Persian date DATE.
166Echo Persian date unless NOECHO is t." 169Echo Persian date unless NOECHO is t."
@@ -174,7 +177,7 @@ Echo Persian date unless NOECHO is t."
174 (let* ((today (calendar-current-date)) 177 (let* ((today (calendar-current-date))
175 (year (calendar-read 178 (year (calendar-read
176 "Persian calendar year (not 0): " 179 "Persian calendar year (not 0): "
177 '(lambda (x) (/= x 0)) 180 (lambda (x) (/= x 0))
178 (int-to-string 181 (int-to-string
179 (extract-calendar-year 182 (extract-calendar-year
180 (calendar-persian-from-absolute 183 (calendar-persian-from-absolute
@@ -191,7 +194,7 @@ Echo Persian date unless NOECHO is t."
191 (last (persian-calendar-last-day-of-month month year)) 194 (last (persian-calendar-last-day-of-month month year))
192 (day (calendar-read 195 (day (calendar-read
193 (format "Persian calendar day (1-%d): " last) 196 (format "Persian calendar day (1-%d): " last)
194 '(lambda (x) (and (< 0 x) (<= x last)))))) 197 (lambda (x) (and (< 0 x) (<= x last))))))
195 (list (list month day year)))) 198 (list (list month day year))))
196 199
197(defun diary-persian-date () 200(defun diary-persian-date ()
@@ -200,5 +203,9 @@ Echo Persian date unless NOECHO is t."
200 203
201(provide 'cal-persia) 204(provide 'cal-persia)
202 205
203;;; arch-tag: 2832383c-e4b4-4dc2-8ee9-cfbdd53e5e2d 206;; Local Variables:
207;; generated-autoload-file: "cal-loaddefs.el"
208;; End:
209
210;; arch-tag: 2832383c-e4b4-4dc2-8ee9-cfbdd53e5e2d
204;;; cal-persia.el ends here 211;;; cal-persia.el ends here