diff options
author | Edward M. Reingold <reingold@emr.cs.iit.edu> | 1995-06-02 14:44:34 +0000 |
---|---|---|
committer | Edward M. Reingold <reingold@emr.cs.iit.edu> | 1995-06-02 14:44:34 +0000 |
commit | b7c49febb0464b7c633ef44797833adfb2e7a7a8 (patch) | |
tree | 10e2fdf88f8159607d1f29cb7ece0d789b31bc95 /lisp/diary-lib.el | |
parent | 4288965cef96a22f5f7b1a59cb1cb0c9ef70a6de (diff) | |
download | emacs-b7c49febb0464b7c633ef44797833adfb2e7a7a8.tar.gz |
New function to create (but not fill) the fancy diary buffer.
Diffstat (limited to 'lisp/diary-lib.el')
-rw-r--r-- | lisp/diary-lib.el | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/lisp/diary-lib.el b/lisp/diary-lib.el index ccf80d44de6..a78475bc916 100644 --- a/lisp/diary-lib.el +++ b/lisp/diary-lib.el @@ -357,11 +357,8 @@ This function is provided for optional use as the `diary-display-hook'." (display-buffer holiday-buffer) (message "No diary entries for %s" date-string))) (save-excursion;; Prepare the fancy diary buffer. - (set-buffer (get-buffer-create fancy-diary-buffer)) + (set-buffer (make-fancy-diary-buffer)) (setq buffer-read-only nil) - (make-local-variable 'mode-line-format) - (calendar-set-mode-line "Diary Entries") - (erase-buffer) (let ((entry-list diary-entries-list) (holiday-list) (holiday-list-last-month 1) @@ -418,6 +415,18 @@ This function is provided for optional use as the `diary-display-hook'." (display-buffer fancy-diary-buffer) (message "Preparing diary...done")))) +(defun make-fancy-diary-buffer () + "Create and return the initial fancy diary buffer." + (save-excursion + (set-buffer (get-buffer-create fancy-diary-buffer)) + (setq buffer-read-only nil) + (make-local-variable 'mode-line-format) + (calendar-set-mode-line "Diary Entries") + (erase-buffer) + (set-buffer-modified-p nil) + (setq buffer-read-only t) + (get-buffer fancy-diary-buffer))) + (defun print-diary-entries () "Print a hard copy of the diary display. |