Mercurial > hg > xemacs-beta
comparison lisp/gnus/nnmh.el @ 118:7d55a9ba150c r20-1b11
Import from CVS: tag r20-1b11
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:24:17 +0200 |
parents | 9f59509498e1 |
children | 1856695b1fa9 |
comparison
equal
deleted
inserted
replaced
117:578fd4947a72 | 118:7d55a9ba150c |
---|---|
299 (car (nnmh-save-mail | 299 (car (nnmh-save-mail |
300 (list (cons group (nnmh-active-number group))) | 300 (list (cons group (nnmh-active-number group))) |
301 noinsert))) | 301 noinsert))) |
302 (and | 302 (and |
303 (nnmail-activate 'nnmh) | 303 (nnmail-activate 'nnmh) |
304 (let ((resu|t (nnmail-article-group 'nnmh-active-number))) | 304 (let ((res (nnmail-article-group 'nnmh-active-number))) |
305 (if (not result) | 305 (if (and (null res) |
306 (yes-or-no-p "Moved to `junk' group; delete article? ")) | |
306 'junk | 307 'junk |
307 (car (nnmh-save-mail result noinsert)))))) | 308 (car (nnmh-save-mail res noinsert)))))) |
308 (when (and last nnmail-cache-accepted-message-ids) | 309 (when (and last nnmail-cache-accepted-message-ids) |
309 (nnmail-cache-close)))) | 310 (nnmail-cache-close)))) |
310 | 311 |
311 (deffoo nnmh-request-replace-article (article group buffer) | 312 (deffoo nnmh-request-replace-article (article group buffer) |
312 (nnmh-possibly-change-directory group) | 313 (nnmh-possibly-change-directory group) |
440 (setq ga (cdr ga)))) | 441 (setq ga (cdr ga)))) |
441 group-art) | 442 group-art) |
442 | 443 |
443 (defun nnmh-active-number (group) | 444 (defun nnmh-active-number (group) |
444 "Compute the next article number in GROUP." | 445 "Compute the next article number in GROUP." |
445 (let ((active (cadr (assoc group nnmh-group-alist)))) | 446 (let ((active (cadr (assoc group nnmh-group-alist))) |
447 (dir (nnmail-group-pathname group nnmh-directory))) | |
446 (unless active | 448 (unless active |
447 ;; The group wasn't known to nnmh, so we just create an active | 449 ;; The group wasn't known to nnmh, so we just create an active |
448 ;; entry for it. | 450 ;; entry for it. |
449 (setq active (cons 1 0)) | 451 (setq active (cons 1 0)) |
450 (push (list group active) nnmh-group-alist) | 452 (push (list group active) nnmh-group-alist) |
453 (unless (file-exists-p dir) | |
454 (make-directory dir)) | |
451 ;; Find the highest number in the group. | 455 ;; Find the highest number in the group. |
452 (let ((files (sort | 456 (let ((files (sort |
453 (mapcar | 457 (mapcar |
454 (lambda (f) | 458 (lambda (f) |
455 (string-to-int f)) | 459 (string-to-int f)) |
456 (directory-files | 460 (directory-files dir nil "^[0-9]+$")) |
457 (nnmail-group-pathname group nnmh-directory) | 461 '>))) |
458 nil "^[0-9]+$")) | |
459 '>))) | |
460 (when files | 462 (when files |
461 (setcdr active (car files))))) | 463 (setcdr active (car files))))) |
462 (setcdr active (1+ (cdr active))) | 464 (setcdr active (1+ (cdr active))) |
463 (while (file-exists-p | 465 (while (file-exists-p |
464 (concat (nnmail-group-pathname group nnmh-directory) | 466 (concat (nnmail-group-pathname group nnmh-directory) |