changeset 80698:867aeedd5055

(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).
author Glenn Morris <rgm@gnu.org>
date Sun, 10 Aug 2008 20:05:15 +0000
parents b2894e827edc
children 2ba6b3010dbe
files lisp/calendar/diary-lib.el
diffstat 1 files changed, 13 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/calendar/diary-lib.el	Sun Aug 10 02:44:23 2008 +0000
+++ b/lisp/calendar/diary-lib.el	Sun Aug 10 20:05:15 2008 +0000
@@ -607,7 +607,8 @@
          (msg (format "No diary entries for %s" hol-string))
          ;; If selected window is dedicated (to the calendar),
          ;; need a new one to display the diary.
-         (pop-up-frames (window-dedicated-p (selected-window))))
+         (pop-up-frames (or pop-up-frames
+			    (window-dedicated-p (selected-window)))))
     (calendar-set-mode-line (format "Diary for %s" hol-string))
     (if (or (not diary-entries-list)
             (and (not (cdr diary-entries-list))
@@ -864,7 +865,8 @@
 is created."
   (interactive)
   (let ((d-file (diary-check-diary-file))
-        (pop-up-frames (window-dedicated-p (selected-window))))
+        (pop-up-frames (or pop-up-frames
+			   (window-dedicated-p (selected-window)))))
     (with-current-buffer (or (find-buffer-visiting d-file)
                              (find-file-noselect d-file t))
       (when (eq major-mode default-major-mode) (diary-mode))
@@ -1297,7 +1299,7 @@
                   when highlighting the day in the calendar.
 
       %%(diary-float MONTH DAYNAME N &optional DAY MARK) text
-                  Entry will appear on the Nth DAYNAME of MONTH.
+                  Entry will appear on the Nth DAYNAME after/before MONTH DAY.
                   (DAYNAME=0 means Sunday, 1 means Monday, and so on;
                   if N is negative it counts backward from the end of
                   the month.  MONTH can be a list of months, a single
@@ -1554,12 +1556,12 @@
         (cons mark entry))))
 
 (defun diary-float (month dayname n &optional day mark)
-  "Floating diary entry--entry applies if date is the nth dayname of month.
-Parameters are MONTH, DAYNAME, N.  MONTH can be a list of months, the constant
-t, or an integer.  The constant t means all months.  If N is negative, count
-backward from the end of the month.
-
-An optional parameter DAY means the Nth DAYNAME on or after/before MONTH DAY.
+  "Diary entry for the Nth DAYNAME after/before MONTH DAY.
+DAYNAME=0 means Sunday, DAYNAME=1 means Monday, and so on.
+If N>0, use the Nth DAYNAME after MONTH DAY.
+If N<0, use the Nth DAYNAME before MONTH DAY.
+DAY defaults to 1 if N>0, and MONTH's last day otherwise.
+MONTH can be a list of months, an integer, or `t' (meaning all months).
 Optional MARK specifies a face or single-character string to use when
 highlighting the day in the calendar."
 ;; This is messy because the diary entry may apply, but the date on which it
@@ -1743,7 +1745,8 @@
   "Insert a diary entry STRING which may be NONMARKING in FILE.
 If omitted, NONMARKING defaults to nil and FILE defaults to
 `diary-file'."
-  (let ((pop-up-frames (window-dedicated-p (selected-window))))
+  (let ((pop-up-frames (or pop-up-frames
+			   (window-dedicated-p (selected-window)))))
     (find-file-other-window (substitute-in-file-name (or file diary-file))))
   (when (eq major-mode default-major-mode) (diary-mode))
   (widen)