diff options
| -rw-r--r-- | lisp/gnus/message.el | 168 |
1 files changed, 87 insertions, 81 deletions
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 589f205c947..673c949a9ae 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el | |||
| @@ -112,7 +112,7 @@ | |||
| 112 | (defcustom message-send-rename-function nil | 112 | (defcustom message-send-rename-function nil |
| 113 | "Function called to rename the buffer after sending it." | 113 | "Function called to rename the buffer after sending it." |
| 114 | :group 'message-buffers | 114 | :group 'message-buffers |
| 115 | :type 'function) | 115 | :type '(choice function (const nil))) |
| 116 | 116 | ||
| 117 | (defcustom message-fcc-handler-function 'message-output | 117 | (defcustom message-fcc-handler-function 'message-output |
| 118 | "*A function called to save outgoing articles. | 118 | "*A function called to save outgoing articles. |
| @@ -141,7 +141,7 @@ If this variable is nil, no such courtesy message will be added." | |||
| 141 | (defcustom message-from-style 'default | 141 | (defcustom message-from-style 'default |
| 142 | "*Specifies how \"From\" headers look. | 142 | "*Specifies how \"From\" headers look. |
| 143 | 143 | ||
| 144 | If `nil', they contain just the return address like: | 144 | If nil, they contain just the return address like: |
| 145 | king@grassland.com | 145 | king@grassland.com |
| 146 | If `parens', they look like: | 146 | If `parens', they look like: |
| 147 | king@grassland.com (Elvis Parsley) | 147 | king@grassland.com (Elvis Parsley) |
| @@ -164,13 +164,14 @@ To disable checking of long signatures, for instance, add | |||
| 164 | 164 | ||
| 165 | Don't touch this variable unless you really know what you're doing. | 165 | Don't touch this variable unless you really know what you're doing. |
| 166 | 166 | ||
| 167 | Checks include subject-cmsg multiple-headers sendsys message-id from | 167 | Checks include `subject-cmsg', `multiple-headers', `sendsys', |
| 168 | long-lines control-chars size new-text quoting-style | 168 | `message-id', `from', `long-lines', `control-chars', `size', |
| 169 | redirected-followup signature approved sender empty empty-headers | 169 | `new-text', `quoting-style', `redirected-followup', `signature', |
| 170 | message-id from subject shorten-followup-to existing-newsgroups | 170 | `approved', `sender', `empty', `empty-headers', `message-id', `from', |
| 171 | buffer-file-name unchanged newsgroups." | 171 | `subject', `shorten-followup-to', `existing-newsgroups', |
| 172 | `buffer-file-name', `unchanged', `newsgroups'." | ||
| 172 | :group 'message-news | 173 | :group 'message-news |
| 173 | :type '(repeat sexp)) | 174 | :type '(repeat sexp)) ; Fixme: improve this |
| 174 | 175 | ||
| 175 | (defcustom message-required-news-headers | 176 | (defcustom message-required-news-headers |
| 176 | '(From Newsgroups Subject Date Message-ID | 177 | '(From Newsgroups Subject Date Message-ID |
| @@ -244,7 +245,7 @@ nil means let mailer mail back a message to report errors." | |||
| 244 | :type 'boolean) | 245 | :type 'boolean) |
| 245 | 246 | ||
| 246 | (defcustom message-generate-new-buffers 'unique | 247 | (defcustom message-generate-new-buffers 'unique |
| 247 | "*Non-nil means that a new message buffer will be created whenever `message-setup' is called. | 248 | "*Non-nil means create a new message buffer whenever `message-setup' is called. |
| 248 | If this is a function, call that function with three parameters: The type, | 249 | If this is a function, call that function with three parameters: The type, |
| 249 | the to address and the group name. (Any of these may be nil.) The function | 250 | the to address and the group name. (Any of these may be nil.) The function |
| 250 | should return the new buffer name." | 251 | should return the new buffer name." |
| @@ -281,19 +282,20 @@ If t, use `message-user-organization-file'." | |||
| 281 | 282 | ||
| 282 | (defcustom message-make-forward-subject-function | 283 | (defcustom message-make-forward-subject-function |
| 283 | 'message-forward-subject-author-subject | 284 | 'message-forward-subject-author-subject |
| 284 | "*A list of functions that are called to generate a subject header for forwarded messages. | 285 | "*List of functions called to generate subject headers for forwarded messages. |
| 285 | The subject generated by the previous function is passed into each | 286 | The subject generated by the previous function is passed into each |
| 286 | successive function. | 287 | successive function. |
| 287 | 288 | ||
| 288 | The provided functions are: | 289 | The provided functions are: |
| 289 | 290 | ||
| 290 | * message-forward-subject-author-subject (Source of article (author or | 291 | * `message-forward-subject-author-subject' (Source of article (author or |
| 291 | newsgroup)), in brackets followed by the subject | 292 | newsgroup)), in brackets followed by the subject |
| 292 | * message-forward-subject-fwd (Subject of article with 'Fwd:' prepended | 293 | * `message-forward-subject-fwd' (Subject of article with 'Fwd:' prepended |
| 293 | to it." | 294 | to it." |
| 294 | :group 'message-forwarding | 295 | :group 'message-forwarding |
| 295 | :type '(radio (function-item message-forward-subject-author-subject) | 296 | :type '(radio (function-item message-forward-subject-author-subject) |
| 296 | (function-item message-forward-subject-fwd))) | 297 | (function-item message-forward-subject-fwd) |
| 298 | (repeat :tag "List of functions" function))) | ||
| 297 | 299 | ||
| 298 | (defcustom message-forward-as-mime t | 300 | (defcustom message-forward-as-mime t |
| 299 | "*If non-nil, forward messages as an inline/rfc822 MIME section. Otherwise, directly inline the old message in the forwarded message." | 301 | "*If non-nil, forward messages as an inline/rfc822 MIME section. Otherwise, directly inline the old message in the forwarded message." |
| @@ -347,12 +349,15 @@ The headers should be delimited by a line whose contents match the | |||
| 347 | variable `mail-header-separator'. | 349 | variable `mail-header-separator'. |
| 348 | 350 | ||
| 349 | Valid values include `message-send-mail-with-sendmail' (the default), | 351 | Valid values include `message-send-mail-with-sendmail' (the default), |
| 350 | `message-send-mail-with-mh', `message-send-mail-with-qmail' and | 352 | `message-send-mail-with-mh', `message-send-mail-with-qmail', |
| 351 | `smtpmail-send-it'." | 353 | `smtpmail-send-it' and `feedmail-send-it'. |
| 354 | |||
| 355 | See also `send-mail-function'." | ||
| 352 | :type '(radio (function-item message-send-mail-with-sendmail) | 356 | :type '(radio (function-item message-send-mail-with-sendmail) |
| 353 | (function-item message-send-mail-with-mh) | 357 | (function-item message-send-mail-with-mh) |
| 354 | (function-item message-send-mail-with-qmail) | 358 | (function-item message-send-mail-with-qmail) |
| 355 | (function-item smtpmail-send-it) | 359 | (function-item smtpmail-send-it) |
| 360 | (function-item feedmail-send-it) | ||
| 356 | (function :tag "Other")) | 361 | (function :tag "Other")) |
| 357 | :group 'message-sending | 362 | :group 'message-sending |
| 358 | :group 'message-mail) | 363 | :group 'message-mail) |
| @@ -366,25 +371,25 @@ variable `mail-header-separator'." | |||
| 366 | :type 'function) | 371 | :type 'function) |
| 367 | 372 | ||
| 368 | (defcustom message-reply-to-function nil | 373 | (defcustom message-reply-to-function nil |
| 369 | "Function that should return a list of headers. | 374 | "If non-nil, function that should return a list of headers. |
| 370 | This function should pick out addresses from the To, Cc, and From headers | 375 | This function should pick out addresses from the To, Cc, and From headers |
| 371 | and respond with new To and Cc headers." | 376 | and respond with new To and Cc headers." |
| 372 | :group 'message-interface | 377 | :group 'message-interface |
| 373 | :type 'function) | 378 | :type '(choice function (const nil))) |
| 374 | 379 | ||
| 375 | (defcustom message-wide-reply-to-function nil | 380 | (defcustom message-wide-reply-to-function nil |
| 376 | "Function that should return a list of headers. | 381 | "If non-nil, function that should return a list of headers. |
| 377 | This function should pick out addresses from the To, Cc, and From headers | 382 | This function should pick out addresses from the To, Cc, and From headers |
| 378 | and respond with new To and Cc headers." | 383 | and respond with new To and Cc headers." |
| 379 | :group 'message-interface | 384 | :group 'message-interface |
| 380 | :type 'function) | 385 | :type '(choice function (const nil))) |
| 381 | 386 | ||
| 382 | (defcustom message-followup-to-function nil | 387 | (defcustom message-followup-to-function nil |
| 383 | "Function that should return a list of headers. | 388 | "If non-nil, function that should return a list of headers. |
| 384 | This function should pick out addresses from the To, Cc, and From headers | 389 | This function should pick out addresses from the To, Cc, and From headers |
| 385 | and respond with new To and Cc headers." | 390 | and respond with new To and Cc headers." |
| 386 | :group 'message-interface | 391 | :group 'message-interface |
| 387 | :type 'function) | 392 | :type '(choice function (const nil))) |
| 388 | 393 | ||
| 389 | (defcustom message-use-followup-to 'ask | 394 | (defcustom message-use-followup-to 'ask |
| 390 | "*Specifies what to do with Followup-To header. | 395 | "*Specifies what to do with Followup-To header. |
| @@ -398,7 +403,7 @@ always query the user whether to use the value. If it is the symbol | |||
| 398 | (const ask))) | 403 | (const ask))) |
| 399 | 404 | ||
| 400 | (defcustom message-sendmail-f-is-evil nil | 405 | (defcustom message-sendmail-f-is-evil nil |
| 401 | "*Non-nil means that \"-f username\" should not be added to the sendmail command line. | 406 | "*Non-nil means don't add \"-f username\" to the sendmail command line. |
| 402 | Doing so would be even more evil than leaving it out." | 407 | Doing so would be even more evil than leaving it out." |
| 403 | :group 'message-sending | 408 | :group 'message-sending |
| 404 | :type 'boolean) | 409 | :type 'boolean) |
| @@ -542,7 +547,7 @@ If a form, the result from the form will be used instead." | |||
| 542 | "*Function called to return a Distribution header." | 547 | "*Function called to return a Distribution header." |
| 543 | :group 'message-news | 548 | :group 'message-news |
| 544 | :group 'message-headers | 549 | :group 'message-headers |
| 545 | :type 'function) | 550 | :type '(choice function (const nil))) |
| 546 | 551 | ||
| 547 | (defcustom message-expires 14 | 552 | (defcustom message-expires 14 |
| 548 | "Number of days before your article expires." | 553 | "Number of days before your article expires." |
| @@ -664,7 +669,7 @@ mail aliases off." | |||
| 664 | "*Directory where Message auto-saves buffers if Gnus isn't running. | 669 | "*Directory where Message auto-saves buffers if Gnus isn't running. |
| 665 | If nil, Message won't auto-save." | 670 | If nil, Message won't auto-save." |
| 666 | :group 'message-buffers | 671 | :group 'message-buffers |
| 667 | :type 'directory) | 672 | :type '(choice directory (const :tag "Don't auto-save" nil))) |
| 668 | 673 | ||
| 669 | (defcustom message-buffer-naming-style 'unique | 674 | (defcustom message-buffer-naming-style 'unique |
| 670 | "*The way new message buffers are named. | 675 | "*The way new message buffers are named. |
| @@ -674,7 +679,7 @@ Valid valued are `unique' and `unsent'." | |||
| 674 | :type '(choice (const :tag "unique" unique) | 679 | :type '(choice (const :tag "unique" unique) |
| 675 | (const :tag "unsent" unsent))) | 680 | (const :tag "unsent" unsent))) |
| 676 | 681 | ||
| 677 | (defcustom message-default-charset | 682 | (defcustom message-default-charset |
| 678 | (and (not (mm-multibyte-p)) 'iso-8859-1) | 683 | (and (not (mm-multibyte-p)) 'iso-8859-1) |
| 679 | "Default charset used in non-MULE Emacsen. | 684 | "Default charset used in non-MULE Emacsen. |
| 680 | If nil, you might be asked to input the charset." | 685 | If nil, you might be asked to input the charset." |
| @@ -682,7 +687,7 @@ If nil, you might be asked to input the charset." | |||
| 682 | :group 'message | 687 | :group 'message |
| 683 | :type 'symbol) | 688 | :type 'symbol) |
| 684 | 689 | ||
| 685 | (defcustom message-dont-reply-to-names | 690 | (defcustom message-dont-reply-to-names |
| 686 | (and (boundp 'rmail-dont-reply-to-names) rmail-dont-reply-to-names) | 691 | (and (boundp 'rmail-dont-reply-to-names) rmail-dont-reply-to-names) |
| 687 | "*A regexp specifying names to prune when doing wide replies. | 692 | "*A regexp specifying names to prune when doing wide replies. |
| 688 | A value of nil means exclude your own name only." | 693 | A value of nil means exclude your own name only." |
| @@ -904,8 +909,8 @@ The cdr of ech entry is a function for applying the face to a region.") | |||
| 904 | 909 | ||
| 905 | (defcustom message-send-mail-partially-limit 1000000 | 910 | (defcustom message-send-mail-partially-limit 1000000 |
| 906 | "The limitation of messages sent as message/partial. | 911 | "The limitation of messages sent as message/partial. |
| 907 | The lower bound of message size in characters, beyond which the message | 912 | The lower bound of message size in characters, beyond which the message |
| 908 | should be sent in several parts. If it is nil, the size is unlimited." | 913 | should be sent in several parts. If it is nil, the size is unlimited." |
| 909 | :version "21.1" | 914 | :version "21.1" |
| 910 | :group 'message-buffers | 915 | :group 'message-buffers |
| 911 | :type '(choice (const :tag "unlimited" nil) | 916 | :type '(choice (const :tag "unlimited" nil) |
| @@ -920,7 +925,7 @@ The first matched address (not primary one) is used in the From field." | |||
| 920 | 925 | ||
| 921 | (defcustom message-mail-user-agent nil | 926 | (defcustom message-mail-user-agent nil |
| 922 | "Like `mail-user-agent'. | 927 | "Like `mail-user-agent'. |
| 923 | Except if it is `nil', use Gnus native MUA; if it is t, use | 928 | Except if it is nil, use Gnus native MUA; if it is t, use |
| 924 | `mail-user-agent'." | 929 | `mail-user-agent'." |
| 925 | :type '(radio (const :tag "Gnus native" | 930 | :type '(radio (const :tag "Gnus native" |
| 926 | :format "%t\n" | 931 | :format "%t\n" |
| @@ -1061,19 +1066,19 @@ Except if it is `nil', use Gnus native MUA; if it is t, use | |||
| 1061 | ;;; | 1066 | ;;; |
| 1062 | 1067 | ||
| 1063 | (defmacro message-y-or-n-p (question show &rest text) | 1068 | (defmacro message-y-or-n-p (question show &rest text) |
| 1064 | "Ask QUESTION, displaying the rest of the arguments in a temp. buffer if SHOW" | 1069 | "Ask QUESTION, displaying remaining args in a temporary buffer if SHOW." |
| 1065 | `(message-talkative-question 'y-or-n-p ,question ,show ,@text)) | 1070 | `(message-talkative-question 'y-or-n-p ,question ,show ,@text)) |
| 1066 | 1071 | ||
| 1067 | ;; Delete the current line (and the next N lines.); | ||
| 1068 | (defmacro message-delete-line (&optional n) | 1072 | (defmacro message-delete-line (&optional n) |
| 1073 | "Delete the current line (and the next N lines)." | ||
| 1069 | `(delete-region (progn (beginning-of-line) (point)) | 1074 | `(delete-region (progn (beginning-of-line) (point)) |
| 1070 | (progn (forward-line ,(or n 1)) (point)))) | 1075 | (progn (forward-line ,(or n 1)) (point)))) |
| 1071 | 1076 | ||
| 1072 | (defun message-unquote-tokens (elems) | 1077 | (defun message-unquote-tokens (elems) |
| 1073 | "Remove double quotes (\") from strings in list." | 1078 | "Remove double quotes (\") from strings in list ELEMS." |
| 1074 | (mapcar (lambda (item) | 1079 | (mapcar (lambda (item) |
| 1075 | (while (string-match "^\\(.*\\)\"\\(.*\\)$" item) | 1080 | (while (string-match "^\\(.*\\)\"\\(.*\\)$" item) |
| 1076 | (setq item (concat (match-string 1 item) | 1081 | (setq item (concat (match-string 1 item) |
| 1077 | (match-string 2 item)))) | 1082 | (match-string 2 item)))) |
| 1078 | item) | 1083 | item) |
| 1079 | elems)) | 1084 | elems)) |
| @@ -1163,7 +1168,7 @@ is used by default." | |||
| 1163 | 1168 | ||
| 1164 | 1169 | ||
| 1165 | (defun message-fetch-reply-field (header) | 1170 | (defun message-fetch-reply-field (header) |
| 1166 | "Fetch FIELD from the message we're replying to." | 1171 | "Fetch field HEADER from the message we're replying to." |
| 1167 | (when (and message-reply-buffer | 1172 | (when (and message-reply-buffer |
| 1168 | (buffer-name message-reply-buffer)) | 1173 | (buffer-name message-reply-buffer)) |
| 1169 | (save-excursion | 1174 | (save-excursion |
| @@ -1186,12 +1191,12 @@ is used by default." | |||
| 1186 | (byte-code-function-p form))) | 1191 | (byte-code-function-p form))) |
| 1187 | 1192 | ||
| 1188 | (defun message-strip-list-identifiers (subject) | 1193 | (defun message-strip-list-identifiers (subject) |
| 1189 | "Remove list identifiers in `gnus-list-identifiers'." | 1194 | "Remove list identifiers in `gnus-list-identifiers' from string SUBJECT." |
| 1190 | (require 'gnus-sum) ; for gnus-list-identifiers | 1195 | (require 'gnus-sum) ; for gnus-list-identifiers |
| 1191 | (let ((regexp (if (stringp gnus-list-identifiers) | 1196 | (let ((regexp (if (stringp gnus-list-identifiers) |
| 1192 | gnus-list-identifiers | 1197 | gnus-list-identifiers |
| 1193 | (mapconcat 'identity gnus-list-identifiers " *\\|")))) | 1198 | (mapconcat 'identity gnus-list-identifiers " *\\|")))) |
| 1194 | (if (string-match (concat "\\(\\(\\(Re: +\\)?\\(" regexp | 1199 | (if (string-match (concat "\\(\\(\\(Re: +\\)?\\(" regexp |
| 1195 | " *\\)\\)+\\(Re: +\\)?\\)") subject) | 1200 | " *\\)\\)+\\(Re: +\\)?\\)") subject) |
| 1196 | (concat (substring subject 0 (match-beginning 1)) | 1201 | (concat (substring subject 0 (match-beginning 1)) |
| 1197 | (or (match-string 3 subject) | 1202 | (or (match-string 3 subject) |
| @@ -1201,14 +1206,14 @@ is used by default." | |||
| 1201 | subject))) | 1206 | subject))) |
| 1202 | 1207 | ||
| 1203 | (defun message-strip-subject-re (subject) | 1208 | (defun message-strip-subject-re (subject) |
| 1204 | "Remove \"Re:\" from subject lines." | 1209 | "Remove \"Re:\" from subject lines in string SUBJECT." |
| 1205 | (if (string-match message-subject-re-regexp subject) | 1210 | (if (string-match message-subject-re-regexp subject) |
| 1206 | (substring subject (match-end 0)) | 1211 | (substring subject (match-end 0)) |
| 1207 | subject)) | 1212 | subject)) |
| 1208 | 1213 | ||
| 1209 | (defun message-remove-header (header &optional is-regexp first reverse) | 1214 | (defun message-remove-header (header &optional is-regexp first reverse) |
| 1210 | "Remove HEADER in the narrowed buffer. | 1215 | "Remove HEADER in the narrowed buffer. |
| 1211 | If REGEXP, HEADER is a regular expression. | 1216 | If IS-REGEXP, HEADER is a regular expression. |
| 1212 | If FIRST, only remove the first instance of the header. | 1217 | If FIRST, only remove the first instance of the header. |
| 1213 | Return the number of headers removed." | 1218 | Return the number of headers removed." |
| 1214 | (goto-char (point-min)) | 1219 | (goto-char (point-min)) |
| @@ -1264,7 +1269,7 @@ Return the number of headers removed." | |||
| 1264 | (goto-char (point-min))) | 1269 | (goto-char (point-min))) |
| 1265 | 1270 | ||
| 1266 | (defun message-narrow-to-head-1 () | 1271 | (defun message-narrow-to-head-1 () |
| 1267 | "Like `message-narrow-to-head'. Don't widen." | 1272 | "Like `message-narrow-to-head'. Don't widen." |
| 1268 | (narrow-to-region | 1273 | (narrow-to-region |
| 1269 | (goto-char (point-min)) | 1274 | (goto-char (point-min)) |
| 1270 | (if (search-forward "\n\n" nil 1) | 1275 | (if (search-forward "\n\n" nil 1) |
| @@ -1463,9 +1468,9 @@ Point is left at the beginning of the narrowed-to region." | |||
| 1463 | ;;;###autoload | 1468 | ;;;###autoload |
| 1464 | (defun message-mode () | 1469 | (defun message-mode () |
| 1465 | "Major mode for editing mail and news to be sent. | 1470 | "Major mode for editing mail and news to be sent. |
| 1466 | Like Text Mode but with these additional commands: | 1471 | Like Text Mode but with these additional commands:\\<message-mode-map> |
| 1467 | C-c C-s message-send (send the message) C-c C-c message-send-and-exit | 1472 | C-c C-s `message-send' (send the message) C-c C-c `message-send-and-exit' |
| 1468 | C-c C-d Postpone sending the message C-c C-k Kill the message | 1473 | C-c C-d Postpone sending the message C-c C-k Kill the message |
| 1469 | C-c C-f move to a header field (and create it if there isn't): | 1474 | C-c C-f move to a header field (and create it if there isn't): |
| 1470 | C-c C-f C-t move to To C-c C-f C-s move to Subject | 1475 | C-c C-f C-t move to To C-c C-f C-s move to Subject |
| 1471 | C-c C-f C-c move to Cc C-c C-f C-b move to Bcc | 1476 | C-c C-f C-c move to Cc C-c C-f C-b move to Bcc |
| @@ -1473,19 +1478,19 @@ C-c C-f move to a header field (and create it if there isn't): | |||
| 1473 | C-c C-f C-u move to Summary C-c C-f C-n move to Newsgroups | 1478 | C-c C-f C-u move to Summary C-c C-f C-n move to Newsgroups |
| 1474 | C-c C-f C-k move to Keywords C-c C-f C-d move to Distribution | 1479 | C-c C-f C-k move to Keywords C-c C-f C-d move to Distribution |
| 1475 | C-c C-f C-f move to Followup-To | 1480 | C-c C-f C-f move to Followup-To |
| 1476 | C-c C-t message-insert-to (add a To header to a news followup) | 1481 | C-c C-t `message-insert-to' (add a To header to a news followup) |
| 1477 | C-c C-n message-insert-newsgroups (add a Newsgroup header to a news reply) | 1482 | C-c C-n `message-insert-newsgroups' (add a Newsgroup header to a news reply) |
| 1478 | C-c C-b message-goto-body (move to beginning of message text). | 1483 | C-c C-b `message-goto-body' (move to beginning of message text). |
| 1479 | C-c C-i message-goto-signature (move to the beginning of the signature). | 1484 | C-c C-i `message-goto-signature' (move to the beginning of the signature). |
| 1480 | C-c C-w message-insert-signature (insert `message-signature-file' file). | 1485 | C-c C-w `message-insert-signature' (insert `message-signature-file' file). |
| 1481 | C-c C-y message-yank-original (insert current message, if any). | 1486 | C-c C-y `message-yank-original' (insert current message, if any). |
| 1482 | C-c C-q message-fill-yanked-message (fill what was yanked). | 1487 | C-c C-q `message-fill-yanked-message' (fill what was yanked). |
| 1483 | C-c C-e message-elide-region (elide the text between point and mark). | 1488 | C-c C-e `message-elide-region' (elide the text between point and mark). |
| 1484 | C-c C-v message-delete-not-region (remove the text outside the region). | 1489 | C-c C-v `message-delete-not-region' (remove the text outside the region). |
| 1485 | C-c C-z message-kill-to-signature (kill the text up to the signature). | 1490 | C-c C-z `message-kill-to-signature' (kill the text up to the signature). |
| 1486 | C-c C-r message-caesar-buffer-body (rot13 the message body). | 1491 | C-c C-r `message-caesar-buffer-body' (rot13 the message body). |
| 1487 | C-c C-a mml-attach-file (attach a file as MIME). | 1492 | C-c C-a `mml-attach-file' (attach a file as MIME). |
| 1488 | M-RET message-newline-and-reformat (break the line and reformat)." | 1493 | M-RET `message-newline-and-reformat' (break the line and reformat)." |
| 1489 | (interactive) | 1494 | (interactive) |
| 1490 | (if (local-variable-p 'mml-buffer-list (current-buffer)) | 1495 | (if (local-variable-p 'mml-buffer-list (current-buffer)) |
| 1491 | (mml-destroy-buffers)) | 1496 | (mml-destroy-buffers)) |
| @@ -1720,7 +1725,7 @@ With the prefix argument FORCE, insert the header anyway." | |||
| 1720 | ;;; Various commands | 1725 | ;;; Various commands |
| 1721 | 1726 | ||
| 1722 | (defun message-delete-not-region (beg end) | 1727 | (defun message-delete-not-region (beg end) |
| 1723 | "Delete everything in the body of the current message that is outside of the region." | 1728 | "Delete everything in the body of the current message outside of the region." |
| 1724 | (interactive "r") | 1729 | (interactive "r") |
| 1725 | (save-excursion | 1730 | (save-excursion |
| 1726 | (goto-char end) | 1731 | (goto-char end) |
| @@ -1771,7 +1776,7 @@ With the prefix argument FORCE, insert the header anyway." | |||
| 1771 | (forward-line 1))) | 1776 | (forward-line 1))) |
| 1772 | 1777 | ||
| 1773 | (defun message-insert-signature (&optional force) | 1778 | (defun message-insert-signature (&optional force) |
| 1774 | "Insert a signature. See documentation for the `message-signature' variable." | 1779 | "Insert a signature. See documentation for variable `message-signature'." |
| 1775 | (interactive (list 0)) | 1780 | (interactive (list 0)) |
| 1776 | (let* ((signature | 1781 | (let* ((signature |
| 1777 | (cond | 1782 | (cond |
| @@ -1808,7 +1813,7 @@ With the prefix argument FORCE, insert the header anyway." | |||
| 1808 | (or (bolp) (insert "\n"))))) | 1813 | (or (bolp) (insert "\n"))))) |
| 1809 | 1814 | ||
| 1810 | (defun message-elide-region (b e) | 1815 | (defun message-elide-region (b e) |
| 1811 | "Elide the text between point and mark. | 1816 | "Elide the text in the region. |
| 1812 | An ellipsis (from `message-elide-ellipsis') will be inserted where the | 1817 | An ellipsis (from `message-elide-ellipsis') will be inserted where the |
| 1813 | text was killed." | 1818 | text was killed." |
| 1814 | (interactive "r") | 1819 | (interactive "r") |
| @@ -1818,7 +1823,7 @@ text was killed." | |||
| 1818 | (defvar message-caesar-translation-table nil) | 1823 | (defvar message-caesar-translation-table nil) |
| 1819 | 1824 | ||
| 1820 | (defun message-caesar-region (b e &optional n) | 1825 | (defun message-caesar-region (b e &optional n) |
| 1821 | "Caesar rotation of region by N, default 13, for decrypting netnews." | 1826 | "Caesar rotate region B to E by N, default 13, for decrypting netnews." |
| 1822 | (interactive | 1827 | (interactive |
| 1823 | (list | 1828 | (list |
| 1824 | (min (point) (or (mark t) (point))) | 1829 | (min (point) (or (mark t) (point))) |
| @@ -1852,8 +1857,8 @@ text was killed." | |||
| 1852 | (substring table (+ ?a 26) 255)))) | 1857 | (substring table (+ ?a 26) 255)))) |
| 1853 | 1858 | ||
| 1854 | (defun message-caesar-buffer-body (&optional rotnum) | 1859 | (defun message-caesar-buffer-body (&optional rotnum) |
| 1855 | "Caesar rotates all letters in the current buffer by 13 places. | 1860 | "Caesar rotate all letters in the current buffer by 13 places. |
| 1856 | Used to encode/decode possiblyun offensive messages (commonly in net.jokes). | 1861 | Used to encode/decode possibly offensive messages (commonly in rec.humor). |
| 1857 | With prefix arg, specifies the number of places to rotate each letter forward. | 1862 | With prefix arg, specifies the number of places to rotate each letter forward. |
| 1858 | Mail and USENET news headers are not rotated." | 1863 | Mail and USENET news headers are not rotated." |
| 1859 | (interactive (if current-prefix-arg | 1864 | (interactive (if current-prefix-arg |
| @@ -2046,7 +2051,7 @@ prefix, and don't delete any headers." | |||
| 2046 | (funcall message-citation-line-function))))) | 2051 | (funcall message-citation-line-function))))) |
| 2047 | 2052 | ||
| 2048 | (defun message-insert-citation-line () | 2053 | (defun message-insert-citation-line () |
| 2049 | "Function that inserts a simple citation line." | 2054 | "Insert a simple citation line." |
| 2050 | (when message-reply-headers | 2055 | (when message-reply-headers |
| 2051 | (insert (mail-header-from message-reply-headers) " writes:\n\n"))) | 2056 | (insert (mail-header-from message-reply-headers) " writes:\n\n"))) |
| 2052 | 2057 | ||
| @@ -2141,7 +2146,7 @@ The text will also be indented the normal way." | |||
| 2141 | (message-do-actions actions)))) | 2146 | (message-do-actions actions)))) |
| 2142 | 2147 | ||
| 2143 | (defun message-bury (buffer) | 2148 | (defun message-bury (buffer) |
| 2144 | "Bury this mail buffer." | 2149 | "Bury this mail BUFFER." |
| 2145 | (let ((newbuf (other-buffer buffer))) | 2150 | (let ((newbuf (other-buffer buffer))) |
| 2146 | (bury-buffer buffer) | 2151 | (bury-buffer buffer) |
| 2147 | (if (and (fboundp 'frame-parameters) | 2152 | (if (and (fboundp 'frame-parameters) |
| @@ -2362,7 +2367,7 @@ It should typically alter the sending method in some way or other." | |||
| 2362 | ;; require one newline at the end. | 2367 | ;; require one newline at the end. |
| 2363 | (or (= (preceding-char) ?\n) | 2368 | (or (= (preceding-char) ?\n) |
| 2364 | (insert ?\n)) | 2369 | (insert ?\n)) |
| 2365 | (when | 2370 | (when |
| 2366 | (save-restriction | 2371 | (save-restriction |
| 2367 | (message-narrow-to-headers) | 2372 | (message-narrow-to-headers) |
| 2368 | (and news | 2373 | (and news |
| @@ -2375,7 +2380,7 @@ It should typically alter the sending method in some way or other." | |||
| 2375 | (message-insert-courtesy-copy)) | 2380 | (message-insert-courtesy-copy)) |
| 2376 | (if (or (not message-send-mail-partially-limit) | 2381 | (if (or (not message-send-mail-partially-limit) |
| 2377 | (< (point-max) message-send-mail-partially-limit) | 2382 | (< (point-max) message-send-mail-partially-limit) |
| 2378 | (not (y-or-n-p "The message size is too large, should it be sent partially?"))) | 2383 | (not (y-or-n-p "The message size is too large, should it be sent partially? "))) |
| 2379 | (mm-with-unibyte-current-buffer | 2384 | (mm-with-unibyte-current-buffer |
| 2380 | (funcall message-send-mail-function)) | 2385 | (funcall message-send-mail-function)) |
| 2381 | (message-send-mail-partially))) | 2386 | (message-send-mail-partially))) |
| @@ -2527,7 +2532,7 @@ to find out how to use this." | |||
| 2527 | message-syntax-checks) | 2532 | message-syntax-checks) |
| 2528 | message-syntax-checks)) | 2533 | message-syntax-checks)) |
| 2529 | (message-this-is-news t) | 2534 | (message-this-is-news t) |
| 2530 | (message-posting-charset (gnus-setup-posting-charset | 2535 | (message-posting-charset (gnus-setup-posting-charset |
| 2531 | (save-restriction | 2536 | (save-restriction |
| 2532 | (message-narrow-to-headers-or-head) | 2537 | (message-narrow-to-headers-or-head) |
| 2533 | (message-fetch-field "Newsgroups")))) | 2538 | (message-fetch-field "Newsgroups")))) |
| @@ -2554,7 +2559,7 @@ to find out how to use this." | |||
| 2554 | (erase-buffer) | 2559 | (erase-buffer) |
| 2555 | ;; Avoid copying text props. | 2560 | ;; Avoid copying text props. |
| 2556 | (insert (with-current-buffer messbuf | 2561 | (insert (with-current-buffer messbuf |
| 2557 | (buffer-substring-no-properties | 2562 | (buffer-substring-no-properties |
| 2558 | (point-min) (point-max)))) | 2563 | (point-min) (point-max)))) |
| 2559 | (message-encode-message-body) | 2564 | (message-encode-message-body) |
| 2560 | ;; Remove some headers. | 2565 | ;; Remove some headers. |
| @@ -2595,7 +2600,7 @@ to find out how to use this." | |||
| 2595 | ;;; | 2600 | ;;; |
| 2596 | 2601 | ||
| 2597 | (defun message-check-element (type) | 2602 | (defun message-check-element (type) |
| 2598 | "Returns non-nil if this type is not to be checked." | 2603 | "Return non-nil if this TYPE is not to be checked." |
| 2599 | (if (eq message-syntax-checks 'dont-check-for-anything-just-trust-me) | 2604 | (if (eq message-syntax-checks 'dont-check-for-anything-just-trust-me) |
| 2600 | t | 2605 | t |
| 2601 | (let ((able (assq type message-syntax-checks))) | 2606 | (let ((able (assq type message-syntax-checks))) |
| @@ -2737,7 +2742,7 @@ to find out how to use this." | |||
| 2737 | t | 2742 | t |
| 2738 | (y-or-n-p | 2743 | (y-or-n-p |
| 2739 | (format | 2744 | (format |
| 2740 | "Really post to %s unknown group%s: %s " | 2745 | "Really post to %s unknown group%s: %s? " |
| 2741 | (if (= (length errors) 1) "this" "these") | 2746 | (if (= (length errors) 1) "this" "these") |
| 2742 | (if (= (length errors) 1) "" "s") | 2747 | (if (= (length errors) 1) "" "s") |
| 2743 | (mapconcat 'identity errors ", "))))))) | 2748 | (mapconcat 'identity errors ", "))))))) |
| @@ -2939,7 +2944,7 @@ to find out how to use this." | |||
| 2939 | (kill-buffer (current-buffer))))) | 2944 | (kill-buffer (current-buffer))))) |
| 2940 | 2945 | ||
| 2941 | (defun message-output (filename) | 2946 | (defun message-output (filename) |
| 2942 | "Append this article to Unix/babyl mail file.." | 2947 | "Append this article to Unix/babyl mail file FILENAME." |
| 2943 | (if (and (file-readable-p filename) | 2948 | (if (and (file-readable-p filename) |
| 2944 | (mail-file-babyl-p filename)) | 2949 | (mail-file-babyl-p filename)) |
| 2945 | (gnus-output-to-rmail filename t) | 2950 | (gnus-output-to-rmail filename t) |
| @@ -3433,7 +3438,7 @@ Headers already prepared in the buffer are not modified." | |||
| 3433 | (goto-char (point-max))))) | 3438 | (goto-char (point-max))))) |
| 3434 | 3439 | ||
| 3435 | (defun message-shorten-1 (list cut surplus) | 3440 | (defun message-shorten-1 (list cut surplus) |
| 3436 | ;; Cut SURPLUS elements out of LIST, beginning with CUTth one. | 3441 | "Cut SURPLUS elements out of LIST, beginning with CUTth one." |
| 3437 | (setcdr (nthcdr (- cut 2) list) | 3442 | (setcdr (nthcdr (- cut 2) list) |
| 3438 | (nthcdr (+ (- cut 2) surplus 1) list))) | 3443 | (nthcdr (+ (- cut 2) surplus 1) list))) |
| 3439 | 3444 | ||
| @@ -3606,13 +3611,13 @@ than 988 characters long, and if they are not, trim them until they are." | |||
| 3606 | (setq to (cdr field)) | 3611 | (setq to (cdr field)) |
| 3607 | (setq headers (delq field headers))) | 3612 | (setq headers (delq field headers))) |
| 3608 | (let ((mail-user-agent mua)) | 3613 | (let ((mail-user-agent mua)) |
| 3609 | (compose-mail to subject | 3614 | (compose-mail to subject |
| 3610 | (mapcar (lambda (item) | 3615 | (mapcar (lambda (item) |
| 3611 | (cons | 3616 | (cons |
| 3612 | (format "%s" (car item)) | 3617 | (format "%s" (car item)) |
| 3613 | (cdr item))) | 3618 | (cdr item))) |
| 3614 | headers) | 3619 | headers) |
| 3615 | nil switch-function yank-action actions))))) | 3620 | nil switch-function yank-action actions))))) |
| 3616 | 3621 | ||
| 3617 | (eval-when-compile (defvar mc-modes-alist)) | 3622 | (eval-when-compile (defvar mc-modes-alist)) |
| 3618 | (defun message-setup-1 (headers &optional replybuffer actions) | 3623 | (defun message-setup-1 (headers &optional replybuffer actions) |
| @@ -4099,7 +4104,8 @@ header line with the old Message-ID." | |||
| 4099 | ;;; Washing Subject: | 4104 | ;;; Washing Subject: |
| 4100 | 4105 | ||
| 4101 | (defun message-wash-subject (subject) | 4106 | (defun message-wash-subject (subject) |
| 4102 | "Remove junk like \"Re:\", \"(fwd)\", etc. that was added to the subject by previous forwarders, replyers, etc." | 4107 | "Remove junk like \"Re:\", \"(fwd)\", etc. added to subject string SUBJECT. |
| 4108 | Previous forwarders, replyers, etc. may add it." | ||
| 4103 | (with-temp-buffer | 4109 | (with-temp-buffer |
| 4104 | (insert-string subject) | 4110 | (insert-string subject) |
| 4105 | (goto-char (point-min)) | 4111 | (goto-char (point-min)) |
| @@ -4131,7 +4137,7 @@ header line with the old Message-ID." | |||
| 4131 | ;;; Forwarding messages. | 4137 | ;;; Forwarding messages. |
| 4132 | 4138 | ||
| 4133 | (defun message-forward-subject-author-subject (subject) | 4139 | (defun message-forward-subject-author-subject (subject) |
| 4134 | "Generate a subject for a forwarded message. | 4140 | "Generate a SUBJECT for a forwarded message. |
| 4135 | The form is: [Source] Subject, where if the original message was mail, | 4141 | The form is: [Source] Subject, where if the original message was mail, |
| 4136 | Source is the sender, and if the original message was news, Source is | 4142 | Source is the sender, and if the original message was news, Source is |
| 4137 | the list of newsgroups is was posted to." | 4143 | the list of newsgroups is was posted to." |
| @@ -4142,7 +4148,7 @@ the list of newsgroups is was posted to." | |||
| 4142 | "] " subject)) | 4148 | "] " subject)) |
| 4143 | 4149 | ||
| 4144 | (defun message-forward-subject-fwd (subject) | 4150 | (defun message-forward-subject-fwd (subject) |
| 4145 | "Generate a subject for a forwarded message. | 4151 | "Generate a SUBJECT for a forwarded message. |
| 4146 | The form is: Fwd: Subject, where Subject is the original subject of | 4152 | The form is: Fwd: Subject, where Subject is the original subject of |
| 4147 | the message." | 4153 | the message." |
| 4148 | (concat "Fwd: " subject)) | 4154 | (concat "Fwd: " subject)) |
| @@ -4239,7 +4245,7 @@ Optional DIGEST will use digest to forward." | |||
| 4239 | (save-restriction | 4245 | (save-restriction |
| 4240 | (narrow-to-region b e) | 4246 | (narrow-to-region b e) |
| 4241 | (goto-char b) | 4247 | (goto-char b) |
| 4242 | (narrow-to-region (point) | 4248 | (narrow-to-region (point) |
| 4243 | (or (search-forward "\n\n" nil t) (point))) | 4249 | (or (search-forward "\n\n" nil t) (point))) |
| 4244 | (delete-region (point-min) (point-max))) | 4250 | (delete-region (point-min) (point-max))) |
| 4245 | (when (and (not current-prefix-arg) | 4251 | (when (and (not current-prefix-arg) |
| @@ -4247,7 +4253,7 @@ Optional DIGEST will use digest to forward." | |||
| 4247 | (save-restriction | 4253 | (save-restriction |
| 4248 | (narrow-to-region b e) | 4254 | (narrow-to-region b e) |
| 4249 | (goto-char b) | 4255 | (goto-char b) |
| 4250 | (narrow-to-region (point) | 4256 | (narrow-to-region (point) |
| 4251 | (or (search-forward "\n\n" nil t) (point))) | 4257 | (or (search-forward "\n\n" nil t) (point))) |
| 4252 | (message-remove-header message-forward-ignored-headers t))))) | 4258 | (message-remove-header message-forward-ignored-headers t))))) |
| 4253 | (message-position-point))) | 4259 | (message-position-point))) |
| @@ -4549,7 +4555,7 @@ The following arguments may contain lists of values." | |||
| 4549 | (list list)))) | 4555 | (list list)))) |
| 4550 | 4556 | ||
| 4551 | (defun message-generate-new-buffer-clone-locals (name &optional varstr) | 4557 | (defun message-generate-new-buffer-clone-locals (name &optional varstr) |
| 4552 | "Create and return a buffer with a name based on NAME using generate-new-buffer. | 4558 | "Create and return a buffer with name based on NAME using `generate-new-buffer.' |
| 4553 | Then clone the local variables and values from the old buffer to the | 4559 | Then clone the local variables and values from the old buffer to the |
| 4554 | new one, cloning only the locals having a substring matching the | 4560 | new one, cloning only the locals having a substring matching the |
| 4555 | regexp varstr." | 4561 | regexp varstr." |
| @@ -4584,7 +4590,7 @@ regexp varstr." | |||
| 4584 | (defvar message-inhibit-body-encoding nil) | 4590 | (defvar message-inhibit-body-encoding nil) |
| 4585 | 4591 | ||
| 4586 | (defun message-encode-message-body () | 4592 | (defun message-encode-message-body () |
| 4587 | (unless message-inhibit-body-encoding | 4593 | (unless message-inhibit-body-encoding |
| 4588 | (let ((mail-parse-charset (or mail-parse-charset | 4594 | (let ((mail-parse-charset (or mail-parse-charset |
| 4589 | message-default-charset)) | 4595 | message-default-charset)) |
| 4590 | (case-fold-search t) | 4596 | (case-fold-search t) |
| @@ -4637,7 +4643,7 @@ regexp varstr." | |||
| 4637 | 4643 | ||
| 4638 | (defun message-use-alternative-email-as-from () | 4644 | (defun message-use-alternative-email-as-from () |
| 4639 | (require 'mail-utils) | 4645 | (require 'mail-utils) |
| 4640 | (let* ((fields '("To" "Cc")) | 4646 | (let* ((fields '("To" "Cc")) |
| 4641 | (emails | 4647 | (emails |
| 4642 | (split-string | 4648 | (split-string |
| 4643 | (mail-strip-quoted-names | 4649 | (mail-strip-quoted-names |