aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Steingold2002-08-06 15:11:26 +0000
committerSam Steingold2002-08-06 15:11:26 +0000
commitee58da1b00b21168ee84730abdccf50bb768935b (patch)
treed9383bc5fbe2f33eab5fbec2db3ae5ac8814c195
parent0e1701c45f65bfd3644ea1c846390aaef0c3dcda (diff)
downloademacs-ee58da1b00b21168ee84730abdccf50bb768935b.tar.gz
emacs-ee58da1b00b21168ee84730abdccf50bb768935b.zip
(diary-mail-entries): Use `compose-mail'
and `mail-user-agent' instead of straight sendmail. (diary-modified, diary-entries-list, displayed-year) (displayed-month, entry, date, number, date-string, d-file) (original-date): defvar without binding to avoid compiler warnings.
-rw-r--r--lisp/ChangeLog14
-rw-r--r--lisp/calendar/diary-lib.el58
2 files changed, 45 insertions, 27 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 4a0376feaa3..0445f3e7517 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,11 @@
12002-08-06 Sam Steingold <sds@gnu.org>
2
3 * calendar/diary-lib.el (diary-mail-entries): Use `compose-mail'
4 and `mail-user-agent' instead of straight sendmail.
5 (diary-modified, diary-entries-list, displayed-year)
6 (displayed-month, entry, date, number, date-string, d-file)
7 (original-date): defvar without binding to avoid compiler warnings.
8
12002-08-05 Alan Shutko <ats@acm.org> 92002-08-05 Alan Shutko <ats@acm.org>
2 10
3 * ibuffer.el (ibuffer-mode-map): Added ibuffer-filter-by-used-mode. 11 * ibuffer.el (ibuffer-mode-map): Added ibuffer-filter-by-used-mode.
@@ -106,7 +114,7 @@
1062002-08-03 Kai Gro,A_(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> 1142002-08-03 Kai Gro,A_(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE>
107 115
108 * net/tramp.el: Version 2.0.7. 116 * net/tramp.el: Version 2.0.7.
109 (tramp-perl-encode-with-module, tramp-perl-decode-with-module) 117 (tramp-perl-encode-with-module, tramp-perl-decode-with-module)
110 (tramp-perl-encode, tramp-perl-decode): Escape `%' characters 118 (tramp-perl-encode, tramp-perl-decode): Escape `%' characters
111 because of `format' and say so in the docstring. 119 because of `format' and say so in the docstring.
112 120
@@ -148,7 +156,7 @@
148 Change prompt for args. 156 Change prompt for args.
149 (revert-buffer-with-coding-system): New command. 157 (revert-buffer-with-coding-system): New command.
150 158
151 * international/mule-cmds.el (mule-keymap, set-coding-system-map): 159 * international/mule-cmds.el (mule-keymap, set-coding-system-map):
152 Add bindings for revert-buffer-with-coding-system. 160 Add bindings for revert-buffer-with-coding-system.
153 (set-coding-system-map): Clarify menu item info for 161 (set-coding-system-map): Clarify menu item info for
154 set-buffer-file-coding-system. 162 set-buffer-file-coding-system.
@@ -305,7 +313,7 @@
305 313
306 * emacs-lisp/bytecomp.el (byte-compile-find-cl-functions): 314 * emacs-lisp/bytecomp.el (byte-compile-find-cl-functions):
307 Don't call string-match on non-string. 315 Don't call string-match on non-string.
308 (displaying-byte-compile-warnings): 316 (displaying-byte-compile-warnings):
309 317
310 * textmodes/ispell.el (check-ispell-version): Bind default-directory 318 * textmodes/ispell.el (check-ispell-version): Bind default-directory
311 to avoid errors. Kill the old temp buffer at the beginning. 319 to avoid errors. Kill the old temp buffer at the beginning.
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el
index 9e8e6d4a3f3..548ec7a1b3d 100644
--- a/lisp/calendar/diary-lib.el
+++ b/lisp/calendar/diary-lib.el
@@ -174,6 +174,17 @@ syntax of `*' changed to be a word constituent.")
174(modify-syntax-entry ?* "w" diary-syntax-table) 174(modify-syntax-entry ?* "w" diary-syntax-table)
175(modify-syntax-entry ?: "w" diary-syntax-table) 175(modify-syntax-entry ?: "w" diary-syntax-table)
176 176
177(defvar diary-modified)
178(defvar diary-entries-list)
179(defvar displayed-year)
180(defvar displayed-month)
181(defvar entry)
182(defvar date)
183(defvar number)
184(defvar date-string)
185(defvar d-file)
186(defvar original-date)
187
177(defun list-diary-entries (date number) 188(defun list-diary-entries (date number)
178 "Create and display a buffer containing the relevant lines in diary-file. 189 "Create and display a buffer containing the relevant lines in diary-file.
179The arguments are DATE and NUMBER; the entries selected are those 190The arguments are DATE and NUMBER; the entries selected are those
@@ -210,8 +221,8 @@ These hooks have the following distinct roles:
210 221
211 (if (< 0 number) 222 (if (< 0 number)
212 (let* ((original-date date);; save for possible use in the hooks 223 (let* ((original-date date);; save for possible use in the hooks
213 (old-diary-syntax-table) 224 old-diary-syntax-table
214 (diary-entries-list) 225 diary-entries-list
215 (date-string (calendar-date-string date)) 226 (date-string (calendar-date-string date))
216 (d-file (substitute-in-file-name diary-file))) 227 (d-file (substitute-in-file-name diary-file)))
217 (message "Preparing diary...") 228 (message "Preparing diary...")
@@ -616,12 +627,11 @@ to run it every morning at 1am."
616 (if ndays ndays diary-mail-days)) 627 (if ndays ndays diary-mail-days))
617 (set-buffer fancy-diary-buffer) 628 (set-buffer fancy-diary-buffer)
618 (buffer-substring (point-min) (point-max))))) 629 (buffer-substring (point-min) (point-max)))))
619 (mail) 630 (compose-mail diary-mail-addr
620 (mail-to) (insert diary-mail-addr) 631 (concat "Diary entries generated "
621 (mail-subject) (insert "Diary entries generated " 632 (calendar-date-string (calendar-current-date))))
622 (calendar-date-string (calendar-current-date))) 633 (insert text)
623 (mail-text) (insert text) 634 (funcall (get mail-user-agent 'sendfunc))))
624 (mail-send-and-exit nil)))
625 635
626 636
627(defun diary-name-pattern (string-array &optional fullname) 637(defun diary-name-pattern (string-array &optional fullname)
@@ -835,7 +845,7 @@ is marked. See the documentation for the function `list-sexp-diary-entries'."
835 (if (setq mark (diary-sexp-entry sexp entry 845 (if (setq mark (diary-sexp-entry sexp entry
836 (calendar-gregorian-from-absolute date))) 846 (calendar-gregorian-from-absolute date)))
837 (mark-visible-calendar-date 847 (mark-visible-calendar-date
838 (calendar-gregorian-from-absolute date) 848 (calendar-gregorian-from-absolute date)
839 (if (consp mark) 849 (if (consp mark)
840 (car mark))))))))) 850 (car mark)))))))))
841 851
@@ -1003,7 +1013,7 @@ A number of built-in functions are available for this type of diary entry:
1003 `european-calendar-style' is nil, and DAY, MONTH, YEAR if 1013 `european-calendar-style' is nil, and DAY, MONTH, YEAR if
1004 `european-calendar-style' is t. DAY, MONTH, and YEAR 1014 `european-calendar-style' is t. DAY, MONTH, and YEAR
1005 can be lists of integers, the constant t, or an integer. 1015 can be lists of integers, the constant t, or an integer.
1006 The constant t means all values. An optional parameter 1016 The constant t means all values. An optional parameter
1007 MARK specifies a face or single-character string to use 1017 MARK specifies a face or single-character string to use
1008 when highlighting the day in the calendar. 1018 when highlighting the day in the calendar.
1009 1019
@@ -1014,16 +1024,16 @@ A number of built-in functions are available for this type of diary entry:
1014 the month. MONTH can be a list of months, a single 1024 the month. MONTH can be a list of months, a single
1015 month, or t to specify all months. Optional DAY means 1025 month, or t to specify all months. Optional DAY means
1016 Nth DAYNAME of MONTH on or after/before DAY. DAY defaults 1026 Nth DAYNAME of MONTH on or after/before DAY. DAY defaults
1017 to 1 if N>0 and the last day of the month if N<0. An 1027 to 1 if N>0 and the last day of the month if N<0. An
1018 optional parameter MARK specifies a face or single-character 1028 optional parameter MARK specifies a face or single-character
1019 string to use when highlighting the day in the calendar. 1029 string to use when highlighting the day in the calendar.
1020 1030
1021 %%(diary-block M1 D1 Y1 M2 D2 Y2 &optional MARK) text 1031 %%(diary-block M1 D1 Y1 M2 D2 Y2 &optional MARK) text
1022 Entry will appear on dates between M1/D1/Y1 and M2/D2/Y2, 1032 Entry will appear on dates between M1/D1/Y1 and M2/D2/Y2,
1023 inclusive. (If `european-calendar-style' is t, the 1033 inclusive. (If `european-calendar-style' is t, the
1024 order of the parameters should be changed to D1, M1, Y1, 1034 order of the parameters should be changed to D1, M1, Y1,
1025 D2, M2, Y2.) An optional parameter MARK specifies a face 1035 D2, M2, Y2.) An optional parameter MARK specifies a face
1026 or single-character string to use when highlighting the 1036 or single-character string to use when highlighting the
1027 day in the calendar. 1037 day in the calendar.
1028 1038
1029 %%(diary-anniversary MONTH DAY YEAR &optional MARK) text 1039 %%(diary-anniversary MONTH DAY YEAR &optional MARK) text
@@ -1034,8 +1044,8 @@ A number of built-in functions are available for this type of diary entry:
1034 of years since the MONTH DAY, YEAR and %s will be replaced 1044 of years since the MONTH DAY, YEAR and %s will be replaced
1035 by the ordinal ending of that number (that is, `st', `nd', 1045 by the ordinal ending of that number (that is, `st', `nd',
1036 `rd' or `th', as appropriate. The anniversary of February 1046 `rd' or `th', as appropriate. The anniversary of February
1037 29 is considered to be March 1 in a non-leap year. An 1047 29 is considered to be March 1 in a non-leap year. An
1038 optional parameter MARK specifies a face or single-character 1048 optional parameter MARK specifies a face or single-character
1039 string to use when highlighting the day in the calendar. 1049 string to use when highlighting the day in the calendar.
1040 1050
1041 %%(diary-cyclic N MONTH DAY YEAR &optional MARK) text 1051 %%(diary-cyclic N MONTH DAY YEAR &optional MARK) text
@@ -1045,8 +1055,8 @@ A number of built-in functions are available for this type of diary entry:
1045 can contain %d or %d%s; %d will be replaced by the number 1055 can contain %d or %d%s; %d will be replaced by the number
1046 of repetitions since the MONTH DAY, YEAR and %s will 1056 of repetitions since the MONTH DAY, YEAR and %s will
1047 be replaced by the ordinal ending of that number (that is, 1057 be replaced by the ordinal ending of that number (that is,
1048 `st', `nd', `rd' or `th', as appropriate. An optional 1058 `st', `nd', `rd' or `th', as appropriate. An optional
1049 parameter MARK specifies a face or single-character string 1059 parameter MARK specifies a face or single-character string
1050 to use when highlighting the day in the calendar. 1060 to use when highlighting the day in the calendar.
1051 1061
1052 %%(diary-remind SEXP DAYS &optional MARKING) text 1062 %%(diary-remind SEXP DAYS &optional MARKING) text
@@ -1172,7 +1182,7 @@ best if they are nonmarking."
1172 (let ((diary-entry (diary-sexp-entry sexp entry date))) 1182 (let ((diary-entry (diary-sexp-entry sexp entry date)))
1173 (if diary-entry 1183 (if diary-entry
1174 (subst-char-in-region line-start (point) ?\^M ?\n t)) 1184 (subst-char-in-region line-start (point) ?\^M ?\n t))
1175 (add-to-diary-list date 1185 (add-to-diary-list date
1176 (if (consp diary-entry) 1186 (if (consp diary-entry)
1177 (cdr diary-entry) 1187 (cdr diary-entry)
1178 diary-entry) 1188 diary-entry)
@@ -1213,7 +1223,7 @@ and DAY, MONTH, YEAR if `european-calendar-style' is t. DAY, MONTH, and YEAR
1213can be lists of integers, the constant t, or an integer. The constant t means 1223can be lists of integers, the constant t, or an integer. The constant t means
1214all values. 1224all values.
1215 1225
1216An optional parameter MARK specifies a face or single-character string to 1226An optional parameter MARK specifies a face or single-character string to
1217use when highlighting the day in the calendar." 1227use when highlighting the day in the calendar."
1218 (let* ((dd (if european-calendar-style 1228 (let* ((dd (if european-calendar-style
1219 month 1229 month
@@ -1243,7 +1253,7 @@ The order of the parameters is
1243M1, D1, Y1, M2, D2, Y2 if `european-calendar-style' is nil, and 1253M1, D1, Y1, M2, D2, Y2 if `european-calendar-style' is nil, and
1244D1, M1, Y1, D2, M2, Y2 if `european-calendar-style' is t. 1254D1, M1, Y1, D2, M2, Y2 if `european-calendar-style' is t.
1245 1255
1246An optional parameter MARK specifies a face or single-character string to 1256An optional parameter MARK specifies a face or single-character string to
1247use when highlighting the day in the calendar." 1257use when highlighting the day in the calendar."
1248 1258
1249 (let ((date1 (calendar-absolute-from-gregorian 1259 (let ((date1 (calendar-absolute-from-gregorian
@@ -1265,7 +1275,7 @@ t, or an integer. The constant t means all months. If N is negative, count
1265backward from the end of the month. 1275backward from the end of the month.
1266 1276
1267An optional parameter DAY means the Nth DAYNAME on or after/before MONTH DAY. 1277An optional parameter DAY means the Nth DAYNAME on or after/before MONTH DAY.
1268Optional MARK specifies a face or single-character string to use when 1278Optional MARK specifies a face or single-character string to use when
1269highlighting the day in the calendar." 1279highlighting the day in the calendar."
1270;; This is messy because the diary entry may apply, but the date on which it 1280;; This is messy because the diary entry may apply, but the date on which it
1271;; is based can be in a different month/year. For example, asking for the 1281;; is based can be in a different month/year. For example, asking for the
@@ -1333,7 +1343,7 @@ Entry applies if date is the anniversary of MONTH, DAY, YEAR if
1333`rd' or `th', as appropriate. The anniversary of February 29 is considered 1343`rd' or `th', as appropriate. The anniversary of February 29 is considered
1334to be March 1 in non-leap years. 1344to be March 1 in non-leap years.
1335 1345
1336An optional parameter MARK specifies a face or single-character string to 1346An optional parameter MARK specifies a face or single-character string to
1337use when highlighting the day in the calendar." 1347use when highlighting the day in the calendar."
1338 (let* ((d (if european-calendar-style 1348 (let* ((d (if european-calendar-style
1339 month 1349 month
@@ -1357,7 +1367,7 @@ repetitions since the MONTH DAY, YEAR and %s will be replaced by the
1357ordinal ending of that number (that is, `st', `nd', `rd' or `th', as 1367ordinal ending of that number (that is, `st', `nd', `rd' or `th', as
1358appropriate. 1368appropriate.
1359 1369
1360An optional parameter MARK specifies a face or single-character string to 1370An optional parameter MARK specifies a face or single-character string to
1361use when highlighting the day in the calendar." 1371use when highlighting the day in the calendar."
1362 (let* ((d (if european-calendar-style 1372 (let* ((d (if european-calendar-style
1363 month 1373 month