Mercurial > hg > xemacs-beta
comparison lisp/gnus/nnfolder.el @ 36:c53a95d3c46d r19-15b101
Import from CVS: tag r19-15b101
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:53:38 +0200 |
parents | d620409f5eb8 |
children | 1a767b41a199 |
comparison
equal
deleted
inserted
replaced
35:279432d5c479 | 36:c53a95d3c46d |
---|---|
223 'nnfolder | 223 'nnfolder |
224 (lambda () | 224 (lambda () |
225 (let ((bufs nnfolder-buffer-alist)) | 225 (let ((bufs nnfolder-buffer-alist)) |
226 (save-excursion | 226 (save-excursion |
227 (while bufs | 227 (while bufs |
228 (if (not (buffer-name (nth 1 (car bufs)))) | 228 (if (not (buffer-live-p (nth 1 (car bufs)))) |
229 (setq nnfolder-buffer-alist | 229 (setq nnfolder-buffer-alist |
230 (delq (car bufs) nnfolder-buffer-alist)) | 230 (delq (car bufs) nnfolder-buffer-alist)) |
231 (set-buffer (nth 1 (car bufs))) | 231 (set-buffer (nth 1 (car bufs))) |
232 (nnfolder-save-buffer) | 232 (nnfolder-save-buffer) |
233 (kill-buffer (current-buffer))) | 233 (kill-buffer (current-buffer))) |
244 ;; Make sure we _had_ the group open. | 244 ;; Make sure we _had_ the group open. |
245 (when (or (assoc group nnfolder-buffer-alist) | 245 (when (or (assoc group nnfolder-buffer-alist) |
246 (equal group nnfolder-current-group)) | 246 (equal group nnfolder-current-group)) |
247 (let ((inf (assoc group nnfolder-buffer-alist))) | 247 (let ((inf (assoc group nnfolder-buffer-alist))) |
248 (when inf | 248 (when inf |
249 (when nnfolder-current-group | 249 (when (and nnfolder-current-group |
250 nnfolder-current-buffer) | |
250 (push (list nnfolder-current-group nnfolder-current-buffer) | 251 (push (list nnfolder-current-group nnfolder-current-buffer) |
251 nnfolder-buffer-alist)) | 252 nnfolder-buffer-alist)) |
252 (setq nnfolder-buffer-alist | 253 (setq nnfolder-buffer-alist |
253 (delq inf nnfolder-buffer-alist)) | 254 (delq inf nnfolder-buffer-alist)) |
254 (setq nnfolder-current-buffer (cadr inf) | 255 (setq nnfolder-current-buffer (cadr inf) |
372 (goto-char (point-min)) | 373 (goto-char (point-min)) |
373 (search-forward "\n\n" nil t) | 374 (search-forward "\n\n" nil t) |
374 (forward-line -1) | 375 (forward-line -1) |
375 (while (re-search-backward (concat "^" nnfolder-article-marker) nil t) | 376 (while (re-search-backward (concat "^" nnfolder-article-marker) nil t) |
376 (delete-region (point) (progn (forward-line 1) (point)))) | 377 (delete-region (point) (progn (forward-line 1) (point)))) |
377 (nnmail-cache-insert (nnmail-fetch-field "message-id")) | |
378 (setq result | 378 (setq result |
379 (car (nnfolder-save-mail | 379 (car (nnfolder-save-mail |
380 (if (stringp group) | 380 (if (stringp group) |
381 (list (cons group (nnfolder-active-number group))) | 381 (list (cons group (nnfolder-active-number group))) |
382 (setq art-group | 382 (setq art-group |
383 (nnmail-article-group 'nnfolder-active-number))))))) | 383 (nnmail-article-group 'nnfolder-active-number))))))) |
384 (when last | 384 (when last |
385 (save-excursion | 385 (save-excursion |
386 (nnfolder-possibly-change-folder (or (caar art-group) group)) | 386 (nnfolder-possibly-change-folder (or (caar art-group) group)) |
387 (nnfolder-save-buffer) | 387 (nnfolder-save-buffer)))) |
388 (nnmail-cache-close)))) | |
389 (nnmail-save-active nnfolder-group-alist nnfolder-active-file) | 388 (nnmail-save-active nnfolder-group-alist nnfolder-active-file) |
390 (unless result | 389 (unless result |
391 (nnheader-report 'nnfolder "Couldn't store article")) | 390 (nnheader-report 'nnfolder "Couldn't store article")) |
392 result)) | 391 result)) |
393 | 392 |