diff options
| -rw-r--r-- | lisp/ChangeLog | 9 | ||||
| -rw-r--r-- | lisp/mail/sendmail.el | 43 |
2 files changed, 34 insertions, 18 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bd7c0b05aa0..f6734f3508a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -9,6 +9,15 @@ | |||
| 9 | * tar-mode.el (tar-mode-write-file): Don't signal an error by | 9 | * tar-mode.el (tar-mode-write-file): Don't signal an error by |
| 10 | calling byte-to-position with a nil tar-header-offset. | 10 | calling byte-to-position with a nil tar-header-offset. |
| 11 | 11 | ||
| 12 | 2001-09-27 Simon Josefsson <jas@extundo.com> | ||
| 13 | |||
| 14 | * mail/sendmail.el (send-mail-function): Doc fix. | ||
| 15 | (mail-do-fcc): Error if header-end is not a marker. | ||
| 16 | (mail-do-fcc): Add a comment. | ||
| 17 | (mail-reply-to): Doc fix. | ||
| 18 | (mail-signature): Make ATPOINT optional. | ||
| 19 | (mail-yank-original): Use cond instead of nestled if. | ||
| 20 | |||
| 12 | 2001-09-26 Stefan Monnier <monnier@cs.yale.edu> | 21 | 2001-09-26 Stefan Monnier <monnier@cs.yale.edu> |
| 13 | 22 | ||
| 14 | * info.el (Info-on-current-buffer): Default arg to "Top". | 23 | * info.el (Info-on-current-buffer): Default arg to "Top". |
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index 50f0731b2f2..98f6639230b 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el | |||
| @@ -110,7 +110,8 @@ nil means let mailer mail back a message to report errors." | |||
| 110 | (defcustom send-mail-function 'sendmail-send-it | 110 | (defcustom send-mail-function 'sendmail-send-it |
| 111 | "Function to call to send the current buffer as mail. | 111 | "Function to call to send the current buffer as mail. |
| 112 | The headers should be delimited by a line which is | 112 | The headers should be delimited by a line which is |
| 113 | not a valid RFC822 header or continuation line. | 113 | not a valid RFC822 header or continuation line, |
| 114 | that matches the variable `mail-header-separator'. | ||
| 114 | This is used by the default mail-sending commands. See also | 115 | This is used by the default mail-sending commands. See also |
| 115 | `message-send-mail-function' for use with the Message package." | 116 | `message-send-mail-function' for use with the Message package." |
| 116 | :type '(radio (function-item sendmail-send-it :tag "Use Sendmail package") | 117 | :type '(radio (function-item sendmail-send-it :tag "Use Sendmail package") |
| @@ -1019,6 +1020,8 @@ external program defined by `sendmail-program'." | |||
| 1019 | (time (current-time)) | 1020 | (time (current-time)) |
| 1020 | (tembuf (generate-new-buffer " rmail output")) | 1021 | (tembuf (generate-new-buffer " rmail output")) |
| 1021 | (case-fold-search t)) | 1022 | (case-fold-search t)) |
| 1023 | (unless (markerp header-end) | ||
| 1024 | (error "Value of `header-end' must be a marker")) | ||
| 1022 | (save-excursion | 1025 | (save-excursion |
| 1023 | (goto-char (point-min)) | 1026 | (goto-char (point-min)) |
| 1024 | (while (re-search-forward "^FCC:[ \t]*" header-end t) | 1027 | (while (re-search-forward "^FCC:[ \t]*" header-end t) |
| @@ -1081,6 +1084,8 @@ external program defined by `sendmail-program'." | |||
| 1081 | ;; If MSG is non-nil, buffer is in RMAIL mode. | 1084 | ;; If MSG is non-nil, buffer is in RMAIL mode. |
| 1082 | (if msg | 1085 | (if msg |
| 1083 | (progn | 1086 | (progn |
| 1087 | ;; Append to an ordinary buffer as a | ||
| 1088 | ;; Unix mail message. | ||
| 1084 | (rmail-maybe-set-message-counters) | 1089 | (rmail-maybe-set-message-counters) |
| 1085 | (widen) | 1090 | (widen) |
| 1086 | (narrow-to-region (point-max) (point-max)) | 1091 | (narrow-to-region (point-max) (point-max)) |
| @@ -1199,7 +1204,7 @@ external program defined by `sendmail-program'." | |||
| 1199 | (insert "\nFCC: " folder)) | 1204 | (insert "\nFCC: " folder)) |
| 1200 | 1205 | ||
| 1201 | (defun mail-reply-to () | 1206 | (defun mail-reply-to () |
| 1202 | "Move point to end of Reply-To-field." | 1207 | "Move point to end of Reply-To-field. Create a Reply-To field if none." |
| 1203 | (interactive) | 1208 | (interactive) |
| 1204 | (expand-abbrev) | 1209 | (expand-abbrev) |
| 1205 | (mail-position-on-field "Reply-To")) | 1210 | (mail-position-on-field "Reply-To")) |
| @@ -1227,7 +1232,7 @@ external program defined by `sendmail-program'." | |||
| 1227 | (expand-abbrev) | 1232 | (expand-abbrev) |
| 1228 | (goto-char (mail-text-start))) | 1233 | (goto-char (mail-text-start))) |
| 1229 | 1234 | ||
| 1230 | (defun mail-signature (atpoint) | 1235 | (defun mail-signature (&optional atpoint) |
| 1231 | "Sign letter with contents of the file `mail-signature-file'. | 1236 | "Sign letter with contents of the file `mail-signature-file'. |
| 1232 | Prefix arg means put contents at point." | 1237 | Prefix arg means put contents at point." |
| 1233 | (interactive "P") | 1238 | (interactive "P") |
| @@ -1300,21 +1305,23 @@ and don't delete any header fields." | |||
| 1300 | ;; Avoid error in Transient Mark mode | 1305 | ;; Avoid error in Transient Mark mode |
| 1301 | ;; on account of mark's being inactive. | 1306 | ;; on account of mark's being inactive. |
| 1302 | (mark-even-if-inactive t)) | 1307 | (mark-even-if-inactive t)) |
| 1303 | (if mail-citation-hook | 1308 | (cond (mail-citation-hook |
| 1304 | ;; Bind mail-citation-header to the inserted message's header. | 1309 | ;; Bind mail-citation-header to the inserted |
| 1305 | (let ((mail-citation-header | 1310 | ;; message's header. |
| 1306 | (buffer-substring-no-properties | 1311 | (let ((mail-citation-header |
| 1307 | start | 1312 | (buffer-substring-no-properties |
| 1308 | (save-excursion | 1313 | start |
| 1309 | (save-restriction | 1314 | (save-excursion |
| 1310 | (narrow-to-region start (point-max)) | 1315 | (save-restriction |
| 1311 | (goto-char start) | 1316 | (narrow-to-region start (point-max)) |
| 1312 | (rfc822-goto-eoh) | 1317 | (goto-char start) |
| 1313 | (point)))))) | 1318 | (rfc822-goto-eoh) |
| 1314 | (run-hooks 'mail-citation-hook)) | 1319 | (point)))))) |
| 1315 | (if mail-yank-hooks | 1320 | (run-hooks 'mail-citation-hook))) |
| 1316 | (run-hooks 'mail-yank-hooks) | 1321 | (mail-yank-hooks |
| 1317 | (mail-indent-citation))))) | 1322 | (run-hooks 'mail-yank-hooks)) |
| 1323 | (t | ||
| 1324 | (mail-indent-citation))))) | ||
| 1318 | ;; This is like exchange-point-and-mark, but doesn't activate the mark. | 1325 | ;; This is like exchange-point-and-mark, but doesn't activate the mark. |
| 1319 | ;; It is cleaner to avoid activation, even though the command | 1326 | ;; It is cleaner to avoid activation, even though the command |
| 1320 | ;; loop would deactivate the mark because we inserted text. | 1327 | ;; loop would deactivate the mark because we inserted text. |