]> git.eshelyaron.com Git - emacs.git/commitdiff
(diary-mail-entries): Don't overwrite user's value
authorRichard M. Stallman <rms@gnu.org>
Fri, 30 Aug 2002 18:21:39 +0000 (18:21 +0000)
committerRichard M. Stallman <rms@gnu.org>
Fri, 30 Aug 2002 18:21:39 +0000 (18:21 +0000)
of diary-list-include-blanks, but generate message instead if
there are no entries.

lisp/ChangeLog
lisp/calendar/diary-lib.el

index 0f03975cdee46997c0f62916ba7b204cf587a8f0..bf7a4bceea5506cdefd9aa9d522c73f14b86bd68 100644 (file)
@@ -1,3 +1,9 @@
+2002-08-30  Edward M. Reingold  <reingold@emr.cs.iit.edu>
+
+       * 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  <ari@mbf.sphere.ne.jp>  (tiny change)
 
        * ps-print.el (ps-lp-system): Fixed typo in `usg-unix-v'.
index 548ec7a1b3dd7fd4a5ebc0ce411fbe1c9f940dcf..3b0110278bacc6230ef8eb25ee40baf60946b160 100644 (file)
@@ -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))))