~ubuntu-branches/ubuntu/karmic/emacs-snapshot/karmic

« back to all changes in this revision

Viewing changes to lisp/calendar/appt.el

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2009-04-05 09:14:30 UTC
  • mto: This revision was merged to the branch mainline in revision 34.
  • Revision ID: james.westby@ubuntu.com-20090405091430-nw07lynn2arotjbe
Tags: upstream-20090320
ImportĀ upstreamĀ versionĀ 20090320

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
;;; appt.el --- appointment notification functions
2
2
 
3
3
;; Copyright (C) 1989, 1990, 1994, 1998, 2001, 2002, 2003, 2004, 2005,
4
 
;;   2006, 2007, 2008  Free Software Foundation, Inc.
 
4
;;   2006, 2007, 2008, 2009  Free Software Foundation, Inc.
5
5
 
6
6
;; Author: Neil Mager <neilm@juliet.ll.mit.edu>
7
7
;; Maintainer: Glenn Morris <rgm@gnu.org>
408
408
  "Display appointment due in MIN-TO-APP (a string) minutes.
409
409
NEW-TIME is a string giving the date.  Displays the appointment
410
410
message APPT-MSG in a separate buffer."
411
 
  ;; Make sure we're not in the minibuffer before splitting the window.
412
 
  ;; FIXME this seems needlessly complicated?
413
 
  (when (minibufferp)
414
 
    (other-window 1)
415
 
    (and (minibufferp) (display-multi-frame-p) (other-frame 1)))
416
411
  (let ((this-window (selected-window))
417
 
        (appt-disp-buf (set-buffer (get-buffer-create appt-buffer-name))))
 
412
        (appt-disp-buf (get-buffer-create appt-buffer-name)))
 
413
    ;; Make sure we're not in the minibuffer before splitting the window.
 
414
    ;; FIXME this seems needlessly complicated?
 
415
    (when (minibufferp)
 
416
      (other-window 1)
 
417
      (and (minibufferp) (display-multi-frame-p) (other-frame 1)))
418
418
    (if (cdr (assq 'unsplittable (frame-parameters)))
419
419
        ;; In an unsplittable frame, use something somewhere else.
420
 
        (display-buffer appt-disp-buf)
 
420
        (progn
 
421
          (set-buffer appt-disp-buf)
 
422
          (display-buffer appt-disp-buf))
421
423
      (unless (or (special-display-p (buffer-name appt-disp-buf))
422
424
                  (same-window-p (buffer-name appt-disp-buf)))
423
425
        ;; By default, split the bottom window and use the lower part.