mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-23 22:20:24 -08:00
Improve docstrings of functions for moving to message headers
* lisp/gnus/message.el (message-goto-to, message-goto-from,
message-goto-subject, message-goto-cc, message-goto-bcc,
message-goto-fcc, message-goto-reply-to,
message-goto-newsgroups, message-goto-distribution,
message-goto-followup-to, message-goto-mail-followup-to,
message-goto-keywords, message-goto-summary): Mention that these
will insert an empty header if the header is not found.
(message-position-on-field): Explain that this inserts an empty
header if the header is missing, and that insertion is done
after the headers mentioned in AFTERS.
(cherry picked from commit 9f266e2d7c)
This commit is contained in:
parent
7b8d12e95d
commit
c7d9ffcf82
1 changed files with 17 additions and 13 deletions
|
|
@ -3253,79 +3253,79 @@ Like `text-mode', but with these additional commands:
|
|||
;;; Movement commands
|
||||
|
||||
(defun message-goto-to ()
|
||||
"Move point to the To header."
|
||||
"Move point to the To header or insert an empty one."
|
||||
(interactive nil message-mode)
|
||||
(push-mark)
|
||||
(message-position-on-field "To"))
|
||||
|
||||
(defun message-goto-from ()
|
||||
"Move point to the From header."
|
||||
"Move point to the From header or insert an empty one."
|
||||
(interactive nil message-mode)
|
||||
(push-mark)
|
||||
(message-position-on-field "From"))
|
||||
|
||||
(defun message-goto-subject ()
|
||||
"Move point to the Subject header."
|
||||
"Move point to the Subject header or insert an empty one."
|
||||
(interactive nil message-mode)
|
||||
(push-mark)
|
||||
(message-position-on-field "Subject"))
|
||||
|
||||
(defun message-goto-cc ()
|
||||
"Move point to the Cc header."
|
||||
"Move point to the Cc header or insert an empty one."
|
||||
(interactive nil message-mode)
|
||||
(push-mark)
|
||||
(message-position-on-field "Cc" "To"))
|
||||
|
||||
(defun message-goto-bcc ()
|
||||
"Move point to the Bcc header."
|
||||
"Move point to the Bcc header or insert an empty one."
|
||||
(interactive nil message-mode)
|
||||
(push-mark)
|
||||
(message-position-on-field "Bcc" "Cc" "To"))
|
||||
|
||||
(defun message-goto-fcc ()
|
||||
"Move point to the Fcc header."
|
||||
"Move point to the Fcc header or insert an empty one."
|
||||
(interactive nil message-mode)
|
||||
(push-mark)
|
||||
(message-position-on-field "Fcc" "To" "Newsgroups"))
|
||||
|
||||
(defun message-goto-reply-to ()
|
||||
"Move point to the Reply-To header."
|
||||
"Move point to the Reply-To header or insert an empty one."
|
||||
(interactive nil message-mode)
|
||||
(push-mark)
|
||||
(message-position-on-field "Reply-To" "Subject"))
|
||||
|
||||
(defun message-goto-newsgroups ()
|
||||
"Move point to the Newsgroups header."
|
||||
"Move point to the Newsgroups header or insert an empty one."
|
||||
(interactive nil message-mode)
|
||||
(push-mark)
|
||||
(message-position-on-field "Newsgroups"))
|
||||
|
||||
(defun message-goto-distribution ()
|
||||
"Move point to the Distribution header."
|
||||
"Move point to the Distribution header or insert an empty one."
|
||||
(interactive nil message-mode)
|
||||
(push-mark)
|
||||
(message-position-on-field "Distribution"))
|
||||
|
||||
(defun message-goto-followup-to ()
|
||||
"Move point to the Followup-To header."
|
||||
"Move point to the Followup-To header or insert an empty one."
|
||||
(interactive nil message-mode)
|
||||
(push-mark)
|
||||
(message-position-on-field "Followup-To" "Newsgroups"))
|
||||
|
||||
(defun message-goto-mail-followup-to ()
|
||||
"Move point to the Mail-Followup-To header."
|
||||
"Move point to the Mail-Followup-To header or insert an empty one."
|
||||
(interactive nil message-mode)
|
||||
(push-mark)
|
||||
(message-position-on-field "Mail-Followup-To" "To"))
|
||||
|
||||
(defun message-goto-keywords ()
|
||||
"Move point to the Keywords header."
|
||||
"Move point to the Keywords header or insert an empty one."
|
||||
(interactive nil message-mode)
|
||||
(push-mark)
|
||||
(message-position-on-field "Keywords" "Subject"))
|
||||
|
||||
(defun message-goto-summary ()
|
||||
"Move point to the Summary header."
|
||||
"Move point to the Summary header or insert an empty one."
|
||||
(interactive nil message-mode)
|
||||
(push-mark)
|
||||
(message-position-on-field "Summary" "Subject"))
|
||||
|
|
@ -4249,6 +4249,10 @@ This function strips off the signature from the original message."
|
|||
(newline)))
|
||||
|
||||
(defun message-position-on-field (header &rest afters)
|
||||
"Move point to header HEADER or insert it if not found.
|
||||
|
||||
If HEADER is not present, insert it with an empty value, after any
|
||||
headers specified in AFTERS."
|
||||
(let ((case-fold-search t))
|
||||
(save-restriction
|
||||
(narrow-to-region
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue