diff options
| author | Chong Yidong | 2005-11-17 16:30:52 +0000 |
|---|---|---|
| committer | Chong Yidong | 2005-11-17 16:30:52 +0000 |
| commit | 4ea0018b7fd298525be4b9eb54d720a74e2f18a1 (patch) | |
| tree | 24d3e53614f889bc69fea4a1972410da37fe3cf6 | |
| parent | 9f5f5ff2cf0d6b186470c70b2d71aa7f05260daa (diff) | |
| download | emacs-4ea0018b7fd298525be4b9eb54d720a74e2f18a1.tar.gz emacs-4ea0018b7fd298525be4b9eb54d720a74e2f18a1.zip | |
* simple.el (hard-newline): New variable.
* mail/sendmail.el (mail-setup, mail-send, mail-insert-from-field)
(sendmail-send-it, mail-do-fcc, mail-cc, mail-bcc, mail-fcc)
(mail-mail-reply-to, mail-mail-followup-to)
(mail-position-on-field, mail-signature, mail-yank-original)
(mail-attach-file): Use it.
* mail/mailheader.el (mail-header-format)
(mail-header-format-function): Likewise.
* add-log.el (add-change-log-entry, change-log-merge): Likewise.
| -rw-r--r-- | lisp/ChangeLog | 14 | ||||
| -rw-r--r-- | lisp/add-log.el | 8 | ||||
| -rw-r--r-- | lisp/mail/mailheader.el | 4 | ||||
| -rw-r--r-- | lisp/mail/sendmail.el | 77 | ||||
| -rw-r--r-- | lisp/simple.el | 2 |
5 files changed, 62 insertions, 43 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e3c46a498a5..da26daee7e2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,17 @@ | |||
| 1 | 2005-11-17 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * simple.el (hard-newline): New variable. | ||
| 4 | |||
| 5 | * mail/sendmail.el (mail-setup, mail-send, mail-insert-from-field) | ||
| 6 | (sendmail-send-it, mail-do-fcc, mail-cc, mail-bcc, mail-fcc) | ||
| 7 | (mail-mail-reply-to, mail-mail-followup-to) | ||
| 8 | (mail-position-on-field, mail-signature, mail-yank-original) | ||
| 9 | (mail-attach-file): Use it. | ||
| 10 | |||
| 11 | * mail/mailheader.el (mail-header-format) (mail-header-format-function): Likewise. | ||
| 12 | |||
| 13 | * add-log.el (add-change-log-entry, change-log-merge): Likewise. | ||
| 14 | |||
| 1 | 2005-11-17 Juri Linkov <juri@jurta.org> | 15 | 2005-11-17 Juri Linkov <juri@jurta.org> |
| 2 | 16 | ||
| 3 | * font-lock.el (font-lock-faces): Rename this defgroup from | 17 | * font-lock.el (font-lock-faces): Rename this defgroup from |
diff --git a/lisp/add-log.el b/lisp/add-log.el index 91d7ba36bab..d7f9f9b9846 100644 --- a/lisp/add-log.el +++ b/lisp/add-log.el | |||
| @@ -551,7 +551,7 @@ non-nil, otherwise in local time." | |||
| 551 | (forward-line 1) | 551 | (forward-line 1) |
| 552 | (insert (nth (random (length new-entries)) | 552 | (insert (nth (random (length new-entries)) |
| 553 | new-entries) | 553 | new-entries) |
| 554 | "\n\n") | 554 | hard-newline hard-newline) |
| 555 | (forward-line -1))) | 555 | (forward-line -1))) |
| 556 | 556 | ||
| 557 | ;; Determine where we should stop searching for a usable | 557 | ;; Determine where we should stop searching for a usable |
| @@ -584,7 +584,7 @@ non-nil, otherwise in local time." | |||
| 584 | ;; Delete excess empty lines; make just 2. | 584 | ;; Delete excess empty lines; make just 2. |
| 585 | (while (and (not (eobp)) (looking-at "^\\s *$")) | 585 | (while (and (not (eobp)) (looking-at "^\\s *$")) |
| 586 | (delete-region (point) (line-beginning-position 2))) | 586 | (delete-region (point) (line-beginning-position 2))) |
| 587 | (insert-char ?\n 2) | 587 | (insert hard-newline hard-newline) |
| 588 | (forward-line -2) | 588 | (forward-line -2) |
| 589 | (indent-relative-maybe)) | 589 | (indent-relative-maybe)) |
| 590 | (t | 590 | (t |
| @@ -593,7 +593,7 @@ non-nil, otherwise in local time." | |||
| 593 | (forward-line 1)) | 593 | (forward-line 1)) |
| 594 | (while (and (not (eobp)) (looking-at "^\\s *$")) | 594 | (while (and (not (eobp)) (looking-at "^\\s *$")) |
| 595 | (delete-region (point) (line-beginning-position 2))) | 595 | (delete-region (point) (line-beginning-position 2))) |
| 596 | (insert-char ?\n 3) | 596 | (insert hard-newline hard-newline hard-newline) |
| 597 | (forward-line -2) | 597 | (forward-line -2) |
| 598 | (indent-to left-margin) | 598 | (indent-to left-margin) |
| 599 | (insert "* ") | 599 | (insert "* ") |
| @@ -1066,7 +1066,7 @@ old-style time formats for entries are supported." | |||
| 1066 | (and (= ?\n (char-before)) | 1066 | (and (= ?\n (char-before)) |
| 1067 | (or (<= (1- (point)) (point-min)) | 1067 | (or (<= (1- (point)) (point-min)) |
| 1068 | (= ?\n (char-before (1- (point))))))) | 1068 | (= ?\n (char-before (1- (point))))))) |
| 1069 | (insert "\n")) | 1069 | (insert hard-newline)) |
| 1070 | ;; Move to the end of it to terminate outer loop. | 1070 | ;; Move to the end of it to terminate outer loop. |
| 1071 | (with-current-buffer other-buf | 1071 | (with-current-buffer other-buf |
| 1072 | (goto-char (point-max))) | 1072 | (goto-char (point-max))) |
diff --git a/lisp/mail/mailheader.el b/lisp/mail/mailheader.el index 1e9a24da341..aeed54a5ace 100644 --- a/lisp/mail/mailheader.el +++ b/lisp/mail/mailheader.el | |||
| @@ -146,7 +146,7 @@ skip the header altogether if there are no other elements. | |||
| 146 | (insert (capitalize (symbol-name header)) | 146 | (insert (capitalize (symbol-name header)) |
| 147 | ": " | 147 | ": " |
| 148 | (if (consp value) (car value) value) | 148 | (if (consp value) (car value) value) |
| 149 | "\n"))) | 149 | hard-newline))) |
| 150 | 150 | ||
| 151 | (defun mail-header-format (format-rules headers) | 151 | (defun mail-header-format (format-rules headers) |
| 152 | "Use FORMAT-RULES to format HEADERS and insert into current buffer. | 152 | "Use FORMAT-RULES to format HEADERS and insert into current buffer. |
| @@ -187,7 +187,7 @@ A key of nil has as its value a list of defaulted headers to ignore." | |||
| 187 | (if (cdr rule) | 187 | (if (cdr rule) |
| 188 | (funcall (cdr rule) header value) | 188 | (funcall (cdr rule) header value) |
| 189 | (funcall mail-header-format-function header value)))))) | 189 | (funcall mail-header-format-function header value)))))) |
| 190 | (insert "\n"))) | 190 | (insert hard-newline))) |
| 191 | 191 | ||
| 192 | (provide 'mailheader) | 192 | (provide 'mailheader) |
| 193 | 193 | ||
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index 8e7a71d65ab..e87aebe7cc2 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el | |||
| @@ -446,7 +446,7 @@ actually occur.") | |||
| 446 | ;; has been called and has done so. | 446 | ;; has been called and has done so. |
| 447 | (let ((fill-prefix "\t") | 447 | (let ((fill-prefix "\t") |
| 448 | (address-start (point))) | 448 | (address-start (point))) |
| 449 | (insert to "\n") | 449 | (insert to hard-newline) |
| 450 | (fill-region-as-paragraph address-start (point-max)) | 450 | (fill-region-as-paragraph address-start (point-max)) |
| 451 | (goto-char (point-max)) | 451 | (goto-char (point-max)) |
| 452 | (unless (bolp) | 452 | (unless (bolp) |
| @@ -455,7 +455,7 @@ actually occur.") | |||
| 455 | (if cc | 455 | (if cc |
| 456 | (let ((fill-prefix "\t") | 456 | (let ((fill-prefix "\t") |
| 457 | (address-start (progn (insert "CC: ") (point)))) | 457 | (address-start (progn (insert "CC: ") (point)))) |
| 458 | (insert cc "\n") | 458 | (insert cc hard-newline) |
| 459 | (fill-region-as-paragraph address-start (point-max)) | 459 | (fill-region-as-paragraph address-start (point-max)) |
| 460 | (goto-char (point-max)) | 460 | (goto-char (point-max)) |
| 461 | (unless (bolp) | 461 | (unless (bolp) |
| @@ -464,23 +464,23 @@ actually occur.") | |||
| 464 | (let ((fill-prefix "\t") | 464 | (let ((fill-prefix "\t") |
| 465 | (fill-column 78) | 465 | (fill-column 78) |
| 466 | (address-start (point))) | 466 | (address-start (point))) |
| 467 | (insert "In-reply-to: " in-reply-to "\n") | 467 | (insert "In-reply-to: " in-reply-to hard-newline) |
| 468 | (fill-region-as-paragraph address-start (point-max)) | 468 | (fill-region-as-paragraph address-start (point-max)) |
| 469 | (goto-char (point-max)) | 469 | (goto-char (point-max)) |
| 470 | (unless (bolp) | 470 | (unless (bolp) |
| 471 | (newline)))) | 471 | (newline)))) |
| 472 | (insert "Subject: " (or subject "") "\n") | 472 | (insert "Subject: " (or subject "") hard-newline) |
| 473 | (if mail-default-headers | 473 | (if mail-default-headers |
| 474 | (insert mail-default-headers)) | 474 | (insert mail-default-headers)) |
| 475 | (if mail-default-reply-to | 475 | (if mail-default-reply-to |
| 476 | (insert "Reply-to: " mail-default-reply-to "\n")) | 476 | (insert "Reply-to: " mail-default-reply-to hard-newline)) |
| 477 | (if mail-self-blind | 477 | (if mail-self-blind |
| 478 | (insert "BCC: " user-mail-address "\n")) | 478 | (insert "BCC: " user-mail-address hard-newline)) |
| 479 | (if mail-archive-file-name | 479 | (if mail-archive-file-name |
| 480 | (insert "FCC: " mail-archive-file-name "\n")) | 480 | (insert "FCC: " mail-archive-file-name hard-newline)) |
| 481 | (put-text-property (point) | 481 | (put-text-property (point) |
| 482 | (progn | 482 | (progn |
| 483 | (insert mail-header-separator "\n") | 483 | (insert mail-header-separator hard-newline) |
| 484 | (1- (point))) | 484 | (1- (point))) |
| 485 | 'category 'mail-header-separator) | 485 | 'category 'mail-header-separator) |
| 486 | ;; Insert the signature. But remember the beginning of the message. | 486 | ;; Insert the signature. But remember the beginning of the message. |
| @@ -488,7 +488,7 @@ actually occur.") | |||
| 488 | (cond ((eq mail-signature t) | 488 | (cond ((eq mail-signature t) |
| 489 | (if (file-exists-p mail-signature-file) | 489 | (if (file-exists-p mail-signature-file) |
| 490 | (progn | 490 | (progn |
| 491 | (insert "\n\n-- \n") | 491 | (insert hard-newline hard-newline "-- " hard-newline) |
| 492 | (insert-file-contents mail-signature-file)))) | 492 | (insert-file-contents mail-signature-file)))) |
| 493 | ((stringp mail-signature) | 493 | ((stringp mail-signature) |
| 494 | (insert mail-signature)) | 494 | (insert mail-signature)) |
| @@ -835,14 +835,14 @@ the user from the mailer." | |||
| 835 | (split-string new-header-values | 835 | (split-string new-header-values |
| 836 | ",[[:space:]]+" t)) | 836 | ",[[:space:]]+" t)) |
| 837 | (mapconcat 'identity l ", ")) | 837 | (mapconcat 'identity l ", ")) |
| 838 | "\n")) | 838 | hard-newline)) |
| 839 | ;; Add Mail-Reply-To if none yet | 839 | ;; Add Mail-Reply-To if none yet |
| 840 | (unless (mail-fetch-field "mail-reply-to") | 840 | (unless (mail-fetch-field "mail-reply-to") |
| 841 | (goto-char (mail-header-end)) | 841 | (goto-char (mail-header-end)) |
| 842 | (insert "Mail-Reply-To: " | 842 | (insert "Mail-Reply-To: " |
| 843 | (or (mail-fetch-field "reply-to") | 843 | (or (mail-fetch-field "reply-to") |
| 844 | user-mail-address) | 844 | user-mail-address) |
| 845 | "\n")))))) | 845 | hard-newline)))))) |
| 846 | (unless (memq mail-send-nonascii '(t mime)) | 846 | (unless (memq mail-send-nonascii '(t mime)) |
| 847 | (goto-char (point-min)) | 847 | (goto-char (point-min)) |
| 848 | (skip-chars-forward "\0-\177") | 848 | (skip-chars-forward "\0-\177") |
| @@ -931,7 +931,7 @@ See also the function `select-message-coding-system'.") | |||
| 931 | fullname-end 1) | 931 | fullname-end 1) |
| 932 | (replace-match "\\\\\\&" t)) | 932 | (replace-match "\\\\\\&" t)) |
| 933 | (insert "\"")))) | 933 | (insert "\"")))) |
| 934 | (insert " <" login ">\n")) | 934 | (insert " <" login ">" hard-newline)) |
| 935 | ((eq mail-from-style 'parens) | 935 | ((eq mail-from-style 'parens) |
| 936 | (insert "From: " login " (") | 936 | (insert "From: " login " (") |
| 937 | (let ((fullname-start (point))) | 937 | (let ((fullname-start (point))) |
| @@ -955,9 +955,9 @@ See also the function `select-message-coding-system'.") | |||
| 955 | fullname-end 1) | 955 | fullname-end 1) |
| 956 | (replace-match "\\1(\\3)" t) | 956 | (replace-match "\\1(\\3)" t) |
| 957 | (goto-char fullname-start)))) | 957 | (goto-char fullname-start)))) |
| 958 | (insert ")\n")) | 958 | (insert ")" hard-newline)) |
| 959 | ((null mail-from-style) | 959 | ((null mail-from-style) |
| 960 | (insert "From: " login "\n")) | 960 | (insert "From: " login hard-newline)) |
| 961 | ((eq mail-from-style 'system-default) | 961 | ((eq mail-from-style 'system-default) |
| 962 | nil) | 962 | nil) |
| 963 | (t (error "Invalid value for `mail-from-style'"))))) | 963 | (t (error "Invalid value for `mail-from-style'"))))) |
| @@ -996,7 +996,7 @@ external program defined by `sendmail-program'." | |||
| 996 | (goto-char (point-max)) | 996 | (goto-char (point-max)) |
| 997 | ;; require one newline at the end. | 997 | ;; require one newline at the end. |
| 998 | (or (= (preceding-char) ?\n) | 998 | (or (= (preceding-char) ?\n) |
| 999 | (insert ?\n)) | 999 | (insert hard-newline)) |
| 1000 | ;; Change header-delimiter to be what sendmail expects. | 1000 | ;; Change header-delimiter to be what sendmail expects. |
| 1001 | (goto-char (mail-header-end)) | 1001 | (goto-char (mail-header-end)) |
| 1002 | (delete-region (point) (progn (end-of-line) (point))) | 1002 | (delete-region (point) (progn (end-of-line) (point))) |
| @@ -1008,7 +1008,7 @@ external program defined by `sendmail-program'." | |||
| 1008 | ;; Ignore any blank lines in the header | 1008 | ;; Ignore any blank lines in the header |
| 1009 | (while (and (re-search-forward "\n\n\n*" delimline t) | 1009 | (while (and (re-search-forward "\n\n\n*" delimline t) |
| 1010 | (< (point) delimline)) | 1010 | (< (point) delimline)) |
| 1011 | (replace-match "\n")) | 1011 | (replace-match hard-newline)) |
| 1012 | (goto-char (point-min)) | 1012 | (goto-char (point-min)) |
| 1013 | ;; Look for Resent- headers. They require sending | 1013 | ;; Look for Resent- headers. They require sending |
| 1014 | ;; the message specially. | 1014 | ;; the message specially. |
| @@ -1070,10 +1070,10 @@ external program defined by `sendmail-program'." | |||
| 1070 | (setq charset | 1070 | (setq charset |
| 1071 | (coding-system-get selected-coding 'mime-charset)) | 1071 | (coding-system-get selected-coding 'mime-charset)) |
| 1072 | (goto-char delimline) | 1072 | (goto-char delimline) |
| 1073 | (insert "MIME-version: 1.0\n" | 1073 | (insert "MIME-version: 1.0" hard-newline |
| 1074 | "Content-type: text/plain; charset=" | 1074 | "Content-type: text/plain; charset=" |
| 1075 | (symbol-name charset) "\n" | 1075 | (symbol-name charset) hard-newline |
| 1076 | "Content-Transfer-Encoding: 8bit\n"))) | 1076 | "Content-Transfer-Encoding: 8bit" hard-newline))) |
| 1077 | ;; Insert an extra newline if we need it to work around | 1077 | ;; Insert an extra newline if we need it to work around |
| 1078 | ;; Sun's bug that swallows newlines. | 1078 | ;; Sun's bug that swallows newlines. |
| 1079 | (goto-char (1+ delimline)) | 1079 | (goto-char (1+ delimline)) |
| @@ -1167,8 +1167,8 @@ external program defined by `sendmail-program'." | |||
| 1167 | (set-buffer tembuf) | 1167 | (set-buffer tembuf) |
| 1168 | (erase-buffer) | 1168 | (erase-buffer) |
| 1169 | ;; This initial newline is written out if the fcc file already exists. | 1169 | ;; This initial newline is written out if the fcc file already exists. |
| 1170 | (insert "\nFrom " (user-login-name) " " | 1170 | (insert hard-newline "From " (user-login-name) " " |
| 1171 | (current-time-string time) "\n") | 1171 | (current-time-string time) hard-newline) |
| 1172 | ;; Insert the time zone before the year. | 1172 | ;; Insert the time zone before the year. |
| 1173 | (forward-char -1) | 1173 | (forward-char -1) |
| 1174 | (forward-word -1) | 1174 | (forward-word -1) |
| @@ -1178,7 +1178,7 @@ external program defined by `sendmail-program'." | |||
| 1178 | (insert-buffer-substring rmailbuf) | 1178 | (insert-buffer-substring rmailbuf) |
| 1179 | ;; Make sure messages are separated. | 1179 | ;; Make sure messages are separated. |
| 1180 | (goto-char (point-max)) | 1180 | (goto-char (point-max)) |
| 1181 | (insert ?\n) | 1181 | (insert hard-newline) |
| 1182 | (goto-char 2) | 1182 | (goto-char 2) |
| 1183 | ;; ``Quote'' "^From " as ">From " | 1183 | ;; ``Quote'' "^From " as ">From " |
| 1184 | ;; (note that this isn't really quoting, as there is no requirement | 1184 | ;; (note that this isn't really quoting, as there is no requirement |
| @@ -1220,10 +1220,11 @@ external program defined by `sendmail-program'." | |||
| 1220 | (rmail-maybe-set-message-counters) | 1220 | (rmail-maybe-set-message-counters) |
| 1221 | (widen) | 1221 | (widen) |
| 1222 | (narrow-to-region (point-max) (point-max)) | 1222 | (narrow-to-region (point-max) (point-max)) |
| 1223 | (insert "\C-l\n0, unseen,,\n*** EOOH ***\n" | 1223 | (insert "\C-l" hard-newline "0, unseen,," |
| 1224 | "Date: " (mail-rfc822-date) "\n") | 1224 | hard-newline "*** EOOH ***" hard-newline |
| 1225 | "Date: " (mail-rfc822-date) hard-newline) | ||
| 1225 | (insert-buffer-substring curbuf beg2 end) | 1226 | (insert-buffer-substring curbuf beg2 end) |
| 1226 | (insert "\n\C-_") | 1227 | (insert hard-newline "\C-_") |
| 1227 | (goto-char (point-min)) | 1228 | (goto-char (point-min)) |
| 1228 | (widen) | 1229 | (widen) |
| 1229 | (search-backward "\n\^_") | 1230 | (search-backward "\n\^_") |
| @@ -1261,10 +1262,11 @@ external program defined by `sendmail-program'." | |||
| 1261 | (set-buffer (get-buffer-create " mail-temp")) | 1262 | (set-buffer (get-buffer-create " mail-temp")) |
| 1262 | (setq buffer-read-only nil) | 1263 | (setq buffer-read-only nil) |
| 1263 | (erase-buffer) | 1264 | (erase-buffer) |
| 1264 | (insert "\C-l\n0, unseen,,\n*** EOOH ***\n" | 1265 | (insert "\C-l" hard-newline "0, unseen,," hard-newline |
| 1265 | "Date: " (mail-rfc822-date) "\n") | 1266 | "*** EOOH ***" hard-newline "Date: " |
| 1267 | (mail-rfc822-date) hard-newline) | ||
| 1266 | (insert-buffer-substring curbuf beg2 end) | 1268 | (insert-buffer-substring curbuf beg2 end) |
| 1267 | (insert "\n\C-_") | 1269 | (insert hard-newline "\C-_") |
| 1268 | (write-region (point-min) (point-max) (car fcc-list) t) | 1270 | (write-region (point-min) (point-max) (car fcc-list) t) |
| 1269 | (erase-buffer))) | 1271 | (erase-buffer))) |
| 1270 | (write-region | 1272 | (write-region |
| @@ -1316,7 +1318,7 @@ external program defined by `sendmail-program'." | |||
| 1316 | (expand-abbrev) | 1318 | (expand-abbrev) |
| 1317 | (or (mail-position-on-field "cc" t) | 1319 | (or (mail-position-on-field "cc" t) |
| 1318 | (progn (mail-position-on-field "to") | 1320 | (progn (mail-position-on-field "to") |
| 1319 | (insert "\nCC: ")))) | 1321 | (insert hard-newline "CC: ")))) |
| 1320 | 1322 | ||
| 1321 | (defun mail-bcc () | 1323 | (defun mail-bcc () |
| 1322 | "Move point to end of BCC-field. Create a BCC field if none." | 1324 | "Move point to end of BCC-field. Create a BCC field if none." |
| @@ -1324,7 +1326,7 @@ external program defined by `sendmail-program'." | |||
| 1324 | (expand-abbrev) | 1326 | (expand-abbrev) |
| 1325 | (or (mail-position-on-field "bcc" t) | 1327 | (or (mail-position-on-field "bcc" t) |
| 1326 | (progn (mail-position-on-field "to") | 1328 | (progn (mail-position-on-field "to") |
| 1327 | (insert "\nBCC: ")))) | 1329 | (insert hard-newline "BCC: ")))) |
| 1328 | 1330 | ||
| 1329 | (defun mail-fcc (folder) | 1331 | (defun mail-fcc (folder) |
| 1330 | "Add a new FCC field, with file name completion." | 1332 | "Add a new FCC field, with file name completion." |
| @@ -1332,7 +1334,7 @@ external program defined by `sendmail-program'." | |||
| 1332 | (expand-abbrev) | 1334 | (expand-abbrev) |
| 1333 | (or (mail-position-on-field "fcc" t) ;Put new field after exiting FCC. | 1335 | (or (mail-position-on-field "fcc" t) ;Put new field after exiting FCC. |
| 1334 | (mail-position-on-field "to")) | 1336 | (mail-position-on-field "to")) |
| 1335 | (insert "\nFCC: " folder)) | 1337 | (insert hard-newline "FCC: " folder)) |
| 1336 | 1338 | ||
| 1337 | (defun mail-reply-to () | 1339 | (defun mail-reply-to () |
| 1338 | "Move point to end of Reply-To-field. Create a Reply-To field if none." | 1340 | "Move point to end of Reply-To-field. Create a Reply-To field if none." |
| @@ -1347,7 +1349,7 @@ Create a Mail-Reply-To field if none." | |||
| 1347 | (expand-abbrev) | 1349 | (expand-abbrev) |
| 1348 | (or (mail-position-on-field "mail-reply-to" t) | 1350 | (or (mail-position-on-field "mail-reply-to" t) |
| 1349 | (progn (mail-position-on-field "to") | 1351 | (progn (mail-position-on-field "to") |
| 1350 | (insert "\nMail-Reply-To: ")))) | 1352 | (insert hard-newline "Mail-Reply-To: ")))) |
| 1351 | 1353 | ||
| 1352 | (defun mail-mail-followup-to () | 1354 | (defun mail-mail-followup-to () |
| 1353 | "Move point to end of Mail-Followup-To field. | 1355 | "Move point to end of Mail-Followup-To field. |
| @@ -1356,7 +1358,7 @@ Create a Mail-Followup-To field if none." | |||
| 1356 | (expand-abbrev) | 1358 | (expand-abbrev) |
| 1357 | (or (mail-position-on-field "mail-followup-to" t) | 1359 | (or (mail-position-on-field "mail-followup-to" t) |
| 1358 | (progn (mail-position-on-field "to") | 1360 | (progn (mail-position-on-field "to") |
| 1359 | (insert "\nMail-Followup-To: ")))) | 1361 | (insert hard-newline "Mail-Followup-To: ")))) |
| 1360 | 1362 | ||
| 1361 | (defun mail-position-on-field (field &optional soft) | 1363 | (defun mail-position-on-field (field &optional soft) |
| 1362 | (let (end | 1364 | (let (end |
| @@ -1371,7 +1373,7 @@ Create a Mail-Followup-To field if none." | |||
| 1371 | t) | 1373 | t) |
| 1372 | (or soft | 1374 | (or soft |
| 1373 | (progn (goto-char end) | 1375 | (progn (goto-char end) |
| 1374 | (insert field ": \n") | 1376 | (insert field ": " hard-newline) |
| 1375 | (skip-chars-backward "\n"))) | 1377 | (skip-chars-backward "\n"))) |
| 1376 | nil))) | 1378 | nil))) |
| 1377 | 1379 | ||
| @@ -1394,7 +1396,7 @@ Prefix arg means put contents at point." | |||
| 1394 | (delete-region (point) (point-max))) | 1396 | (delete-region (point) (point-max))) |
| 1395 | (if (stringp mail-signature) | 1397 | (if (stringp mail-signature) |
| 1396 | (insert mail-signature) | 1398 | (insert mail-signature) |
| 1397 | (insert "\n\n-- \n") | 1399 | (insert hard-newline hard-newline "-- " hard-newline) |
| 1398 | (insert-file-contents (expand-file-name mail-signature-file))))) | 1400 | (insert-file-contents (expand-file-name mail-signature-file))))) |
| 1399 | 1401 | ||
| 1400 | (defun mail-fill-yanked-message (&optional justifyp) | 1402 | (defun mail-fill-yanked-message (&optional justifyp) |
| @@ -1480,7 +1482,7 @@ and don't delete any header fields." | |||
| 1480 | ;; loop would deactivate the mark because we inserted text. | 1482 | ;; loop would deactivate the mark because we inserted text. |
| 1481 | (goto-char (prog1 (mark t) | 1483 | (goto-char (prog1 (mark t) |
| 1482 | (set-marker (mark-marker) (point) (current-buffer)))) | 1484 | (set-marker (mark-marker) (point) (current-buffer)))) |
| 1483 | (if (not (eolp)) (insert ?\n))))) | 1485 | (if (not (eolp)) (insert hard-newline))))) |
| 1484 | 1486 | ||
| 1485 | (defun mail-yank-clear-headers (start end) | 1487 | (defun mail-yank-clear-headers (start end) |
| 1486 | (if (< end start) | 1488 | (if (< end start) |
| @@ -1564,7 +1566,8 @@ If the current line has `mail-yank-prefix', insert it on the new line." | |||
| 1564 | (insert-char ?= (max 0 (- 60 (current-column)))) | 1566 | (insert-char ?= (max 0 (- 60 (current-column)))) |
| 1565 | (newline) | 1567 | (newline) |
| 1566 | (setq middle (point)) | 1568 | (setq middle (point)) |
| 1567 | (insert "============================================================\n") | 1569 | (insert "============================================================" |
| 1570 | hard-newline) | ||
| 1568 | (push-mark) | 1571 | (push-mark) |
| 1569 | (goto-char middle) | 1572 | (goto-char middle) |
| 1570 | (insert-file-contents file) | 1573 | (insert-file-contents file) |
diff --git a/lisp/simple.el b/lisp/simple.el index 5957b4ce96d..1c8b997e675 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -348,6 +348,8 @@ Other major modes are defined by comparison with this one." | |||
| 348 | 348 | ||
| 349 | ;; Making and deleting lines. | 349 | ;; Making and deleting lines. |
| 350 | 350 | ||
| 351 | (defvar hard-newline (propertize "\n" 'hard t 'rear-nonsticky '(hard))) | ||
| 352 | |||
| 351 | (defun newline (&optional arg) | 353 | (defun newline (&optional arg) |
| 352 | "Insert a newline, and move to left margin of the new line if it's blank. | 354 | "Insert a newline, and move to left margin of the new line if it's blank. |
| 353 | If `use-hard-newlines' is non-nil, the newline is marked with the | 355 | If `use-hard-newlines' is non-nil, the newline is marked with the |