diff options
| author | Glenn Morris | 2005-03-01 10:24:33 +0000 |
|---|---|---|
| committer | Glenn Morris | 2005-03-01 10:24:33 +0000 |
| commit | cea82f86ac9e3d0b86681a7bdee5693e147be9cf (patch) | |
| tree | 4576fb3e89b397eb01090a6d1920e3b74d1a06e1 | |
| parent | a46c339d7af01d00c5472fabee7bf22f19419bf8 (diff) | |
| download | emacs-cea82f86ac9e3d0b86681a7bdee5693e147be9cf.tar.gz emacs-cea82f86ac9e3d0b86681a7bdee5693e147be9cf.zip | |
(redraw-calendar): Work from any buffer, not just the calendar.
| -rw-r--r-- | lisp/calendar/calendar.el | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index 291452db080..66ee1875a23 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el | |||
| @@ -2169,11 +2169,13 @@ the inserted text. Value is always t." | |||
| 2169 | t) | 2169 | t) |
| 2170 | 2170 | ||
| 2171 | (defun redraw-calendar () | 2171 | (defun redraw-calendar () |
| 2172 | "Redraw the calendar display." | 2172 | "Redraw the calendar display, if `calendar-buffer' is live." |
| 2173 | (interactive) | 2173 | (interactive) |
| 2174 | (let ((cursor-date (calendar-cursor-to-nearest-date))) | 2174 | (if (get-buffer calendar-buffer) |
| 2175 | (generate-calendar-window displayed-month displayed-year) | 2175 | (with-current-buffer calendar-buffer |
| 2176 | (calendar-cursor-to-visible-date cursor-date))) | 2176 | (let ((cursor-date (calendar-cursor-to-nearest-date))) |
| 2177 | (generate-calendar-window displayed-month displayed-year) | ||
| 2178 | (calendar-cursor-to-visible-date cursor-date))))) | ||
| 2177 | 2179 | ||
| 2178 | (defcustom calendar-debug-sexp nil | 2180 | (defcustom calendar-debug-sexp nil |
| 2179 | "*Turn debugging on when evaluating a sexp in the diary or holiday list." | 2181 | "*Turn debugging on when evaluating a sexp in the diary or holiday list." |