From: Richard M. Stallman Date: Fri, 30 Aug 2002 18:21:39 +0000 (+0000) Subject: (diary-mail-entries): Don't overwrite user's value X-Git-Tag: ttn-vms-21-2-B4~13454 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6797907ed4cc2098dfcf8e8e98b660e67f9fdbc7;p=emacs.git (diary-mail-entries): Don't overwrite user's value of diary-list-include-blanks, but generate message instead if there are no entries. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0f03975cdee..bf7a4bceea5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2002-08-30 Edward M. Reingold + + * calendar/diary-lib.el (diary-mail-entries): Don't overwrite + user's value of diary-list-include-blanks, but generate message + instead if there are no entries. + 2002-08-30 ARISAWA Akihiro (tiny change) * ps-print.el (ps-lp-system): Fixed typo in `usg-unix-v'. diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index 548ec7a1b3d..3b0110278ba 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el @@ -622,14 +622,15 @@ system. Alternatively, you can specify a cron entry: to run it every morning at 1am." (interactive "P") (let* ((diary-display-hook 'fancy-diary-display) - (diary-list-include-blanks t) (text (progn (list-diary-entries (calendar-current-date) (if ndays ndays diary-mail-days)) (set-buffer fancy-diary-buffer) (buffer-substring (point-min) (point-max))))) (compose-mail diary-mail-addr - (concat "Diary entries generated " - (calendar-date-string (calendar-current-date)))) + (if (string-equal text "") + "No entries found" + (concat "Diary entries generated " + (calendar-date-string (calendar-current-date))))) (insert text) (funcall (get mail-user-agent 'sendfunc))))