emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/calendar/diary-lib.el


From: Glenn Morris
Subject: [Emacs-diffs] Changes to emacs/lisp/calendar/diary-lib.el
Date: Sun, 24 Aug 2003 11:20:39 -0400

Index: emacs/lisp/calendar/diary-lib.el
diff -c emacs/lisp/calendar/diary-lib.el:1.69 
emacs/lisp/calendar/diary-lib.el:1.70
*** emacs/lisp/calendar/diary-lib.el:1.69       Sun Aug  3 10:00:56 2003
--- emacs/lisp/calendar/diary-lib.el    Sun Aug 24 11:20:38 2003
***************
*** 409,415 ****
                     'list-diary-entries-hook)
          (if diary-display-hook
              (run-hooks 'diary-display-hook)
-           ;; FIXME Error if calendar-setup 'calendar-only -- gm.
            (simple-diary-display))
          (run-hooks 'diary-hook)
          diary-entries-list))))
--- 409,414 ----
***************
*** 466,482 ****
    "Display the diary buffer if there are any relevant entries or holidays."
    (let* ((holiday-list (if holidays-in-diary-buffer
                             (check-calendar-holidays original-date)))
!          (msg (format "No diary entries for %s %s"
!                       (concat date-string (if holiday-list ":" ""))
!                       (mapconcat 'identity holiday-list "; "))))
!     (calendar-set-mode-line
!      (concat "Diary for " date-string
!              (if holiday-list ": " "")
!              (mapconcat 'identity holiday-list "; ")))
      (if (or (not diary-entries-list)
              (and (not (cdr diary-entries-list))
                   (string-equal (car (cdr (car diary-entries-list))) "")))
!         (if (<= (length msg) (frame-width))
              (message "%s" msg)
            (set-buffer (get-buffer-create holiday-buffer))
            (setq buffer-read-only nil)
--- 465,483 ----
    "Display the diary buffer if there are any relevant entries or holidays."
    (let* ((holiday-list (if holidays-in-diary-buffer
                             (check-calendar-holidays original-date)))
!          (hol-string (format "%s%s%s"
!                              date-string
!                              (if holiday-list ": " "")
!                              (mapconcat 'identity holiday-list "; ")))
!          (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))))
!     (calendar-set-mode-line (format "Diary for %s" hol-string))
      (if (or (not diary-entries-list)
              (and (not (cdr diary-entries-list))
                   (string-equal (car (cdr (car diary-entries-list))) "")))
!         (if (< (length msg) (frame-width))
              (message "%s" msg)
            (set-buffer (get-buffer-create holiday-buffer))
            (setq buffer-read-only nil)
***************
*** 1589,1595 ****
  (defun make-diary-entry (string &optional nonmarking file)
    "Insert a diary entry STRING which may be NONMARKING in FILE.
  If omitted, NONMARKING defaults to nil and FILE defaults to `diary-file'."
!   (find-file-other-window (substitute-in-file-name (or file diary-file)))
    (widen)
    (goto-char (point-max))
    (when (let ((case-fold-search t))
--- 1590,1597 ----
  (defun make-diary-entry (string &optional nonmarking file)
    "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))))
!     (find-file-other-window (substitute-in-file-name (or file diary-file))))
    (widen)
    (goto-char (point-max))
    (when (let ((case-fold-search t))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]