# HG changeset patch # User Richard M. Stallman # Date 726401926 0 # Node ID bc25cbeb27c0dd27e1d20c83034f338f97220c35 # Parent 6d74de06a35da25a4885d4f72119088d6945d4c3 (mail-send): Don't clear modified or delete autosave if visiting a file. diff -r 6d74de06a35d -r bc25cbeb27c0 lisp/mail/sendmail.el --- a/lisp/mail/sendmail.el Thu Jan 07 02:50:39 1993 +0000 +++ b/lisp/mail/sendmail.el Thu Jan 07 10:18:46 1993 +0000 @@ -241,12 +241,16 @@ ;; Now perform actions on successful sending. (while mail-send-actions (condition-case nil - (apply (car (car mail-send-actions)) (cdr (car mail-send-actions))) + (apply (car (car mail-send-actions)) + (cdr (car mail-send-actions))) (error)) (setq mail-send-actions (cdr mail-send-actions))) - (set-buffer-modified-p nil) - (delete-auto-save-file-if-necessary t) - (message "Sending...done")))) + (message "Sending...done") + ;; If buffer has no file, mark it as unmodified and delete autosave. + (if (not buffer-file-name) + (progn + (set-buffer-modified-p nil) + (delete-auto-save-file-if-necessary t)))))) (defun sendmail-send-it () (let ((errbuf (if mail-interactive