X-Git-Url: http://cgit.sxemacs.org/?p=gnus;a=blobdiff_plain;f=lisp%2Fnnml.el;h=c42ad58c1338c1b2259f0fe1f0708608b5182e0c;hp=160bdda41db898fa5cb6953e06723c6071dbee04;hb=d0498ec691ac9cc3f6bdd9f4ba3ac26457cc3d8a;hpb=4c0bad76d2316c59b181d93baf04bb796ed439b0 diff --git a/lisp/nnml.el b/lisp/nnml.el index 160bdda41..c42ad58c1 100644 --- a/lisp/nnml.el +++ b/lisp/nnml.el @@ -164,13 +164,13 @@ all. This may very well take some time.") path gpath group-num) (if (stringp id) (when (and (setq group-num (nnml-find-group-number id)) - (setq file (cdr - (assq (cdr group-num) - (nnheader-article-to-file-alist - (setq gpath - (nnmail-group-pathname - (car group-num) - nnml-directory))))))) + (cdr + (assq (cdr group-num) + (nnheader-article-to-file-alist + (setq gpath + (nnmail-group-pathname + (car group-num) + nnml-directory)))))) (setq path (concat gpath (int-to-string (cdr group-num))))) (setq path (nnml-article-to-file id))) (cond @@ -217,21 +217,19 @@ all. This may very well take some time.") (setq nnml-article-file-alist nil) t) -(deffoo nnml-request-create-group (group &optional server) +(deffoo nnml-request-create-group (group &optional server args) (nnmail-activate 'nnml) - (or (assoc group nnml-group-alist) - (let (active) - (setq nnml-group-alist (cons (list group (setq active (cons 1 0))) - nnml-group-alist)) - (nnml-possibly-create-directory group) - (nnml-possibly-change-directory group server) - (let ((articles - (nnheader-directory-articles nnml-current-directory ))) - (and articles - (progn - (setcar active (apply 'min articles)) - (setcdr active (apply 'max articles))))) - (nnmail-save-active nnml-group-alist nnml-active-file))) + (unless (assoc group nnml-group-alist) + (let (active) + (push (list group (setq active (cons 1 0))) + nnml-group-alist) + (nnml-possibly-create-directory group) + (nnml-possibly-change-directory group server) + (let ((articles (nnheader-directory-articles nnml-current-directory))) + (when articles + (setcar active (apply 'min articles)) + (setcdr active (apply 'max articles)))) + (nnmail-save-active nnml-group-alist nnml-active-file))) t) (deffoo nnml-request-list (&optional server) @@ -348,8 +346,8 @@ all. This may very well take some time.") (progn (nnmail-write-region (point-min) (point-max) - (setq file (concat nnml-current-directory - (int-to-string article))) + (concat nnml-current-directory + (int-to-string article)) nil (if (nnheader-be-verbose 5) nil 'nomesg)) t) (error nil))