changeset 47163:88f34e3227e6

(diary-mail-entries): Don't overwrite user's value of diary-list-include-blanks, but generate message instead if there are no entries.
author Richard M. Stallman <rms@gnu.org>
date Fri, 30 Aug 2002 18:21:28 +0000
parents 8d806d3990ed
children 6a37253476c6
files lisp/calendar/diary-lib.el
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/calendar/diary-lib.el	Fri Aug 30 17:46:32 2002 +0000
+++ b/lisp/calendar/diary-lib.el	Fri Aug 30 18:21:28 2002 +0000
@@ -622,14 +622,15 @@
 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))))