annotate lisp/=diary-ins.el @ 20954:19094d61a428

Fix indentation rules for multiple-value-setf and multiple-value-list.
author Karl Heuer <kwzh@gnu.org>
date Sun, 22 Feb 1998 00:30:03 +0000
parents b2082d0b1db9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2326
cac023fe9d13 * diary-insert.el: Change the name to diary-ins.el.
Jim Blandy <jimb@redhat.com>
parents: 2166
diff changeset
1 ;;; diary-ins.el --- calendar functions for adding diary entries.
957
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
2
5830
6bcdc3ad365d (insert-diary-entry,insert-weekly-diary-entry,
Richard M. Stallman <rms@gnu.org>
parents: 3868
diff changeset
3 ;; Copyright (C) 1990, 1994 Free Software Foundation, Inc.
957
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
4
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
5 ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu>
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
6 ;; Keywords: diary, calendar
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
7
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
8 ;; This file is part of GNU Emacs.
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
9
6736
3e1323443b1a Fix copying conditions for current GPL version.
Richard M. Stallman <rms@gnu.org>
parents: 5830
diff changeset
10 ;; GNU Emacs is free software; you can redistribute it and/or modify
3e1323443b1a Fix copying conditions for current GPL version.
Richard M. Stallman <rms@gnu.org>
parents: 5830
diff changeset
11 ;; it under the terms of the GNU General Public License as published by
3e1323443b1a Fix copying conditions for current GPL version.
Richard M. Stallman <rms@gnu.org>
parents: 5830
diff changeset
12 ;; the Free Software Foundation; either version 2, or (at your option)
3e1323443b1a Fix copying conditions for current GPL version.
Richard M. Stallman <rms@gnu.org>
parents: 5830
diff changeset
13 ;; any later version.
957
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
14
6736
3e1323443b1a Fix copying conditions for current GPL version.
Richard M. Stallman <rms@gnu.org>
parents: 5830
diff changeset
15 ;; GNU Emacs is distributed in the hope that it will be useful,
3e1323443b1a Fix copying conditions for current GPL version.
Richard M. Stallman <rms@gnu.org>
parents: 5830
diff changeset
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
3e1323443b1a Fix copying conditions for current GPL version.
Richard M. Stallman <rms@gnu.org>
parents: 5830
diff changeset
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3e1323443b1a Fix copying conditions for current GPL version.
Richard M. Stallman <rms@gnu.org>
parents: 5830
diff changeset
18 ;; GNU General Public License for more details.
3e1323443b1a Fix copying conditions for current GPL version.
Richard M. Stallman <rms@gnu.org>
parents: 5830
diff changeset
19
3e1323443b1a Fix copying conditions for current GPL version.
Richard M. Stallman <rms@gnu.org>
parents: 5830
diff changeset
20 ;; You should have received a copy of the GNU General Public License
3e1323443b1a Fix copying conditions for current GPL version.
Richard M. Stallman <rms@gnu.org>
parents: 5830
diff changeset
21 ;; along with GNU Emacs; see the file COPYING. If not, write to
3e1323443b1a Fix copying conditions for current GPL version.
Richard M. Stallman <rms@gnu.org>
parents: 5830
diff changeset
22 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
957
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
23
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
24 ;;; Commentary:
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
25
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
26 ;; This collection of functions implements the diary insertion features as
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
27 ;; described in calendar.el.
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
28
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
29 ;; Comments, corrections, and improvements should be sent to
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
30 ;; Edward M. Reingold Department of Computer Science
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
31 ;; (217) 333-6733 University of Illinois at Urbana-Champaign
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
32 ;; reingold@cs.uiuc.edu 1304 West Springfield Avenue
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
33 ;; Urbana, Illinois 61801
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
34
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
35 ;;; Code:
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
36
8658
b2082d0b1db9 Require diary-lib, not diary.
Richard M. Stallman <rms@gnu.org>
parents: 6736
diff changeset
37 (require 'diary-lib)
957
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
38
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
39 (defun make-diary-entry (string &optional nonmarking file)
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
40 "Insert a diary entry STRING which may be NONMARKING in FILE.
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
41 If omitted, NONMARKING defaults to nil and FILE defaults to diary-file."
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
42 (find-file-other-window
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
43 (substitute-in-file-name (if file file diary-file)))
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
44 (goto-char (point-max))
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
45 (insert
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
46 (if (bolp) "" "\n")
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
47 (if nonmarking diary-nonmarking-symbol "")
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
48 string " "))
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
49
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
50 (defun insert-diary-entry (arg)
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
51 "Insert a diary entry for the date indicated by point.
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
52 Prefix arg will make the entry nonmarking."
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
53 (interactive "P")
5830
6bcdc3ad365d (insert-diary-entry,insert-weekly-diary-entry,
Richard M. Stallman <rms@gnu.org>
parents: 3868
diff changeset
54 (make-diary-entry (calendar-date-string (calendar-cursor-to-date t) t t)
6bcdc3ad365d (insert-diary-entry,insert-weekly-diary-entry,
Richard M. Stallman <rms@gnu.org>
parents: 3868
diff changeset
55 arg))
957
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
56
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
57 (defun insert-weekly-diary-entry (arg)
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
58 "Insert a weekly diary entry for the day of the week indicated by point.
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
59 Prefix arg will make the entry nonmarking."
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
60 (interactive "P")
5830
6bcdc3ad365d (insert-diary-entry,insert-weekly-diary-entry,
Richard M. Stallman <rms@gnu.org>
parents: 3868
diff changeset
61 (make-diary-entry (calendar-day-name (calendar-cursor-to-date t))
6bcdc3ad365d (insert-diary-entry,insert-weekly-diary-entry,
Richard M. Stallman <rms@gnu.org>
parents: 3868
diff changeset
62 arg))
957
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
63
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
64 (defun insert-monthly-diary-entry (arg)
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
65 "Insert a monthly diary entry for the day of the month indicated by point.
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
66 Prefix arg will make the entry nonmarking."
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
67 (interactive "P")
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
68 (let* ((calendar-date-display-form
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
69 (if european-calendar-style
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
70 '(day " * ")
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
71 '("* " day))))
5830
6bcdc3ad365d (insert-diary-entry,insert-weekly-diary-entry,
Richard M. Stallman <rms@gnu.org>
parents: 3868
diff changeset
72 (make-diary-entry (calendar-date-string (calendar-cursor-to-date t) t)
6bcdc3ad365d (insert-diary-entry,insert-weekly-diary-entry,
Richard M. Stallman <rms@gnu.org>
parents: 3868
diff changeset
73 arg)))
957
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
74
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
75 (defun insert-yearly-diary-entry (arg)
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
76 "Insert an annual diary entry for the day of the year indicated by point.
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
77 Prefix arg will make the entry nonmarking."
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
78 (interactive "P")
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
79 (let* ((calendar-date-display-form
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
80 (if european-calendar-style
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
81 '(day " " monthname)
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
82 '(monthname " " day))))
5830
6bcdc3ad365d (insert-diary-entry,insert-weekly-diary-entry,
Richard M. Stallman <rms@gnu.org>
parents: 3868
diff changeset
83 (make-diary-entry (calendar-date-string (calendar-cursor-to-date t) t)
6bcdc3ad365d (insert-diary-entry,insert-weekly-diary-entry,
Richard M. Stallman <rms@gnu.org>
parents: 3868
diff changeset
84 arg)))
957
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
85
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
86 (defun insert-anniversary-diary-entry (arg)
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
87 "Insert an anniversary diary entry for the date given by point.
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
88 Prefix arg will make the entry nonmarking."
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
89 (interactive "P")
2166
878f67b482b1 * diary-insert.el (insert-anniversary-diary-entry,
Jim Blandy <jimb@redhat.com>
parents: 1356
diff changeset
90 (let* ((calendar-date-display-form
878f67b482b1 * diary-insert.el (insert-anniversary-diary-entry,
Jim Blandy <jimb@redhat.com>
parents: 1356
diff changeset
91 (if european-calendar-style
878f67b482b1 * diary-insert.el (insert-anniversary-diary-entry,
Jim Blandy <jimb@redhat.com>
parents: 1356
diff changeset
92 '(day " " month " " year)
878f67b482b1 * diary-insert.el (insert-anniversary-diary-entry,
Jim Blandy <jimb@redhat.com>
parents: 1356
diff changeset
93 '(month " " day " " year))))
878f67b482b1 * diary-insert.el (insert-anniversary-diary-entry,
Jim Blandy <jimb@redhat.com>
parents: 1356
diff changeset
94 (make-diary-entry
878f67b482b1 * diary-insert.el (insert-anniversary-diary-entry,
Jim Blandy <jimb@redhat.com>
parents: 1356
diff changeset
95 (format "%s(diary-anniversary %s)"
878f67b482b1 * diary-insert.el (insert-anniversary-diary-entry,
Jim Blandy <jimb@redhat.com>
parents: 1356
diff changeset
96 sexp-diary-entry-symbol
5830
6bcdc3ad365d (insert-diary-entry,insert-weekly-diary-entry,
Richard M. Stallman <rms@gnu.org>
parents: 3868
diff changeset
97 (calendar-date-string (calendar-cursor-to-date t) nil t))
2166
878f67b482b1 * diary-insert.el (insert-anniversary-diary-entry,
Jim Blandy <jimb@redhat.com>
parents: 1356
diff changeset
98 arg)))
957
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
99
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
100 (defun insert-block-diary-entry (arg)
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
101 "Insert a block diary entry for the days between the point and marked date.
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
102 Prefix arg will make the entry nonmarking."
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
103 (interactive "P")
2166
878f67b482b1 * diary-insert.el (insert-anniversary-diary-entry,
Jim Blandy <jimb@redhat.com>
parents: 1356
diff changeset
104 (let* ((calendar-date-display-form
878f67b482b1 * diary-insert.el (insert-anniversary-diary-entry,
Jim Blandy <jimb@redhat.com>
parents: 1356
diff changeset
105 (if european-calendar-style
878f67b482b1 * diary-insert.el (insert-anniversary-diary-entry,
Jim Blandy <jimb@redhat.com>
parents: 1356
diff changeset
106 '(day " " month " " year)
878f67b482b1 * diary-insert.el (insert-anniversary-diary-entry,
Jim Blandy <jimb@redhat.com>
parents: 1356
diff changeset
107 '(month " " day " " year)))
5830
6bcdc3ad365d (insert-diary-entry,insert-weekly-diary-entry,
Richard M. Stallman <rms@gnu.org>
parents: 3868
diff changeset
108 (cursor (calendar-cursor-to-date t))
957
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
109 (mark (or (car calendar-mark-ring)
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
110 (error "No mark set in this buffer")))
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
111 (start)
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
112 (end))
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
113 (if (< (calendar-absolute-from-gregorian mark)
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
114 (calendar-absolute-from-gregorian cursor))
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
115 (setq start mark
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
116 end cursor)
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
117 (setq start cursor
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
118 end mark))
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
119 (make-diary-entry
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
120 (format "%s(diary-block %s %s)"
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
121 sexp-diary-entry-symbol
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
122 (calendar-date-string start nil t)
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
123 (calendar-date-string end nil t))
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
124 arg)))
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
125
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
126 (defun insert-cyclic-diary-entry (arg)
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
127 "Insert a cyclic diary entry starting at the date given by point.
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
128 Prefix arg will make the entry nonmarking."
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
129 (interactive "P")
3868
a400864e4e37 * diary-ins.el (insert-cyclic-diary-entry): Fix date form.
Jim Blandy <jimb@redhat.com>
parents: 2326
diff changeset
130 (let* ((calendar-date-display-form
a400864e4e37 * diary-ins.el (insert-cyclic-diary-entry): Fix date form.
Jim Blandy <jimb@redhat.com>
parents: 2326
diff changeset
131 (if european-calendar-style
a400864e4e37 * diary-ins.el (insert-cyclic-diary-entry): Fix date form.
Jim Blandy <jimb@redhat.com>
parents: 2326
diff changeset
132 '(day " " month " " year)
a400864e4e37 * diary-ins.el (insert-cyclic-diary-entry): Fix date form.
Jim Blandy <jimb@redhat.com>
parents: 2326
diff changeset
133 '(month " " day " " year))))
a400864e4e37 * diary-ins.el (insert-cyclic-diary-entry): Fix date form.
Jim Blandy <jimb@redhat.com>
parents: 2326
diff changeset
134 (make-diary-entry
a400864e4e37 * diary-ins.el (insert-cyclic-diary-entry): Fix date form.
Jim Blandy <jimb@redhat.com>
parents: 2326
diff changeset
135 (format "%s(diary-cyclic %d %s)"
a400864e4e37 * diary-ins.el (insert-cyclic-diary-entry): Fix date form.
Jim Blandy <jimb@redhat.com>
parents: 2326
diff changeset
136 sexp-diary-entry-symbol
a400864e4e37 * diary-ins.el (insert-cyclic-diary-entry): Fix date form.
Jim Blandy <jimb@redhat.com>
parents: 2326
diff changeset
137 (calendar-read "Repeat every how many days: "
a400864e4e37 * diary-ins.el (insert-cyclic-diary-entry): Fix date form.
Jim Blandy <jimb@redhat.com>
parents: 2326
diff changeset
138 '(lambda (x) (> x 0)))
5830
6bcdc3ad365d (insert-diary-entry,insert-weekly-diary-entry,
Richard M. Stallman <rms@gnu.org>
parents: 3868
diff changeset
139 (calendar-date-string (calendar-cursor-to-date t) nil t))
3868
a400864e4e37 * diary-ins.el (insert-cyclic-diary-entry): Fix date form.
Jim Blandy <jimb@redhat.com>
parents: 2326
diff changeset
140 arg)))
957
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
141
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
142 (defun insert-hebrew-diary-entry (arg)
1356
dcf780f7ae1b Doc fix.
Christopher Zaborsky <rogue@erratum.com>
parents: 957
diff changeset
143 "Insert a diary entry.
dcf780f7ae1b Doc fix.
Christopher Zaborsky <rogue@erratum.com>
parents: 957
diff changeset
144 For the Hebrew date corresponding to the date indicated by point.
dcf780f7ae1b Doc fix.
Christopher Zaborsky <rogue@erratum.com>
parents: 957
diff changeset
145 Prefix arg will make the entry nonmarking."
957
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
146 (interactive "P")
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
147 (let* ((calendar-month-name-array
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
148 calendar-hebrew-month-name-array-leap-year))
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
149 (make-diary-entry
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
150 (concat
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
151 hebrew-diary-entry-symbol
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
152 (calendar-date-string
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
153 (calendar-hebrew-from-absolute
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
154 (calendar-absolute-from-gregorian
5830
6bcdc3ad365d (insert-diary-entry,insert-weekly-diary-entry,
Richard M. Stallman <rms@gnu.org>
parents: 3868
diff changeset
155 (calendar-cursor-to-date t)))
957
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
156 nil t))
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
157 arg)))
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
158
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
159 (defun insert-monthly-hebrew-diary-entry (arg)
1356
dcf780f7ae1b Doc fix.
Christopher Zaborsky <rogue@erratum.com>
parents: 957
diff changeset
160 "Insert a monthly diary entry.
dcf780f7ae1b Doc fix.
Christopher Zaborsky <rogue@erratum.com>
parents: 957
diff changeset
161 For the day of the Hebrew month corresponding to the date indicated by point.
dcf780f7ae1b Doc fix.
Christopher Zaborsky <rogue@erratum.com>
parents: 957
diff changeset
162 Prefix arg will make the entry nonmarking."
957
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
163 (interactive "P")
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
164 (let* ((calendar-date-display-form
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
165 (if european-calendar-style '(day " * ") '("* " day )))
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
166 (calendar-month-name-array
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
167 calendar-hebrew-month-name-array-leap-year))
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
168 (make-diary-entry
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
169 (concat
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
170 hebrew-diary-entry-symbol
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
171 (calendar-date-string
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
172 (calendar-hebrew-from-absolute
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
173 (calendar-absolute-from-gregorian
5830
6bcdc3ad365d (insert-diary-entry,insert-weekly-diary-entry,
Richard M. Stallman <rms@gnu.org>
parents: 3868
diff changeset
174 (calendar-cursor-to-date t)))))
957
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
175 arg)))
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
176
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
177 (defun insert-yearly-hebrew-diary-entry (arg)
1356
dcf780f7ae1b Doc fix.
Christopher Zaborsky <rogue@erratum.com>
parents: 957
diff changeset
178 "Insert an annual diary entry.
dcf780f7ae1b Doc fix.
Christopher Zaborsky <rogue@erratum.com>
parents: 957
diff changeset
179 For the day of the Hebrew year corresponding to the date indicated by point.
dcf780f7ae1b Doc fix.
Christopher Zaborsky <rogue@erratum.com>
parents: 957
diff changeset
180 Prefix arg will make the entry nonmarking."
957
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
181 (interactive "P")
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
182 (let* ((calendar-date-display-form
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
183 (if european-calendar-style
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
184 '(day " " monthname)
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
185 '(monthname " " day)))
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
186 (calendar-month-name-array
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
187 calendar-hebrew-month-name-array-leap-year))
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
188 (make-diary-entry
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
189 (concat
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
190 hebrew-diary-entry-symbol
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
191 (calendar-date-string
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
192 (calendar-hebrew-from-absolute
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
193 (calendar-absolute-from-gregorian
5830
6bcdc3ad365d (insert-diary-entry,insert-weekly-diary-entry,
Richard M. Stallman <rms@gnu.org>
parents: 3868
diff changeset
194 (calendar-cursor-to-date t)))))
957
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
195 arg)))
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
196
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
197 (defun insert-islamic-diary-entry (arg)
1356
dcf780f7ae1b Doc fix.
Christopher Zaborsky <rogue@erratum.com>
parents: 957
diff changeset
198 "Insert a diary entry.
dcf780f7ae1b Doc fix.
Christopher Zaborsky <rogue@erratum.com>
parents: 957
diff changeset
199 For the Islamic date corresponding to the date indicated by point.
dcf780f7ae1b Doc fix.
Christopher Zaborsky <rogue@erratum.com>
parents: 957
diff changeset
200 Prefix arg will make the entry nonmarking."
957
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
201 (interactive "P")
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
202 (let* ((calendar-month-name-array calendar-islamic-month-name-array))
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
203 (make-diary-entry
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
204 (concat
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
205 islamic-diary-entry-symbol
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
206 (calendar-date-string
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
207 (calendar-islamic-from-absolute
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
208 (calendar-absolute-from-gregorian
5830
6bcdc3ad365d (insert-diary-entry,insert-weekly-diary-entry,
Richard M. Stallman <rms@gnu.org>
parents: 3868
diff changeset
209 (calendar-cursor-to-date t)))
957
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
210 nil t))
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
211 arg)))
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
212
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
213 (defun insert-monthly-islamic-diary-entry (arg)
1356
dcf780f7ae1b Doc fix.
Christopher Zaborsky <rogue@erratum.com>
parents: 957
diff changeset
214 "Insert a monthly diary entry.
dcf780f7ae1b Doc fix.
Christopher Zaborsky <rogue@erratum.com>
parents: 957
diff changeset
215 For the day of the Islamic month corresponding to the date indicated by point.
dcf780f7ae1b Doc fix.
Christopher Zaborsky <rogue@erratum.com>
parents: 957
diff changeset
216 Prefix arg will make the entry nonmarking."
957
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
217 (interactive "P")
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
218 (let* ((calendar-date-display-form
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
219 (if european-calendar-style '(day " * ") '("* " day )))
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
220 (calendar-month-name-array calendar-islamic-month-name-array))
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
221 (make-diary-entry
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
222 (concat
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
223 islamic-diary-entry-symbol
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
224 (calendar-date-string
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
225 (calendar-islamic-from-absolute
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
226 (calendar-absolute-from-gregorian
5830
6bcdc3ad365d (insert-diary-entry,insert-weekly-diary-entry,
Richard M. Stallman <rms@gnu.org>
parents: 3868
diff changeset
227 (calendar-cursor-to-date t)))))
957
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
228 arg)))
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
229
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
230 (defun insert-yearly-islamic-diary-entry (arg)
1356
dcf780f7ae1b Doc fix.
Christopher Zaborsky <rogue@erratum.com>
parents: 957
diff changeset
231 "Insert an annual diary entry.
dcf780f7ae1b Doc fix.
Christopher Zaborsky <rogue@erratum.com>
parents: 957
diff changeset
232 For the day of the Islamic year corresponding to the date indicated by point.
dcf780f7ae1b Doc fix.
Christopher Zaborsky <rogue@erratum.com>
parents: 957
diff changeset
233 Prefix arg will make the entry nonmarking."
957
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
234 (interactive "P")
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
235 (let* ((calendar-date-display-form
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
236 (if european-calendar-style
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
237 '(day " " monthname)
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
238 '(monthname " " day)))
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
239 (calendar-month-name-array calendar-islamic-month-name-array))
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
240 (make-diary-entry
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
241 (concat
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
242 islamic-diary-entry-symbol
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
243 (calendar-date-string
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
244 (calendar-islamic-from-absolute
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
245 (calendar-absolute-from-gregorian
5830
6bcdc3ad365d (insert-diary-entry,insert-weekly-diary-entry,
Richard M. Stallman <rms@gnu.org>
parents: 3868
diff changeset
246 (calendar-cursor-to-date t)))))
957
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
247 arg)))
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
248
2326
cac023fe9d13 * diary-insert.el: Change the name to diary-ins.el.
Jim Blandy <jimb@redhat.com>
parents: 2166
diff changeset
249 (provide 'diary-ins)
957
2619b7a9c11e entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
250
2326
cac023fe9d13 * diary-insert.el: Change the name to diary-ins.el.
Jim Blandy <jimb@redhat.com>
parents: 2166
diff changeset
251 ;;; diary-ins.el ends here