diff options
| author | Lars Ingebrigtsen | 2021-01-20 05:08:56 +0100 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2021-01-20 05:08:56 +0100 |
| commit | c502cdd2b71f396b202e22103cd8aa5b0796fdab (patch) | |
| tree | 1fca0a757fc79f29f83b73e8677f0c6e5bb75622 | |
| parent | 40a5df81434ce02fba01779256b50976fb74da4f (diff) | |
| download | emacs-c502cdd2b71f396b202e22103cd8aa5b0796fdab.tar.gz emacs-c502cdd2b71f396b202e22103cd8aa5b0796fdab.zip | |
Don't add Content-Type when ceasing an rmail edit
* lisp/mail/rmailedit.el (rmail-cease-edit): Take an optional
parameter to avoid altering the message (bug#13327).
(rmail-abort-edit): Use it.
| -rw-r--r-- | lisp/mail/rmailedit.el | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/mail/rmailedit.el b/lisp/mail/rmailedit.el index 2680ed7f3a3..c3b351d7bc8 100644 --- a/lisp/mail/rmailedit.el +++ b/lisp/mail/rmailedit.el | |||
| @@ -145,8 +145,9 @@ This function runs the hooks `text-mode-hook' and `rmail-edit-mode-hook'. | |||
| 145 | (declare-function rmail-summary-enable "rmailsum" ()) | 145 | (declare-function rmail-summary-enable "rmailsum" ()) |
| 146 | (declare-function rmail-summary-update-line "rmailsum" (n)) | 146 | (declare-function rmail-summary-update-line "rmailsum" (n)) |
| 147 | 147 | ||
| 148 | (defun rmail-cease-edit () | 148 | (defun rmail-cease-edit (&optional abort) |
| 149 | "Finish editing message; switch back to Rmail proper." | 149 | "Finish editing message; switch back to Rmail proper. |
| 150 | If ABORT, this is the result of aborting an edit." | ||
| 150 | (interactive) | 151 | (interactive) |
| 151 | (if (rmail-summary-exists) | 152 | (if (rmail-summary-exists) |
| 152 | (with-current-buffer rmail-summary-buffer | 153 | (with-current-buffer rmail-summary-buffer |
| @@ -271,6 +272,8 @@ This function runs the hooks `text-mode-hook' and `rmail-edit-mode-hook'. | |||
| 271 | ;; No match for rmail-mime-charset-pattern, but there was some | 272 | ;; No match for rmail-mime-charset-pattern, but there was some |
| 272 | ;; other Content-Type. We should not insert another. (Bug#4624) | 273 | ;; other Content-Type. We should not insert another. (Bug#4624) |
| 273 | (content-type) | 274 | (content-type) |
| 275 | ;; Don't insert anything if aborting. | ||
| 276 | (abort) | ||
| 274 | ((null old-coding) | 277 | ((null old-coding) |
| 275 | ;; If there was no charset= spec, insert one. | 278 | ;; If there was no charset= spec, insert one. |
| 276 | (backward-char 1) | 279 | (backward-char 1) |
| @@ -352,7 +355,7 @@ This function runs the hooks `text-mode-hook' and `rmail-edit-mode-hook'. | |||
| 352 | (widen) | 355 | (widen) |
| 353 | (delete-region (point-min) (point-max)) | 356 | (delete-region (point-min) (point-max)) |
| 354 | (insert rmail-old-text) | 357 | (insert rmail-old-text) |
| 355 | (rmail-cease-edit) | 358 | (rmail-cease-edit t) |
| 356 | (rmail-highlight-headers)) | 359 | (rmail-highlight-headers)) |
| 357 | 360 | ||
| 358 | (defun rmail-edit-headers-alist (&optional widen markers) | 361 | (defun rmail-edit-headers-alist (&optional widen markers) |