>From bacf5ac866a12b6527a6144bd53e96781b563367 Mon Sep 17 00:00:00 2001 From: Ivan Kanis Date: Thu, 24 Mar 2011 18:39:43 +0100 Subject: [PATCH 02/13] remove prev-appt-display-count using only global appt-display-count should be sufficient --- appt.el | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/appt.el b/appt.el index e2b1158..8a2919e 100644 --- a/appt.el +++ b/appt.el @@ -217,7 +217,7 @@ Only used if `appt-display-mode-line' is non-nil.") "Time of day (mins since midnight) at which we last checked appointments. A nil value forces the diary file to be (re-)checked for appointments.") -(defvar appt-display-count nil +(defvar appt-display-count 0 "Internal variable used to count number of consecutive reminders.") (defvar appt-timer nil @@ -310,7 +310,6 @@ displayed in a window: (interactive "P") ; so people can force updates (let* ((min-to-app -1) (prev-appt-mode-string appt-mode-string) - (prev-appt-display-count (or appt-display-count 0)) now cur-comp-time appt-comp-time appt-warn-time) (save-excursion ;; Convert current time to minutes after midnight (12.01am = 1). @@ -389,11 +388,11 @@ displayed in a window: ;; appt-message-warning time. (when (and (<= min-to-app appt-warn-time) (>= min-to-app 0)) - (setq appt-display-count (1+ prev-appt-display-count)) ;; This is true every appt-display-interval minutes. (if (zerop (mod prev-appt-display-count appt-display-interval)) (appt-display-message (cadr (car appt-time-msg-list)) min-to-app)) + (setq appt-display-count (1+ appt-display-count)) (when appt-display-mode-line (setq appt-mode-string (concat " " (propertize @@ -404,7 +403,7 @@ displayed in a window: ;; appointment on the next cycle. (if (zerop min-to-app) (setq appt-time-msg-list (cdr appt-time-msg-list) - appt-display-count nil)))) + appt-display-count 0)))) ;; If we have changed the mode line string, redisplay all mode lines. (and appt-display-mode-line (not (string-equal appt-mode-string -- 1.7.1