aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2022-08-16 15:01:16 +0200
committerLars Ingebrigtsen2022-08-16 15:01:35 +0200
commit81ff64d3ca8d6e43e976f209399d2a0e9b4a7dd8 (patch)
treef3b65828d0f47b9f2f205a48d9da90c75d6dbd40
parent190f2db78606c3afc35d72902f52d6eec206642e (diff)
downloademacs-81ff64d3ca8d6e43e976f209399d2a0e9b4a7dd8.tar.gz
emacs-81ff64d3ca8d6e43e976f209399d2a0e9b4a7dd8.zip
Make message-delete-line obsolete
* lisp/gnus/message.el (message-delete-line): Make obsolete. (message-change-subject, message-cross-post-insert-note) (message-reduce-to-to-cc, message-indent-citation) (message-send-mail-with-mh, message-generate-headers) (message-fill-field-general): Adjust callers.
-rw-r--r--lisp/gnus/message.el23
1 files changed, 12 insertions, 11 deletions
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index ad74d2f1297..da05a768e3b 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -2081,6 +2081,7 @@ You must have the \"hashcash\" binary installed, see `hashcash-path'."
2081 2081
2082(defsubst message-delete-line (&optional n) 2082(defsubst message-delete-line (&optional n)
2083 "Delete the current line (and the next N lines)." 2083 "Delete the current line (and the next N lines)."
2084 (declare (obsolete delete-line "29.1"))
2084 (delete-region (progn (beginning-of-line) (point)) 2085 (delete-region (progn (beginning-of-line) (point))
2085 (progn (forward-line (or n 1)) (point)))) 2086 (progn (forward-line (or n 1)) (point))))
2086 2087
@@ -2385,7 +2386,7 @@ Leading \"Re: \" is not stripped by this function. Use the function
2385 (setq old-subject 2386 (setq old-subject
2386 (message-strip-subject-re old-subject)) 2387 (message-strip-subject-re old-subject))
2387 (message-goto-subject) 2388 (message-goto-subject)
2388 (message-delete-line) 2389 (delete-line)
2389 (insert (concat "Subject: " 2390 (insert (concat "Subject: "
2390 new-subject 2391 new-subject
2391 " (was: " 2392 " (was: "
@@ -2500,12 +2501,12 @@ been made to before the user asked for a Crosspost."
2500 (while (re-search-backward 2501 (while (re-search-backward
2501 (concat "^" (regexp-quote message-cross-post-note) ".*") 2502 (concat "^" (regexp-quote message-cross-post-note) ".*")
2502 head t) 2503 head t)
2503 (message-delete-line)) 2504 (delete-line))
2504 (message-goto-signature) 2505 (message-goto-signature)
2505 (while (re-search-backward 2506 (while (re-search-backward
2506 (concat "^" (regexp-quote message-followup-to-note) ".*") 2507 (concat "^" (regexp-quote message-followup-to-note) ".*")
2507 head t) 2508 head t)
2508 (message-delete-line)) 2509 (delete-line))
2509 ;; insert new note 2510 ;; insert new note
2510 (if (message-goto-signature) 2511 (if (message-goto-signature)
2511 (re-search-backward message-signature-separator)) 2512 (re-search-backward message-signature-separator))
@@ -2577,7 +2578,7 @@ With prefix-argument just set Follow-Up, don't cross-post."
2577 (cond (cc-content 2578 (cond (cc-content
2578 (save-excursion 2579 (save-excursion
2579 (message-goto-to) 2580 (message-goto-to)
2580 (message-delete-line) 2581 (delete-line)
2581 (insert (concat "To: " cc-content "\n")) 2582 (insert (concat "To: " cc-content "\n"))
2582 (save-restriction 2583 (save-restriction
2583 (message-narrow-to-headers) 2584 (message-narrow-to-headers)
@@ -3930,14 +3931,14 @@ However, if `message-yank-prefix' is non-nil, insert that prefix on each line."
3930 ;; Delete blank lines at the start of the buffer. 3931 ;; Delete blank lines at the start of the buffer.
3931 (goto-char (point-min)) 3932 (goto-char (point-min))
3932 (while (and (eolp) (not (eobp))) 3933 (while (and (eolp) (not (eobp)))
3933 (message-delete-line)) 3934 (delete-line))
3934 ;; Delete blank lines at the end of the buffer. 3935 ;; Delete blank lines at the end of the buffer.
3935 (goto-char (point-max)) 3936 (goto-char (point-max))
3936 (unless (eq (preceding-char) ?\n) 3937 (unless (eq (preceding-char) ?\n)
3937 (insert "\n")) 3938 (insert "\n"))
3938 (while (and (zerop (forward-line -1)) 3939 (while (and (zerop (forward-line -1))
3939 (looking-at "$")) 3940 (looking-at "$"))
3940 (message-delete-line))) 3941 (delete-line)))
3941 ;; Do the indentation. 3942 ;; Do the indentation.
3942 (if (null message-yank-prefix) 3943 (if (null message-yank-prefix)
3943 (indent-rigidly start (or end (mark t)) message-indentation-spaces) 3944 (indent-rigidly start (or end (mark t)) message-indentation-spaces)
@@ -5141,9 +5142,9 @@ to find out how to use this."
5141 (let ((headers message-mh-deletable-headers)) 5142 (let ((headers message-mh-deletable-headers))
5142 (while headers 5143 (while headers
5143 (goto-char (point-min)) 5144 (goto-char (point-min))
5144 (and (re-search-forward 5145 (when (re-search-forward
5145 (concat "^" (symbol-name (car headers)) ": *") nil t) 5146 (concat "^" (symbol-name (car headers)) ": *") nil t)
5146 (message-delete-line)) 5147 (delete-line))
5147 (pop headers)))) 5148 (pop headers))))
5148 (run-hooks 'message-send-mail-hook) 5149 (run-hooks 'message-send-mail-hook)
5149 ;; Pass it on to mh. 5150 ;; Pass it on to mh.
@@ -6275,7 +6276,7 @@ Headers already prepared in the buffer are not modified."
6275 (and (re-search-forward 6276 (and (re-search-forward
6276 (concat "^" (symbol-name (car headers)) ": *") nil t) 6277 (concat "^" (symbol-name (car headers)) ": *") nil t)
6277 (get-text-property (1+ (match-beginning 0)) 'message-deletable) 6278 (get-text-property (1+ (match-beginning 0)) 'message-deletable)
6278 (message-delete-line)) 6279 (delete-line))
6279 (pop headers))) 6280 (pop headers)))
6280 ;; Go through all the required headers and see if they are in the 6281 ;; Go through all the required headers and see if they are in the
6281 ;; articles already. If they are not, or are empty, they are 6282 ;; articles already. If they are not, or are empty, they are
@@ -6494,7 +6495,7 @@ If the current line has `message-yank-prefix', insert it on the new line."
6494 ;; Tapdance around looong Message-IDs. 6495 ;; Tapdance around looong Message-IDs.
6495 (forward-line -1) 6496 (forward-line -1)
6496 (when (looking-at "[ \t]*$") 6497 (when (looking-at "[ \t]*$")
6497 (message-delete-line)) 6498 (delete-line))
6498 (goto-char begin) 6499 (goto-char begin)
6499 (search-forward ":" nil t) 6500 (search-forward ":" nil t)
6500 (when (looking-at "\n[ \t]+") 6501 (when (looking-at "\n[ \t]+")