diff options
| author | Karl Heuer | 1997-10-20 03:49:42 +0000 |
|---|---|---|
| committer | Karl Heuer | 1997-10-20 03:49:42 +0000 |
| commit | f6f4d6902b1673aa6b03314799a40c42767bd7df (patch) | |
| tree | 22f93199efdcc1708274e995ef4504bfe8eb40dd | |
| parent | 5cb1f7280ab1b00f7c910af940834ac371bbcba2 (diff) | |
| download | emacs-f6f4d6902b1673aa6b03314799a40c42767bd7df.tar.gz emacs-f6f4d6902b1673aa6b03314799a40c42767bd7df.zip | |
(mail-do-fcc): Handle dont-write-the-file
correctly--don't write msg to the file after saving it from a buffer.
| -rw-r--r-- | lisp/mail/sendmail.el | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index 6b7ab2b1f1f..e1b1b8f2936 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el | |||
| @@ -905,26 +905,26 @@ the user from the mailer." | |||
| 905 | (if max (narrow-to-region (point-min) max)))))) | 905 | (if max (narrow-to-region (point-min) max)))))) |
| 906 | ;; Append to the file directly, | 906 | ;; Append to the file directly, |
| 907 | ;; unless we've already taken care of it. | 907 | ;; unless we've already taken care of it. |
| 908 | (if (and (not dont-write-the-file) | 908 | (unless dont-write-the-file |
| 909 | (file-exists-p (car fcc-list)) | 909 | (if (and (file-exists-p (car fcc-list)) |
| 910 | (mail-file-babyl-p (car fcc-list))) | 910 | (mail-file-babyl-p (car fcc-list))) |
| 911 | ;; If the file is a Babyl file, | 911 | ;; If the file is a Babyl file, |
| 912 | ;; convert the message to Babyl format. | 912 | ;; convert the message to Babyl format. |
| 913 | (let ((coding-system-for-write | 913 | (let ((coding-system-for-write |
| 914 | (or rmail-file-coding-system | 914 | (or rmail-file-coding-system |
| 915 | 'emacs-mule))) | 915 | 'emacs-mule))) |
| 916 | (save-excursion | 916 | (save-excursion |
| 917 | (set-buffer (get-buffer-create " mail-temp")) | 917 | (set-buffer (get-buffer-create " mail-temp")) |
| 918 | (setq buffer-read-only nil) | 918 | (setq buffer-read-only nil) |
| 919 | (erase-buffer) | 919 | (erase-buffer) |
| 920 | (insert "\C-l\n0, unseen,,\n*** EOOH ***\n" | 920 | (insert "\C-l\n0, unseen,,\n*** EOOH ***\n" |
| 921 | "Date: " (mail-rfc822-date) "\n") | 921 | "Date: " (mail-rfc822-date) "\n") |
| 922 | (insert-buffer-substring curbuf beg2 end) | 922 | (insert-buffer-substring curbuf beg2 end) |
| 923 | (insert "\n\C-_") | 923 | (insert "\n\C-_") |
| 924 | (write-region (point-min) (point-max) (car fcc-list) t) | 924 | (write-region (point-min) (point-max) (car fcc-list) t) |
| 925 | (erase-buffer))) | 925 | (erase-buffer))) |
| 926 | (write-region | 926 | (write-region |
| 927 | (1+ (point-min)) (point-max) (car fcc-list) t)) | 927 | (1+ (point-min)) (point-max) (car fcc-list) t))) |
| 928 | (and buffer (not dont-write-the-file) | 928 | (and buffer (not dont-write-the-file) |
| 929 | (with-current-buffer buffer | 929 | (with-current-buffer buffer |
| 930 | (set-visited-file-modtime)))) | 930 | (set-visited-file-modtime)))) |