diff options
| author | Glenn Morris | 2008-03-29 02:43:32 +0000 |
|---|---|---|
| committer | Glenn Morris | 2008-03-29 02:43:32 +0000 |
| commit | 41099a1bea7b86265499c8a96fe6bceaac4e72e4 (patch) | |
| tree | b5d43baeddfa2abb36e9e2588f74523e35cb1722 | |
| parent | 8743fe88edade8cbf5e9cca2dac9729c181fb75a (diff) | |
| download | emacs-41099a1bea7b86265499c8a96fe6bceaac4e72e4.tar.gz emacs-41099a1bea7b86265499c8a96fe6bceaac4e72e4.zip | |
Autoload diary-insert-entry-1.
(insert-islamic-diary-entry, insert-monthly-islamic-diary-entry)
(insert-yearly-islamic-diary-entry): Use diary-insert-entry-1.
| -rw-r--r-- | lisp/calendar/cal-islam.el | 42 |
1 files changed, 13 insertions, 29 deletions
diff --git a/lisp/calendar/cal-islam.el b/lisp/calendar/cal-islam.el index 35aa846642b..e8f5235217d 100644 --- a/lisp/calendar/cal-islam.el +++ b/lisp/calendar/cal-islam.el | |||
| @@ -192,7 +192,7 @@ nil if it is not visible in the current calendar window." | |||
| 192 | (list displayed-month 15 displayed-year)))) | 192 | (list displayed-month 15 displayed-year)))) |
| 193 | (m (extract-calendar-month islamic-date)) | 193 | (m (extract-calendar-month islamic-date)) |
| 194 | (y (extract-calendar-year islamic-date)) | 194 | (y (extract-calendar-year islamic-date)) |
| 195 | (date)) | 195 | date) |
| 196 | (unless (< m 1) ; Islamic calendar doesn't apply | 196 | (unless (< m 1) ; Islamic calendar doesn't apply |
| 197 | (increment-calendar-month m y (- 10 month)) | 197 | (increment-calendar-month m y (- 10 month)) |
| 198 | (if (> m 7) ; Islamic date might be visible | 198 | (if (> m 7) ; Islamic date might be visible |
| @@ -241,20 +241,18 @@ window. See `list-islamic-diary-entries' for more information." | |||
| 241 | 'calendar-islamic-from-absolute | 241 | 'calendar-islamic-from-absolute |
| 242 | 'mark-islamic-calendar-date-pattern)) | 242 | 'mark-islamic-calendar-date-pattern)) |
| 243 | 243 | ||
| 244 | |||
| 245 | (autoload 'diary-insert-entry-1 "diary-lib") | ||
| 246 | |||
| 244 | ;;;###cal-autoload | 247 | ;;;###cal-autoload |
| 245 | (defun insert-islamic-diary-entry (arg) | 248 | (defun insert-islamic-diary-entry (arg) |
| 246 | "Insert a diary entry. | 249 | "Insert a diary entry. |
| 247 | For the Islamic date corresponding to the date indicated by point. | 250 | For the Islamic date corresponding to the date indicated by point. |
| 248 | Prefix argument ARG makes the entry nonmarking." | 251 | Prefix argument ARG makes the entry nonmarking." |
| 249 | (interactive "P") | 252 | (interactive "P") |
| 250 | (let ((calendar-month-name-array calendar-islamic-month-name-array)) | 253 | (diary-insert-entry-1 nil arg calendar-islamic-month-name-array |
| 251 | (make-diary-entry | 254 | islamic-diary-entry-symbol |
| 252 | (concat islamic-diary-entry-symbol | 255 | 'calendar-islamic-from-absolute)) |
| 253 | (calendar-date-string | ||
| 254 | (calendar-islamic-from-absolute | ||
| 255 | (calendar-absolute-from-gregorian (calendar-cursor-to-date t))) | ||
| 256 | nil t)) | ||
| 257 | arg))) | ||
| 258 | 256 | ||
| 259 | ;;;###cal-autoload | 257 | ;;;###cal-autoload |
| 260 | (defun insert-monthly-islamic-diary-entry (arg) | 258 | (defun insert-monthly-islamic-diary-entry (arg) |
| @@ -262,16 +260,9 @@ Prefix argument ARG makes the entry nonmarking." | |||
| 262 | For the day of the Islamic month corresponding to the date indicated by point. | 260 | For the day of the Islamic month corresponding to the date indicated by point. |
| 263 | Prefix argument ARG makes the entry nonmarking." | 261 | Prefix argument ARG makes the entry nonmarking." |
| 264 | (interactive "P") | 262 | (interactive "P") |
| 265 | (let ((calendar-date-display-form (if european-calendar-style | 263 | (diary-insert-entry-1 'monthly arg calendar-islamic-month-name-array |
| 266 | '(day " * ") | 264 | islamic-diary-entry-symbol |
| 267 | '("* " day ))) | 265 | 'calendar-islamic-from-absolute)) |
| 268 | (calendar-month-name-array calendar-islamic-month-name-array)) | ||
| 269 | (make-diary-entry | ||
| 270 | (concat islamic-diary-entry-symbol | ||
| 271 | (calendar-date-string | ||
| 272 | (calendar-islamic-from-absolute | ||
| 273 | (calendar-absolute-from-gregorian (calendar-cursor-to-date t))))) | ||
| 274 | arg))) | ||
| 275 | 266 | ||
| 276 | ;;;###cal-autoload | 267 | ;;;###cal-autoload |
| 277 | (defun insert-yearly-islamic-diary-entry (arg) | 268 | (defun insert-yearly-islamic-diary-entry (arg) |
| @@ -279,16 +270,9 @@ Prefix argument ARG makes the entry nonmarking." | |||
| 279 | For the day of the Islamic year corresponding to the date indicated by point. | 270 | For the day of the Islamic year corresponding to the date indicated by point. |
| 280 | Prefix argument ARG makes the entry nonmarking." | 271 | Prefix argument ARG makes the entry nonmarking." |
| 281 | (interactive "P") | 272 | (interactive "P") |
| 282 | (let ((calendar-date-display-form (if european-calendar-style | 273 | (diary-insert-entry-1 'yearly arg calendar-islamic-month-name-array |
| 283 | '(day " " monthname) | 274 | islamic-diary-entry-symbol |
| 284 | '(monthname " " day))) | 275 | 'calendar-islamic-from-absolute)) |
| 285 | (calendar-month-name-array calendar-islamic-month-name-array)) | ||
| 286 | (make-diary-entry | ||
| 287 | (concat islamic-diary-entry-symbol | ||
| 288 | (calendar-date-string | ||
| 289 | (calendar-islamic-from-absolute | ||
| 290 | (calendar-absolute-from-gregorian (calendar-cursor-to-date t))))) | ||
| 291 | arg))) | ||
| 292 | 276 | ||
| 293 | (defvar date) | 277 | (defvar date) |
| 294 | 278 | ||