aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1992-09-19 05:57:58 +0000
committerRichard M. Stallman1992-09-19 05:57:58 +0000
commitba0b5507550c02a6d9c08588a9d44d2845b03ff6 (patch)
tree65b14ba35f9a7db747b0875f4d458ea0f10b127c
parent90ba40fc70903dbf33dc131c767a0e00c6fc1dd6 (diff)
downloademacs-ba0b5507550c02a6d9c08588a9d44d2845b03ff6.tar.gz
emacs-ba0b5507550c02a6d9c08588a9d44d2845b03ff6.zip
entered into RCS
-rw-r--r--lisp/mail/rmail.el27
1 files changed, 13 insertions, 14 deletions
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index 683562db18b..d8bca27fd1f 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -528,19 +528,12 @@ argument causes us to read a file name and use that file as the inbox."
528 ;; Delete the old files, now that babyl file is saved. 528 ;; Delete the old files, now that babyl file is saved.
529 (while delete-files 529 (while delete-files
530 (condition-case () 530 (condition-case ()
531 (if (or (string= (file-name-directory (car delete-files)) 531 ;; First, try deleting.
532 rmail-spool-directory) 532 (condition-case ()
533 (string-match "^\\.newmail-" 533 (delete-file (car delete-files))
534 (file-name-nondirectory (car delete-files)))) 534 (file-error
535 ;; If the file's in the spool directory, try deleting. 535 ;; If we can't delete it, truncate it.
536 ;; Likewise if made with movemail. 536 (write-region (point) (point) (car delete-files))))
537 (condition-case ()
538 (delete-file (car delete-files))
539 (file-error
540 ;; If we can't delete it, truncate it.
541 (write-region (point) (point) (car delete-files))))
542 ;; If not in the spool dir, just truncate it.
543 (write-region (point) (point) (car delete-files)))
544 (file-error nil)) 537 (file-error nil))
545 (setq delete-files (cdr delete-files))))) 538 (setq delete-files (cdr delete-files)))))
546 (if (= new-messages 0) 539 (if (= new-messages 0)
@@ -597,7 +590,13 @@ argument causes us to read a file name and use that file as the inbox."
597 ((or (file-exists-p tofile) (not (file-exists-p file))) 590 ((or (file-exists-p tofile) (not (file-exists-p file)))
598 nil) 591 nil)
599 ((not movemail) 592 ((not movemail)
600 (rename-file file tofile nil)) 593 (rename-file file tofile nil)
594 ;; Make the real inbox file empty.
595 ;; Leaving it deleted could cause lossage
596 ;; because mailers often won't create the file.
597 (condition-case ()
598 (write-region (point) (point) file)
599 (file-error nil)))
601 (t 600 (t
602 (let ((errors nil)) 601 (let ((errors nil))
603 (unwind-protect 602 (unwind-protect