When finished with diary buffer: if it was not being displayed
before, kill it; otherwise restore its original state.
Suggested by Matthew Mundell <matt@mundell.ukfsn.org>.
(appt-display-message): If appt-display-format is 'ignore, respect old
vars appt-msg-window and appt-visible.
(appt-activate): Don't depend on return value of cancel-timer.
(appt-issue-message): Delete (see appt-activate).
(appt-visible, appt-msg-window): Make obsolete, in favour of
appt-display-format.
(appt-display-mode-line, appt-display-duration)
(appt-display-diary, appt-time-msg-list, appt-mode-string)
(appt-prev-comp-time, appt-display-count, appt-timer)
(appt-convert-time): Doc change.
(appt-disp-window-function, appt-delete-window-function): Use
defcustom rather than defvar.
(appt-display-format): New variable.
(appt-display-message): New function with display code from
appt-check.
(appt-check): Add optional FORCE argument. Doc change. Add
appt-make-list to diary-hook if displaying diary. Remove
checking of view-diary-entries-initially. Message
display section removed to new function appt-display-message.
(appt-display-window): Doc change. Remove unused internal var
this-buffer. Do not beep, since appt-display-message does that.
(appt-make-list): Doc change. Use caar.
(appt-sort-list): Simplify by using builtin sort function.
(appt-update-list): New function for updating appts when diary is
saved.
(appt-activate): New autoloaded function to toggle package
functionality.
(appt-check): Convert min-to-app to a string before passing to
appt-disp-window-function or concat.
(appt-delete-window): Remove test for frame-root-window.
(appt-select-lowest-window, appt-convert-time): Simplify.
(appt-check): For minutes in between appt-display-interval times,
do check, but don't display anything except an updated mode line.
Count against appt-display-interval based on minutes since
first display of this appointment, not based on time of day.
If appt-display-mode-line, force mode line redisplay
whenever appt-mode-string has changed.
(appt-add, appt-delete): Add autoload cookies.
(appt-check): Catch errors from calling `diary'.
(appt-max-time): Renamed from max-time.
(appt-now-displayed, appt-display-count): New variables.
(appt-timer): Don't create one if we already have one.
(global-mode-string): Add appt-mode-string to it.
(appt-check): Avoid using display-time-string to fetch current time.
To display in mode line, use appt-mode-string.