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 [emacs-unicode


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/calendar/diary-lib.el [emacs-unicode-2]
Date: Thu, 11 Nov 2004 22:02:16 -0500

Index: emacs/lisp/calendar/diary-lib.el
diff -c emacs/lisp/calendar/diary-lib.el:1.69.2.3 
emacs/lisp/calendar/diary-lib.el:1.69.2.4
*** emacs/lisp/calendar/diary-lib.el:1.69.2.3   Wed Sep 29 07:22:20 2004
--- emacs/lisp/calendar/diary-lib.el    Fri Nov 12 02:53:02 2004
***************
*** 1974,1992 ****
          (throw 'finished t))))
      nil))
  
! (defun diary-from-outlook ()
    "Maybe snarf diary entry from current Outlook-generated message.
! Currently knows about Gnus and Rmail modes."
!   (interactive)
    (let ((func (cond
               ((eq major-mode 'rmail-mode)
                #'diary-from-outlook-rmail)
               ((memq major-mode '(gnus-summary-mode gnus-article-mode))
                #'diary-from-outlook-gnus)
               (t (error "Don't know how to snarf in `%s'" major-mode)))))
!     (if (interactive-p)
!       (call-interactively func)
!       (funcall func))))
  
  
  (defvar gnus-article-mime-handles)
--- 1974,1993 ----
          (throw 'finished t))))
      nil))
  
! (defun diary-from-outlook (&optional noconfirm)
    "Maybe snarf diary entry from current Outlook-generated message.
! Currently knows about Gnus and Rmail modes.  Unless the optional
! argument NOCONFIRM is non-nil (which is the case when this
! function is called interactively), then if an entry is found the
! user is asked to confirm its addition."
!   (interactive "p")
    (let ((func (cond
               ((eq major-mode 'rmail-mode)
                #'diary-from-outlook-rmail)
               ((memq major-mode '(gnus-summary-mode gnus-article-mode))
                #'diary-from-outlook-gnus)
               (t (error "Don't know how to snarf in `%s'" major-mode)))))
!     (funcall func noconfirm)))
  
  
  (defvar gnus-article-mime-handles)
***************
*** 1996,2006 ****
  (autoload 'gnus-narrow-to-body "gnus")
  (autoload 'mm-get-part "mm-decode")
  
! (defun diary-from-outlook-gnus ()
    "Maybe snarf diary entry from Outlook-generated message in Gnus.
! Add this to `gnus-article-prepare-hook' to notice appointments
  automatically."
!   (interactive)
    (with-current-buffer gnus-article-buffer
      (let ((subject (gnus-fetch-field "subject"))
          (body (if gnus-article-mime-handles
--- 1997,2010 ----
  (autoload 'gnus-narrow-to-body "gnus")
  (autoload 'mm-get-part "mm-decode")
  
! (defun diary-from-outlook-gnus (&optional noconfirm)
    "Maybe snarf diary entry from Outlook-generated message in Gnus.
! Unless the optional argument NOCONFIRM is non-nil (which is the case when
! this function is called interactively), then if an entry is found the
! user is asked to confirm its addition.
! Add this function to `gnus-article-prepare-hook' to notice appointments
  automatically."
!   (interactive "p")
    (with-current-buffer gnus-article-buffer
      (let ((subject (gnus-fetch-field "subject"))
          (body (if gnus-article-mime-handles
***************
*** 2011,2018 ****
                    (gnus-narrow-to-body)
                    (buffer-string)))))
        (when (diary-from-outlook-internal t)
!       (when (or (interactive-p)
!                   (y-or-n-p "Snarf diary entry? "))
          (diary-from-outlook-internal)
          (message "Diary entry added"))))))
  
--- 2015,2021 ----
                    (gnus-narrow-to-body)
                    (buffer-string)))))
        (when (diary-from-outlook-internal t)
!       (when (or noconfirm (y-or-n-p "Snarf diary entry? "))
          (diary-from-outlook-internal)
          (message "Diary entry added"))))))
  
***************
*** 2021,2029 ****
  
  (defvar rmail-buffer)
  
! (defun diary-from-outlook-rmail ()
!   "Maybe snarf diary entry from Outlook-generated message in Rmail."
!   (interactive)
    (with-current-buffer rmail-buffer
      (let ((subject (mail-fetch-field "subject"))
          (body (buffer-substring (save-excursion
--- 2024,2035 ----
  
  (defvar rmail-buffer)
  
! (defun diary-from-outlook-rmail (&optional noconfirm)
!   "Maybe snarf diary entry from Outlook-generated message in Rmail.
! Unless the optional argument NOCONFIRM is non-nil (which is the case when
! this function is called interactively), then if an entry is found the
! user is asked to confirm its addition."
!   (interactive "p")
    (with-current-buffer rmail-buffer
      (let ((subject (mail-fetch-field "subject"))
          (body (buffer-substring (save-excursion
***************
*** 2031,2038 ****
                                    (point))
                                  (point-max))))
        (when (diary-from-outlook-internal t)
!       (when (or (interactive-p)
!                   (y-or-n-p "Snarf diary entry? "))
          (diary-from-outlook-internal)
          (message "Diary entry added"))))))
  
--- 2037,2043 ----
                                    (point))
                                  (point-max))))
        (when (diary-from-outlook-internal t)
!       (when (or noconfirm (y-or-n-p "Snarf diary entry? "))
          (diary-from-outlook-internal)
          (message "Diary entry added"))))))
  




reply via email to

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