Mercurial > emacs
changeset 46826:e020f18c490a
(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.
author | Sam Steingold <sds@gnu.org> |
---|---|
date | Tue, 06 Aug 2002 15:11:26 +0000 |
parents | f43392bbb789 |
children | cc564ceab7c2 |
files | lisp/ChangeLog lisp/calendar/diary-lib.el |
diffstat | 2 files changed, 45 insertions(+), 27 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Tue Aug 06 06:04:44 2002 +0000 +++ b/lisp/ChangeLog Tue Aug 06 15:11:26 2002 +0000 @@ -1,3 +1,11 @@ +2002-08-06 Sam Steingold <sds@gnu.org> + + * calendar/diary-lib.el (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. + 2002-08-05 Alan Shutko <ats@acm.org> * ibuffer.el (ibuffer-mode-map): Added ibuffer-filter-by-used-mode. @@ -106,7 +114,7 @@ 2002-08-03 Kai Gro,A_(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> * net/tramp.el: Version 2.0.7. - (tramp-perl-encode-with-module, tramp-perl-decode-with-module) + (tramp-perl-encode-with-module, tramp-perl-decode-with-module) (tramp-perl-encode, tramp-perl-decode): Escape `%' characters because of `format' and say so in the docstring. @@ -148,7 +156,7 @@ Change prompt for args. (revert-buffer-with-coding-system): New command. - * international/mule-cmds.el (mule-keymap, set-coding-system-map): + * international/mule-cmds.el (mule-keymap, set-coding-system-map): Add bindings for revert-buffer-with-coding-system. (set-coding-system-map): Clarify menu item info for set-buffer-file-coding-system. @@ -305,7 +313,7 @@ * emacs-lisp/bytecomp.el (byte-compile-find-cl-functions): Don't call string-match on non-string. - (displaying-byte-compile-warnings): + (displaying-byte-compile-warnings): * textmodes/ispell.el (check-ispell-version): Bind default-directory to avoid errors. Kill the old temp buffer at the beginning.
--- a/lisp/calendar/diary-lib.el Tue Aug 06 06:04:44 2002 +0000 +++ b/lisp/calendar/diary-lib.el Tue Aug 06 15:11:26 2002 +0000 @@ -174,6 +174,17 @@ (modify-syntax-entry ?* "w" diary-syntax-table) (modify-syntax-entry ?: "w" diary-syntax-table) +(defvar diary-modified) +(defvar diary-entries-list) +(defvar displayed-year) +(defvar displayed-month) +(defvar entry) +(defvar date) +(defvar number) +(defvar date-string) +(defvar d-file) +(defvar original-date) + (defun list-diary-entries (date number) "Create and display a buffer containing the relevant lines in diary-file. The arguments are DATE and NUMBER; the entries selected are those @@ -210,8 +221,8 @@ (if (< 0 number) (let* ((original-date date);; save for possible use in the hooks - (old-diary-syntax-table) - (diary-entries-list) + old-diary-syntax-table + diary-entries-list (date-string (calendar-date-string date)) (d-file (substitute-in-file-name diary-file))) (message "Preparing diary...") @@ -616,12 +627,11 @@ (if ndays ndays diary-mail-days)) (set-buffer fancy-diary-buffer) (buffer-substring (point-min) (point-max))))) - (mail) - (mail-to) (insert diary-mail-addr) - (mail-subject) (insert "Diary entries generated " - (calendar-date-string (calendar-current-date))) - (mail-text) (insert text) - (mail-send-and-exit nil))) + (compose-mail diary-mail-addr + (concat "Diary entries generated " + (calendar-date-string (calendar-current-date)))) + (insert text) + (funcall (get mail-user-agent 'sendfunc)))) (defun diary-name-pattern (string-array &optional fullname) @@ -835,7 +845,7 @@ (if (setq mark (diary-sexp-entry sexp entry (calendar-gregorian-from-absolute date))) (mark-visible-calendar-date - (calendar-gregorian-from-absolute date) + (calendar-gregorian-from-absolute date) (if (consp mark) (car mark))))))))) @@ -1003,7 +1013,7 @@ `european-calendar-style' is nil, and DAY, MONTH, YEAR if `european-calendar-style' is t. DAY, MONTH, and YEAR can be lists of integers, the constant t, or an integer. - The constant t means all values. An optional parameter + The constant t means all values. An optional parameter MARK specifies a face or single-character string to use when highlighting the day in the calendar. @@ -1014,16 +1024,16 @@ the month. MONTH can be a list of months, a single month, or t to specify all months. Optional DAY means Nth DAYNAME of MONTH on or after/before DAY. DAY defaults - to 1 if N>0 and the last day of the month if N<0. An - optional parameter MARK specifies a face or single-character + to 1 if N>0 and the last day of the month if N<0. An + optional parameter MARK specifies a face or single-character string to use when highlighting the day in the calendar. %%(diary-block M1 D1 Y1 M2 D2 Y2 &optional MARK) text Entry will appear on dates between M1/D1/Y1 and M2/D2/Y2, inclusive. (If `european-calendar-style' is t, the order of the parameters should be changed to D1, M1, Y1, - D2, M2, Y2.) An optional parameter MARK specifies a face - or single-character string to use when highlighting the + D2, M2, Y2.) An optional parameter MARK specifies a face + or single-character string to use when highlighting the day in the calendar. %%(diary-anniversary MONTH DAY YEAR &optional MARK) text @@ -1034,8 +1044,8 @@ of years since the MONTH DAY, YEAR and %s will be replaced by the ordinal ending of that number (that is, `st', `nd', `rd' or `th', as appropriate. The anniversary of February - 29 is considered to be March 1 in a non-leap year. An - optional parameter MARK specifies a face or single-character + 29 is considered to be March 1 in a non-leap year. An + optional parameter MARK specifies a face or single-character string to use when highlighting the day in the calendar. %%(diary-cyclic N MONTH DAY YEAR &optional MARK) text @@ -1045,8 +1055,8 @@ can contain %d or %d%s; %d will be replaced by the number of repetitions since the MONTH DAY, YEAR and %s will be replaced by the ordinal ending of that number (that is, - `st', `nd', `rd' or `th', as appropriate. An optional - parameter MARK specifies a face or single-character string + `st', `nd', `rd' or `th', as appropriate. An optional + parameter MARK specifies a face or single-character string to use when highlighting the day in the calendar. %%(diary-remind SEXP DAYS &optional MARKING) text @@ -1172,7 +1182,7 @@ (let ((diary-entry (diary-sexp-entry sexp entry date))) (if diary-entry (subst-char-in-region line-start (point) ?\^M ?\n t)) - (add-to-diary-list date + (add-to-diary-list date (if (consp diary-entry) (cdr diary-entry) diary-entry) @@ -1213,7 +1223,7 @@ can be lists of integers, the constant t, or an integer. The constant t means all values. -An optional parameter MARK specifies a face or single-character string to +An optional parameter MARK specifies a face or single-character string to use when highlighting the day in the calendar." (let* ((dd (if european-calendar-style month @@ -1243,7 +1253,7 @@ M1, D1, Y1, M2, D2, Y2 if `european-calendar-style' is nil, and D1, M1, Y1, D2, M2, Y2 if `european-calendar-style' is t. -An optional parameter MARK specifies a face or single-character string to +An optional parameter MARK specifies a face or single-character string to use when highlighting the day in the calendar." (let ((date1 (calendar-absolute-from-gregorian @@ -1265,7 +1275,7 @@ backward from the end of the month. An optional parameter DAY means the Nth DAYNAME on or after/before MONTH DAY. -Optional MARK specifies a face or single-character string to use when +Optional MARK specifies a face or single-character string to use when highlighting the day in the calendar." ;; This is messy because the diary entry may apply, but the date on which it ;; is based can be in a different month/year. For example, asking for the @@ -1333,7 +1343,7 @@ `rd' or `th', as appropriate. The anniversary of February 29 is considered to be March 1 in non-leap years. -An optional parameter MARK specifies a face or single-character string to +An optional parameter MARK specifies a face or single-character string to use when highlighting the day in the calendar." (let* ((d (if european-calendar-style month @@ -1357,7 +1367,7 @@ ordinal ending of that number (that is, `st', `nd', `rd' or `th', as appropriate. -An optional parameter MARK specifies a face or single-character string to +An optional parameter MARK specifies a face or single-character string to use when highlighting the day in the calendar." (let* ((d (if european-calendar-style month