aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2008-03-29 02:42:52 +0000
committerGlenn Morris2008-03-29 02:42:52 +0000
commit8743fe88edade8cbf5e9cca2dac9729c181fb75a (patch)
treef9e4994f200c73b9eaccb4523b7ddf580a047889
parent146df8458679fd5043ce585655dadf03a5f152b2 (diff)
downloademacs-8743fe88edade8cbf5e9cca2dac9729c181fb75a.tar.gz
emacs-8743fe88edade8cbf5e9cca2dac9729c181fb75a.zip
Autoload diary-insert-entry-1.
(diary-bahai-insert-entry, diary-bahai-insert-monthly-entry) (diary-bahai-insert-yearly-entry): Use diary-insert-entry-1.
-rw-r--r--lisp/calendar/cal-bahai.el42
1 files changed, 13 insertions, 29 deletions
diff --git a/lisp/calendar/cal-bahai.el b/lisp/calendar/cal-bahai.el
index 25387972a91..21978cacbf4 100644
--- a/lisp/calendar/cal-bahai.el
+++ b/lisp/calendar/cal-bahai.el
@@ -206,7 +206,7 @@ nil if it is not visible in the current calendar window."
206 (list displayed-month 15 displayed-year)))) 206 (list displayed-month 15 displayed-year))))
207 (m (extract-calendar-month bahai-date)) 207 (m (extract-calendar-month bahai-date))
208 (y (extract-calendar-year bahai-date)) 208 (y (extract-calendar-year bahai-date))
209 (date)) 209 date)
210 (unless (< m 1) ; Bahá'í calendar doesn't apply 210 (unless (< m 1) ; Bahá'í calendar doesn't apply
211 (increment-calendar-month m y (- 10 month)) 211 (increment-calendar-month m y (- 10 month))
212 (if (> m 7) ; Bahá'í date might be visible 212 (if (> m 7) ; Bahá'í date might be visible
@@ -264,20 +264,18 @@ window. See `diary-bahai-list-entries' for more information."
264(define-obsolete-function-alias 264(define-obsolete-function-alias
265 'mark-bahai-diary-entries 'diary-bahai-mark-entries "23.1") 265 'mark-bahai-diary-entries 'diary-bahai-mark-entries "23.1")
266 266
267
268(autoload 'diary-insert-entry-1 "diary-lib")
269
267;;;###cal-autoload 270;;;###cal-autoload
268(defun diary-bahai-insert-entry (arg) 271(defun diary-bahai-insert-entry (arg)
269 "Insert a diary entry. 272 "Insert a diary entry.
270For the Bahá'í date corresponding to the date indicated by point. 273For the Bahá'í date corresponding to the date indicated by point.
271Prefix argument ARG makes the entry nonmarking." 274Prefix argument ARG makes the entry nonmarking."
272 (interactive "P") 275 (interactive "P")
273 (let ((calendar-month-name-array calendar-bahai-month-name-array)) 276 (diary-insert-entry-1 nil arg calendar-bahai-month-name-array
274 (make-diary-entry 277 bahai-diary-entry-symbol
275 (concat bahai-diary-entry-symbol 278 'calendar-bahai-from-absolute))
276 (calendar-date-string
277 (calendar-bahai-from-absolute
278 (calendar-absolute-from-gregorian (calendar-cursor-to-date t)))
279 nil t))
280 arg)))
281 279
282(define-obsolete-function-alias 280(define-obsolete-function-alias
283 'insert-bahai-diary-entry 'diary-bahai-insert-entry "23.1") 281 'insert-bahai-diary-entry 'diary-bahai-insert-entry "23.1")
@@ -288,16 +286,9 @@ Prefix argument ARG makes the entry nonmarking."
288For the day of the Bahá'í month corresponding to the date indicated by point. 286For the day of the Bahá'í month corresponding to the date indicated by point.
289Prefix argument ARG makes the entry nonmarking." 287Prefix argument ARG makes the entry nonmarking."
290 (interactive "P") 288 (interactive "P")
291 (let ((calendar-date-display-form (if european-calendar-style 289 (diary-insert-entry-1 'monthly arg calendar-bahai-month-name-array
292 '(day " * ") 290 bahai-diary-entry-symbol
293 '("* " day ))) 291 'calendar-bahai-from-absolute))
294 (calendar-month-name-array calendar-bahai-month-name-array))
295 (make-diary-entry
296 (concat bahai-diary-entry-symbol
297 (calendar-date-string
298 (calendar-bahai-from-absolute
299 (calendar-absolute-from-gregorian (calendar-cursor-to-date t)))))
300 arg)))
301 292
302(define-obsolete-function-alias 293(define-obsolete-function-alias
303 'insert-monthly-bahai-diary-entry 'diary-bahai-insert-monthly-entry "23.1") 294 'insert-monthly-bahai-diary-entry 'diary-bahai-insert-monthly-entry "23.1")
@@ -308,16 +299,9 @@ Prefix argument ARG makes the entry nonmarking."
308For the day of the Bahá'í year corresponding to the date indicated by point. 299For the day of the Bahá'í year corresponding to the date indicated by point.
309Prefix argument ARG will make the entry nonmarking." 300Prefix argument ARG will make the entry nonmarking."
310 (interactive "P") 301 (interactive "P")
311 (let ((calendar-date-display-form (if european-calendar-style 302 (diary-insert-entry-1 'yearly arg calendar-bahai-month-name-array
312 '(day " " monthname) 303 bahai-diary-entry-symbol
313 '(monthname " " day))) 304 'calendar-bahai-from-absolute))
314 (calendar-month-name-array calendar-bahai-month-name-array))
315 (make-diary-entry
316 (concat bahai-diary-entry-symbol
317 (calendar-date-string
318 (calendar-bahai-from-absolute
319 (calendar-absolute-from-gregorian (calendar-cursor-to-date t)))))
320 arg)))
321 305
322(define-obsolete-function-alias 306(define-obsolete-function-alias
323 'insert-yearly-bahai-diary-entry 'diary-bahai-insert-yearly-entry "23.1") 307 'insert-yearly-bahai-diary-entry 'diary-bahai-insert-yearly-entry "23.1")