X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Fnndiary.el;h=b3b7cf30bacad058597f88f85aa644b98b011004;hb=9b741e050b400987d68ff761c6cc3276c932839c;hp=309365ecc75b898bcd9aabf0798421b04f3a1cc2;hpb=91200ff35b432d9e4a9a176162c551bf756e81ed;p=elisp%2Fgnus.git- diff --git a/lisp/nndiary.el b/lisp/nndiary.el index 309365e..b3b7cf3 100644 --- a/lisp/nndiary.el +++ b/lisp/nndiary.el @@ -1,21 +1,21 @@ ;;; nndiary.el --- A diary backend for Gnus -;; Copyright (C) 1999-2001 Didier Verna. +;; Copyright (C) 1999, 2000, 2001 +;; Free Software Foundation, Inc. ;; Author: Didier Verna ;; Maintainer: Didier Verna ;; Created: Fri Jul 16 18:55:42 1999 -;; Last Revision: Wed Aug 8 17:36:21 2001 ;; Keywords: calendar mail news -;; This file is part of Gnus. +;; This file is part of GNU Emacs. -;; Gnus is free software; you can redistribute it and/or modify +;; GNU Emacs is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2 of the License, or ;; (at your option) any later version. -;; Gnus is distributed in the hope that it will be useful, +;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. @@ -211,11 +211,12 @@ ;; Compatibility Functions ================================================= -(if (fboundp 'signal-error) +(eval-and-compile + (if (fboundp 'signal-error) + (defun nndiary-error (&rest args) + (apply #'signal-error 'nndiary args)) (defun nndiary-error (&rest args) - (apply #'signal-error 'nndiary args)) - (defun nndiary-error (&rest args) - (apply #'error args))) + (apply #'error args)))) ;; Backend behavior customization =========================================== @@ -371,7 +372,6 @@ all. This may very well take some time.") (interactive) (message "NNDiary version %s" nndiary-version)) - (defvoo nndiary-nov-file-name ".overview") (defvoo nndiary-current-directory nil) @@ -479,6 +479,19 @@ all. This may very well take some time.") ;; the (relative) number of seconds ahead GMT. ) +(defsubst nndiary-schedule () + (let (head) + (condition-case arg + (mapcar + (lambda (elt) + (setq head (nth 0 elt)) + (nndiary-parse-schedule (nth 0 elt) (nth 1 elt) (nth 2 elt))) + nndiary-headers) + (t + (nnheader-report 'nndiary "X-Diary-%s header parse error: %s." + head (cdr arg)) + nil)) + )) ;;; Interface functions ===================================================== @@ -691,7 +704,8 @@ all. This may very well take some time.") (with-temp-buffer (nndiary-request-article number group server (current-buffer)) (let ((nndiary-current-directory nil)) - (nnmail-expiry-target-group nnmail-expiry-target group)))) + (nnmail-expiry-target-group nnmail-expiry-target group))) + (nndiary-possibly-change-directory group server)) (nnheader-message 5 "Deleting article %s in %s" number group) (condition-case () (funcall nnmail-delete-file-function article) @@ -745,7 +759,7 @@ all. This may very well take some time.") (when (nndiary-schedule) (let (result) (when nnmail-cache-accepted-message-ids - (nnmail-cache-insert (nnmail-fetch-field "message-id"))) + (nnmail-cache-insert (nnmail-fetch-field "message-id") group)) (if (stringp group) (and (nnmail-activate 'nndiary) @@ -1337,20 +1351,6 @@ all. This may very well take some time.") (nndiary-parse-schedule-value (match-string 1) min-or-values max)) )) -(defsubst nndiary-schedule () - (let (head) - (condition-case arg - (mapcar - (lambda (elt) - (setq head (nth 0 elt)) - (nndiary-parse-schedule (nth 0 elt) (nth 1 elt) (nth 2 elt))) - nndiary-headers) - (t - (nnheader-report 'nndiary "X-Diary-%s header parse error: %s." - head (cdr arg)) - nil)) - )) - (defun nndiary-max (spec) ;; Returns the max of specification SPEC, or nil for permanent schedules. (unless (null spec)