Function: diary-set-maybe-redraw

diary-set-maybe-redraw is an autoloaded and byte-compiled function defined in diary-lib.el.gz.

Signature

(diary-set-maybe-redraw SYMBOL VALUE)

Documentation

Set SYMBOL's value to VALUE, and redraw the diary if necessary.

Redraws the diary if it is being displayed (note this is not the same as just visiting the diary-file), and SYMBOL's value is to be changed.

Source Code

;; Defined in /usr/src/emacs/lisp/calendar/diary-lib.el.gz
;;;###cal-autoload
(defun diary-set-maybe-redraw (symbol value)
  "Set SYMBOL's value to VALUE, and redraw the diary if necessary.
Redraws the diary if it is being displayed (note this is not the same as
just visiting the `diary-file'), and SYMBOL's value is to be changed."
  (let ((oldvalue (symbol-value symbol)))
    (custom-set-default symbol value)
    (and (not (equal value oldvalue))
         (diary-live-p)
         ;; Note this assumes diary was called without prefix arg.
         (diary))))