aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2008-08-10 20:05:15 +0000
committerGlenn Morris2008-08-10 20:05:15 +0000
commit4f44bf18d385406fa5468482e9a5aa22f5871677 (patch)
treed59342b94c5dc4de7b496ea1fbef5c23370de863
parent59c4743d13bd0eb420fc6c5d74a83ccd5b9f8816 (diff)
downloademacs-4f44bf18d385406fa5468482e9a5aa22f5871677.tar.gz
emacs-4f44bf18d385406fa5468482e9a5aa22f5871677.zip
(simple-diary-display, diary-show-all-entries, make-diary-entry):
Respect non-nil values of pop-up-frames (sync from trunk 2008-03-28). (list-sexp-diary-entries, diary-float): Doc fixes (sync from trunk 2008-04-29).
-rw-r--r--lisp/calendar/diary-lib.el23
1 files changed, 13 insertions, 10 deletions
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el
index 6b0f76e666e..c78a989591c 100644
--- a/lisp/calendar/diary-lib.el
+++ b/lisp/calendar/diary-lib.el
@@ -607,7 +607,8 @@ changing the variable `diary-include-string'."
607 (msg (format "No diary entries for %s" hol-string)) 607 (msg (format "No diary entries for %s" hol-string))
608 ;; If selected window is dedicated (to the calendar), 608 ;; If selected window is dedicated (to the calendar),
609 ;; need a new one to display the diary. 609 ;; need a new one to display the diary.
610 (pop-up-frames (window-dedicated-p (selected-window)))) 610 (pop-up-frames (or pop-up-frames
611 (window-dedicated-p (selected-window)))))
611 (calendar-set-mode-line (format "Diary for %s" hol-string)) 612 (calendar-set-mode-line (format "Diary for %s" hol-string))
612 (if (or (not diary-entries-list) 613 (if (or (not diary-entries-list)
613 (and (not (cdr diary-entries-list)) 614 (and (not (cdr diary-entries-list))
@@ -864,7 +865,8 @@ all entries, not just some, are visible. If there is no diary buffer, one
864is created." 865is created."
865 (interactive) 866 (interactive)
866 (let ((d-file (diary-check-diary-file)) 867 (let ((d-file (diary-check-diary-file))
867 (pop-up-frames (window-dedicated-p (selected-window)))) 868 (pop-up-frames (or pop-up-frames
869 (window-dedicated-p (selected-window)))))
868 (with-current-buffer (or (find-buffer-visiting d-file) 870 (with-current-buffer (or (find-buffer-visiting d-file)
869 (find-file-noselect d-file t)) 871 (find-file-noselect d-file t))
870 (when (eq major-mode default-major-mode) (diary-mode)) 872 (when (eq major-mode default-major-mode) (diary-mode))
@@ -1297,7 +1299,7 @@ A number of built-in functions are available for this type of diary entry:
1297 when highlighting the day in the calendar. 1299 when highlighting the day in the calendar.
1298 1300
1299 %%(diary-float MONTH DAYNAME N &optional DAY MARK) text 1301 %%(diary-float MONTH DAYNAME N &optional DAY MARK) text
1300 Entry will appear on the Nth DAYNAME of MONTH. 1302 Entry will appear on the Nth DAYNAME after/before MONTH DAY.
1301 (DAYNAME=0 means Sunday, 1 means Monday, and so on; 1303 (DAYNAME=0 means Sunday, 1 means Monday, and so on;
1302 if N is negative it counts backward from the end of 1304 if N is negative it counts backward from the end of
1303 the month. MONTH can be a list of months, a single 1305 the month. MONTH can be a list of months, a single
@@ -1554,12 +1556,12 @@ use when highlighting the day in the calendar."
1554 (cons mark entry)))) 1556 (cons mark entry))))
1555 1557
1556(defun diary-float (month dayname n &optional day mark) 1558(defun diary-float (month dayname n &optional day mark)
1557 "Floating diary entry--entry applies if date is the nth dayname of month. 1559 "Diary entry for the Nth DAYNAME after/before MONTH DAY.
1558Parameters are MONTH, DAYNAME, N. MONTH can be a list of months, the constant 1560DAYNAME=0 means Sunday, DAYNAME=1 means Monday, and so on.
1559t, or an integer. The constant t means all months. If N is negative, count 1561If N>0, use the Nth DAYNAME after MONTH DAY.
1560backward from the end of the month. 1562If N<0, use the Nth DAYNAME before MONTH DAY.
1561 1563DAY defaults to 1 if N>0, and MONTH's last day otherwise.
1562An optional parameter DAY means the Nth DAYNAME on or after/before MONTH DAY. 1564MONTH can be a list of months, an integer, or `t' (meaning all months).
1563Optional MARK specifies a face or single-character string to use when 1565Optional MARK specifies a face or single-character string to use when
1564highlighting the day in the calendar." 1566highlighting the day in the calendar."
1565;; This is messy because the diary entry may apply, but the date on which it 1567;; This is messy because the diary entry may apply, but the date on which it
@@ -1743,7 +1745,8 @@ marked on the calendar."
1743 "Insert a diary entry STRING which may be NONMARKING in FILE. 1745 "Insert a diary entry STRING which may be NONMARKING in FILE.
1744If omitted, NONMARKING defaults to nil and FILE defaults to 1746If omitted, NONMARKING defaults to nil and FILE defaults to
1745`diary-file'." 1747`diary-file'."
1746 (let ((pop-up-frames (window-dedicated-p (selected-window)))) 1748 (let ((pop-up-frames (or pop-up-frames
1749 (window-dedicated-p (selected-window)))))
1747 (find-file-other-window (substitute-in-file-name (or file diary-file)))) 1750 (find-file-other-window (substitute-in-file-name (or file diary-file))))
1748 (when (eq major-mode default-major-mode) (diary-mode)) 1751 (when (eq major-mode default-major-mode) (diary-mode))
1749 (widen) 1752 (widen)