From 6797907ed4cc2098dfcf8e8e98b660e67f9fdbc7 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 30 Aug 2002 18:21:39 +0000 Subject: [PATCH] (diary-mail-entries): Don't overwrite user's value of diary-list-include-blanks, but generate message instead if there are no entries. --- lisp/ChangeLog | 6 ++++++ lisp/calendar/diary-lib.el | 7 ++++--- 2 files changed, 10 insertions(+), 3 deletions(-) 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)))) -- 2.39.5