Mercurial > emacs
comparison lisp/mail/rmail.el @ 101539:8f87ea6e3964
Remove leading `*' from defcustom docs.
Remove needless autoloads of many defcustoms and hooks.
(rmail-enable-mime, rmail-insert-mime-resent-message-function)
(rmail-search-mime-message-function, rmail-search-mime-header-function)
(rmail-decode-mime-charset): Doc fix.
(rmail-search-message, rmail-resend): Check functions set before use.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Tue, 27 Jan 2009 03:43:04 +0000 |
parents | 86f67454cfbb |
children | 28b036b7fc1c |
comparison
equal
deleted
inserted
replaced
101538:cf5cba9728ee | 101539:8f87ea6e3964 |
---|---|
108 ; (expand-file-name "~/RMAIL") | 108 ; (expand-file-name "~/RMAIL") |
109 ; "") | 109 ; "") |
110 | 110 |
111 ;; Temporary support for mbox. | 111 ;; Temporary support for mbox. |
112 (defcustom rmail-file-name "~/RMAIL" | 112 (defcustom rmail-file-name "~/RMAIL" |
113 "*Name of user's primary mail file." | 113 "Name of user's primary mail file." |
114 :type 'string | 114 :type 'string |
115 :group 'rmail | 115 :group 'rmail |
116 :version "21.1") | 116 :version "21.1") |
117 | 117 |
118 (defgroup rmail nil | 118 (defgroup rmail nil |
164 "If non-nil, the file name of the `movemail' program." | 164 "If non-nil, the file name of the `movemail' program." |
165 :group 'rmail-retrieve | 165 :group 'rmail-retrieve |
166 :type '(choice (const nil) string)) | 166 :type '(choice (const nil) string)) |
167 | 167 |
168 (defcustom rmail-pop-password nil | 168 (defcustom rmail-pop-password nil |
169 "*Password to use when reading mail from POP server. | 169 "Password to use when reading mail from POP server. |
170 Please use `rmail-remote-password' instead." | 170 Please use `rmail-remote-password' instead." |
171 :type '(choice (string :tag "Password") | 171 :type '(choice (string :tag "Password") |
172 (const :tag "Not Required" nil)) | 172 (const :tag "Not Required" nil)) |
173 :group 'rmail-obsolete) | 173 :group 'rmail-obsolete) |
174 | 174 |
175 (defcustom rmail-pop-password-required nil | 175 (defcustom rmail-pop-password-required nil |
176 "*Non-nil if a password is required when reading mail from a POP server. | 176 "Non-nil if a password is required when reading mail from a POP server. |
177 Please use rmail-remote-password-required instead." | 177 Please use rmail-remote-password-required instead." |
178 :type 'boolean | 178 :type 'boolean |
179 :group 'rmail-obsolete) | 179 :group 'rmail-obsolete) |
180 | 180 |
181 (defcustom rmail-remote-password nil | 181 (defcustom rmail-remote-password nil |
182 "*Password to use when reading mail from a remote server. | 182 "Password to use when reading mail from a remote server. |
183 This setting is ignored for mailboxes whose URL already contains a password." | 183 This setting is ignored for mailboxes whose URL already contains a password." |
184 :type '(choice (string :tag "Password") | 184 :type '(choice (string :tag "Password") |
185 (const :tag "Not Required" nil)) | 185 (const :tag "Not Required" nil)) |
186 :set-after '(rmail-pop-password) | 186 :set-after '(rmail-pop-password) |
187 :set #'(lambda (symbol value) | 187 :set #'(lambda (symbol value) |
194 (setq rmail-pop-password nil)) | 194 (setq rmail-pop-password nil)) |
195 :group 'rmail-retrieve | 195 :group 'rmail-retrieve |
196 :version "22.1") | 196 :version "22.1") |
197 | 197 |
198 (defcustom rmail-remote-password-required nil | 198 (defcustom rmail-remote-password-required nil |
199 "*Non-nil if a password is required when reading mail from a remote server." | 199 "Non-nil if a password is required when reading mail from a remote server." |
200 :type 'boolean | 200 :type 'boolean |
201 :set-after '(rmail-pop-password-required) | 201 :set-after '(rmail-pop-password-required) |
202 :set #'(lambda (symbol value) | 202 :set #'(lambda (symbol value) |
203 (set-default symbol | 203 (set-default symbol |
204 (if (and (not value) | 204 (if (and (not value) |
209 (setq rmail-pop-password-required nil)) | 209 (setq rmail-pop-password-required nil)) |
210 :group 'rmail-retrieve | 210 :group 'rmail-retrieve |
211 :version "22.1") | 211 :version "22.1") |
212 | 212 |
213 (defcustom rmail-movemail-flags nil | 213 (defcustom rmail-movemail-flags nil |
214 "*List of flags to pass to movemail. | 214 "List of flags to pass to movemail. |
215 Most commonly used to specify `-g' to enable GSS-API authentication | 215 Most commonly used to specify `-g' to enable GSS-API authentication |
216 or `-k' to enable Kerberos authentication." | 216 or `-k' to enable Kerberos authentication." |
217 :type '(repeat string) | 217 :type '(repeat string) |
218 :group 'rmail-retrieve | 218 :group 'rmail-retrieve |
219 :version "20.3") | 219 :version "20.3") |
226 please report it with \\[report-emacs-bug].") | 226 please report it with \\[report-emacs-bug].") |
227 | 227 |
228 (defvar rmail-encoded-remote-password nil) | 228 (defvar rmail-encoded-remote-password nil) |
229 | 229 |
230 (defcustom rmail-preserve-inbox nil | 230 (defcustom rmail-preserve-inbox nil |
231 "*Non-nil means leave incoming mail in the user's inbox--don't delete it." | 231 "Non-nil means leave incoming mail in the user's inbox--don't delete it." |
232 :type 'boolean | 232 :type 'boolean |
233 :group 'rmail-retrieve) | 233 :group 'rmail-retrieve) |
234 | 234 |
235 (defcustom rmail-movemail-search-path nil | 235 (defcustom rmail-movemail-search-path nil |
236 "*List of directories to search for movemail (in addition to `exec-path')." | 236 "List of directories to search for movemail (in addition to `exec-path')." |
237 :group 'rmail-retrieve | 237 :group 'rmail-retrieve |
238 :type '(repeat (directory))) | 238 :type '(repeat (directory))) |
239 | 239 |
240 (declare-function mail-position-on-field "sendmail" (field &optional soft)) | 240 (declare-function mail-position-on-field "sendmail" (field &optional soft)) |
241 (declare-function mail-text-start "sendmail" ()) | 241 (declare-function mail-text-start "sendmail" ()) |
242 (declare-function rmail-dont-reply-to "mail-utils" (destinations)) | 242 (declare-function rmail-dont-reply-to "mail-utils" (destinations)) |
243 (declare-function rmail-update-summary "rmailsum" (&rest ignore)) | 243 (declare-function rmail-update-summary "rmailsum" (&rest ignore)) |
311 ;; I'm not sure if M-x rmail is the only entry point to this package. | 311 ;; I'm not sure if M-x rmail is the only entry point to this package. |
312 ;; If so, this can be moved there. | 312 ;; If so, this can be moved there. |
313 (rmail-movemail-variant-p) | 313 (rmail-movemail-variant-p) |
314 | 314 |
315 ;;;###autoload | 315 ;;;###autoload |
316 (defcustom rmail-dont-reply-to-names nil "\ | 316 (defcustom rmail-dont-reply-to-names nil |
317 *A regexp specifying addresses to prune from a reply message. | 317 "A regexp specifying addresses to prune from a reply message. |
318 A value of nil means exclude your own email address as an address | 318 A value of nil means exclude your own email address as an address |
319 plus whatever is specified by `rmail-default-dont-reply-to-names'." | 319 plus whatever is specified by `rmail-default-dont-reply-to-names'." |
320 :type '(choice regexp (const :tag "Your Name" nil)) | 320 :type '(choice regexp (const :tag "Your Name" nil)) |
321 :group 'rmail-reply) | 321 :group 'rmail-reply) |
322 | 322 |
323 ;;;###autoload | 323 ;;;###autoload |
324 (defvar rmail-default-dont-reply-to-names "\\`info-" "\ | 324 (defvar rmail-default-dont-reply-to-names "\\`info-" |
325 A regular expression specifying part of the default value of the | 325 "A regular expression specifying part of the default value of the |
326 variable `rmail-dont-reply-to-names', for when the user does not set | 326 variable `rmail-dont-reply-to-names', for when the user does not set |
327 `rmail-dont-reply-to-names' explicitly. (The other part of the default | 327 `rmail-dont-reply-to-names' explicitly. (The other part of the default |
328 value is the user's email address and name.) | 328 value is the user's email address and name.) |
329 It is useful to set this variable in the site customization file.") | 329 It is useful to set this variable in the site customization file.") |
330 | 330 |
331 ;;;###autoload | |
332 (defcustom rmail-ignored-headers | 331 (defcustom rmail-ignored-headers |
333 (concat "^via:\\|^mail-from:\\|^origin:\\|^references:\\|^sender:" | 332 (concat "^via:\\|^mail-from:\\|^origin:\\|^references:\\|^sender:" |
334 "\\|^status:\\|^received:\\|^x400-originator:\\|^x400-recipients:" | 333 "\\|^status:\\|^received:\\|^x400-originator:\\|^x400-recipients:" |
335 "\\|^x400-received:\\|^x400-mts-identifier:\\|^x400-content-type:" | 334 "\\|^x400-received:\\|^x400-mts-identifier:\\|^x400-content-type:" |
336 "\\|^\\(resent-\\|\\)message-id:\\|^summary-line:\\|^resent-date:" | 335 "\\|^\\(resent-\\|\\)message-id:\\|^summary-line:\\|^resent-date:" |
345 "\\|^importance:\\|^envelope-to:\\|^delivery-date\\|^openpgp:" | 344 "\\|^importance:\\|^envelope-to:\\|^delivery-date\\|^openpgp:" |
346 "\\|^mbox-line:\\|^cancel-lock:" | 345 "\\|^mbox-line:\\|^cancel-lock:" |
347 "\\|^DomainKey-Signature:\\|^dkim-signature:" | 346 "\\|^DomainKey-Signature:\\|^dkim-signature:" |
348 "\\|^resent-face:\\|^resent-x.*:\\|^resent-organization:\\|^resent-openpgp:" | 347 "\\|^resent-face:\\|^resent-x.*:\\|^resent-organization:\\|^resent-openpgp:" |
349 "\\|^x-.*:") | 348 "\\|^x-.*:") |
350 "*Regexp to match header fields that Rmail should normally hide. | 349 "Regexp to match header fields that Rmail should normally hide. |
351 \(See also `rmail-nonignored-headers', which overrides this regexp.) | 350 \(See also `rmail-nonignored-headers', which overrides this regexp.) |
352 This variable is used for reformatting the message header, | 351 This variable is used for reformatting the message header, |
353 which normally happens once for each message, | 352 which normally happens once for each message, |
354 when you view the message for the first time in Rmail. | 353 when you view the message for the first time in Rmail. |
355 To make a change in this variable take effect | 354 To make a change in this variable take effect |
357 go to that message and type \\[rmail-toggle-header] twice." | 356 go to that message and type \\[rmail-toggle-header] twice." |
358 :type 'regexp | 357 :type 'regexp |
359 :group 'rmail-headers) | 358 :group 'rmail-headers) |
360 | 359 |
361 (defcustom rmail-nonignored-headers "^x-spam-status:" | 360 (defcustom rmail-nonignored-headers "^x-spam-status:" |
362 "*Regexp to match X header fields that Rmail should show. | 361 "Regexp to match X header fields that Rmail should show. |
363 This regexp overrides `rmail-ignored-headers'; if both this regexp | 362 This regexp overrides `rmail-ignored-headers'; if both this regexp |
364 and that one match a certain header field, Rmail shows the field. | 363 and that one match a certain header field, Rmail shows the field. |
365 If this is nil, ignore all header fields in `rmail-ignored-headers'. | 364 If this is nil, ignore all header fields in `rmail-ignored-headers'. |
366 | 365 |
367 This variable is used for reformatting the message header, | 366 This variable is used for reformatting the message header, |
371 for a message that you have already viewed, | 370 for a message that you have already viewed, |
372 go to that message and type \\[rmail-toggle-header] twice." | 371 go to that message and type \\[rmail-toggle-header] twice." |
373 :type '(choice (const nil) (regexp)) | 372 :type '(choice (const nil) (regexp)) |
374 :group 'rmail-headers) | 373 :group 'rmail-headers) |
375 | 374 |
376 ;;;###autoload | |
377 (defcustom rmail-displayed-headers nil | 375 (defcustom rmail-displayed-headers nil |
378 "*Regexp to match Header fields that Rmail should display. | 376 "Regexp to match Header fields that Rmail should display. |
379 If nil, display all header fields except those matched by | 377 If nil, display all header fields except those matched by |
380 `rmail-ignored-headers'." | 378 `rmail-ignored-headers'." |
381 :type '(choice regexp (const :tag "All")) | 379 :type '(choice regexp (const :tag "All")) |
382 :group 'rmail-headers) | 380 :group 'rmail-headers) |
383 | 381 |
384 ;;;###autoload | 382 (defcustom rmail-retry-ignored-headers "^x-authentication-warning:" |
385 (defcustom rmail-retry-ignored-headers "^x-authentication-warning:" "\ | 383 "Headers that should be stripped when retrying a failed message." |
386 *Headers that should be stripped when retrying a failed message." | |
387 :type '(choice regexp (const nil :tag "None")) | 384 :type '(choice regexp (const nil :tag "None")) |
388 :group 'rmail-headers) | 385 :group 'rmail-headers) |
389 | 386 |
390 ;;;###autoload | 387 (defcustom rmail-highlighted-headers "^From:\\|^Subject:" |
391 (defcustom rmail-highlighted-headers "^From:\\|^Subject:" "\ | 388 "Regexp to match Header fields that Rmail should normally highlight. |
392 *Regexp to match Header fields that Rmail should normally highlight. | |
393 A value of nil means don't highlight." | 389 A value of nil means don't highlight." |
394 :type 'regexp | 390 :type 'regexp |
395 :group 'rmail-headers) | 391 :group 'rmail-headers) |
396 | 392 |
397 (defface rmail-highlight | 393 (defface rmail-highlight |
404 '((t (:inherit font-lock-function-name-face))) | 400 '((t (:inherit font-lock-function-name-face))) |
405 "Face to use for highlighting the header names." | 401 "Face to use for highlighting the header names." |
406 :group 'rmail-headers | 402 :group 'rmail-headers |
407 :version "23.1") | 403 :version "23.1") |
408 | 404 |
409 ;;;###autoload | 405 (defcustom rmail-delete-after-output nil |
410 (defcustom rmail-delete-after-output nil "\ | 406 "Non-nil means automatically delete a message that is copied to a file." |
411 *Non-nil means automatically delete a message that is copied to a file." | |
412 :type 'boolean | 407 :type 'boolean |
413 :group 'rmail-files) | 408 :group 'rmail-files) |
414 | 409 |
415 ;;;###autoload | 410 ;;;###autoload |
416 (defcustom rmail-primary-inbox-list nil "\ | 411 (defcustom rmail-primary-inbox-list nil |
417 *List of files which are inboxes for user's primary mail file `~/RMAIL'. | 412 "List of files which are inboxes for user's primary mail file `~/RMAIL'. |
418 nil means the default, which is (\"/usr/spool/mail/$USER\") | 413 nil means the default, which is (\"/usr/spool/mail/$USER\") |
419 \(the name varies depending on the operating system, | 414 \(the name varies depending on the operating system, |
420 and the value of the environment variable MAIL overrides it)." | 415 and the value of the environment variable MAIL overrides it)." |
421 ;; Don't use backquote here, because we don't want to need it | 416 ;; Don't use backquote here, because we don't want to need it |
422 ;; at load time. | 417 ;; at load time. |
426 (getenv "USER")))) | 421 (getenv "USER")))) |
427 'file)) | 422 'file)) |
428 :group 'rmail-retrieve | 423 :group 'rmail-retrieve |
429 :group 'rmail-files) | 424 :group 'rmail-files) |
430 | 425 |
431 ;;;###autoload | |
432 (defcustom rmail-mail-new-frame nil | 426 (defcustom rmail-mail-new-frame nil |
433 "*Non-nil means Rmail makes a new frame for composing outgoing mail. | 427 "Non-nil means Rmail makes a new frame for composing outgoing mail. |
434 This is handy if you want to preserve the window configuration of | 428 This is handy if you want to preserve the window configuration of |
435 the frame where you have the RMAIL buffer displayed." | 429 the frame where you have the RMAIL buffer displayed." |
436 :type 'boolean | 430 :type 'boolean |
437 :group 'rmail-reply) | 431 :group 'rmail-reply) |
438 | 432 |
439 ;;;###autoload | 433 ;;;###autoload |
440 (defcustom rmail-secondary-file-directory "~/" | 434 (defcustom rmail-secondary-file-directory "~/" |
441 "*Directory for additional secondary Rmail files." | 435 "Directory for additional secondary Rmail files." |
442 :type 'directory | 436 :type 'directory |
443 :group 'rmail-files) | 437 :group 'rmail-files) |
444 ;;;###autoload | 438 ;;;###autoload |
445 (defcustom rmail-secondary-file-regexp "\\.xmail$" | 439 (defcustom rmail-secondary-file-regexp "\\.xmail$" |
446 "*Regexp for which files are secondary Rmail files." | 440 "Regexp for which files are secondary Rmail files." |
447 :type 'regexp | 441 :type 'regexp |
448 :group 'rmail-files) | 442 :group 'rmail-files) |
449 | 443 |
450 ;;;###autoload | |
451 (defcustom rmail-confirm-expunge 'y-or-n-p | 444 (defcustom rmail-confirm-expunge 'y-or-n-p |
452 "*Whether and how to ask for confirmation before expunging deleted messages." | 445 "Whether and how to ask for confirmation before expunging deleted messages." |
453 :type '(choice (const :tag "No confirmation" nil) | 446 :type '(choice (const :tag "No confirmation" nil) |
454 (const :tag "Confirm with y-or-n-p" y-or-n-p) | 447 (const :tag "Confirm with y-or-n-p" y-or-n-p) |
455 (const :tag "Confirm with yes-or-no-p" yes-or-no-p)) | 448 (const :tag "Confirm with yes-or-no-p" yes-or-no-p)) |
456 :version "21.1" | 449 :version "21.1" |
457 :group 'rmail-files) | 450 :group 'rmail-files) |
458 | 451 |
459 ;;;###autoload | 452 ;;;###autoload |
460 (defvar rmail-mode-hook nil | 453 (defvar rmail-mode-hook nil |
461 "List of functions to call when Rmail is invoked.") | 454 "List of functions to call when Rmail is invoked.") |
462 | 455 |
463 ;;;###autoload | |
464 (defvar rmail-get-new-mail-hook nil | 456 (defvar rmail-get-new-mail-hook nil |
465 "List of functions to call when Rmail has retrieved new mail.") | 457 "List of functions to call when Rmail has retrieved new mail.") |
466 | 458 |
467 ;;;###autoload | 459 ;;;###autoload |
468 (defcustom rmail-show-message-hook nil | 460 (defcustom rmail-show-message-hook nil |
469 "List of functions to call when Rmail displays a message." | 461 "List of functions to call when Rmail displays a message." |
470 :type 'hook | 462 :type 'hook |
471 :options '(goto-address) | 463 :options '(goto-address) |
472 :group 'rmail) | 464 :group 'rmail) |
473 | 465 |
474 ;;;###autoload | |
475 (defvar rmail-quit-hook nil | 466 (defvar rmail-quit-hook nil |
476 "List of functions to call when quitting out of Rmail.") | 467 "List of functions to call when quitting out of Rmail.") |
477 | 468 |
478 ;;;###autoload | |
479 (defvar rmail-delete-message-hook nil | 469 (defvar rmail-delete-message-hook nil |
480 "List of functions to call when Rmail deletes a message. | 470 "List of functions to call when Rmail deletes a message. |
481 When the hooks are called, the message has been marked deleted but is | 471 When the hooks are called, the message has been marked deleted but is |
482 still the current message in the Rmail buffer.") | 472 still the current message in the Rmail buffer.") |
483 | 473 |
532 ;; because they mess up RT tags. | 522 ;; because they mess up RT tags. |
533 (defvar rmail-reply-regexp "\\`\\(Re\\(([0-9]+)\\|\\[[0-9]+\\]\\|\\^[0-9]+\\)?: *\\)*" | 523 (defvar rmail-reply-regexp "\\`\\(Re\\(([0-9]+)\\|\\[[0-9]+\\]\\|\\^[0-9]+\\)?: *\\)*" |
534 "Regexp to delete from Subject line before inserting `rmail-reply-prefix'.") | 524 "Regexp to delete from Subject line before inserting `rmail-reply-prefix'.") |
535 | 525 |
536 (defcustom rmail-display-summary nil | 526 (defcustom rmail-display-summary nil |
537 "*If non-nil, Rmail always displays the summary buffer." | 527 "If non-nil, Rmail always displays the summary buffer." |
538 :group 'rmail-summary | 528 :group 'rmail-summary |
539 :type 'boolean) | 529 :type 'boolean) |
540 | 530 |
541 (defvar rmail-inbox-list nil) | 531 (defvar rmail-inbox-list nil) |
542 (put 'rmail-inbox-list 'permanent-local t) | 532 (put 'rmail-inbox-list 'permanent-local t) |
598 | 588 |
599 (defvar rmail-last-regexp nil) | 589 (defvar rmail-last-regexp nil) |
600 (put 'rmail-last-regexp 'permanent-local t) | 590 (put 'rmail-last-regexp 'permanent-local t) |
601 | 591 |
602 (defcustom rmail-default-file "~/xmail" | 592 (defcustom rmail-default-file "~/xmail" |
603 "*Default file name for \\[rmail-output]." | 593 "Default file name for \\[rmail-output]." |
604 :type 'file | 594 :type 'file |
605 :group 'rmail-files) | 595 :group 'rmail-files) |
606 (defcustom rmail-default-body-file "~/mailout" | 596 (defcustom rmail-default-body-file "~/mailout" |
607 "*Default file name for \\[rmail-output-body-to-file]." | 597 "Default file name for \\[rmail-output-body-to-file]." |
608 :type 'file | 598 :type 'file |
609 :group 'rmail-files | 599 :group 'rmail-files |
610 :version "20.3") | 600 :version "20.3") |
611 | 601 |
612 ;; Mule and MIME related variables. | 602 ;; Mule and MIME related variables. |
615 (defvar rmail-file-coding-system nil | 605 (defvar rmail-file-coding-system nil |
616 "Coding system used in RMAIL file. | 606 "Coding system used in RMAIL file. |
617 | 607 |
618 This is set to nil by default.") | 608 This is set to nil by default.") |
619 | 609 |
620 ;;;###autoload | |
621 (defcustom rmail-enable-mime nil | 610 (defcustom rmail-enable-mime nil |
622 "*If non-nil, RMAIL uses MIME feature. | 611 "If non-nil, RMAIL uses MIME features. |
623 If the value is t, RMAIL automatically shows MIME decoded message. | 612 If the value is t, RMAIL automatically shows MIME decoded message. |
624 If the value is neither t nor nil, RMAIL does not show MIME decoded message | 613 If the value is neither t nor nil, RMAIL does not show MIME decoded message |
625 until a user explicitly requires it. | 614 until a user explicitly requires it. |
626 | 615 |
627 Even if the value is non-nil, you can't use MIME feature | 616 Even if the value is non-nil, you can't use MIME features |
628 if the feature specified by `rmail-mime-feature' is not available | 617 unless the feature specified by `rmail-mime-feature' is available." |
629 in your session." | |
630 :type '(choice (const :tag "on" t) | 618 :type '(choice (const :tag "on" t) |
631 (const :tag "off" nil) | 619 (const :tag "off" nil) |
632 (other :tag "when asked" ask)) | 620 (other :tag "when asked" ask)) |
633 :group 'rmail) | 621 :group 'rmail) |
634 | 622 |
635 (defvar rmail-enable-mime-composing nil | 623 (defvar rmail-enable-mime-composing nil |
636 "*If non-nil, RMAIL uses `rmail-insert-mime-forwarded-message-function' to forward.") | 624 "*If non-nil, RMAIL uses `rmail-insert-mime-forwarded-message-function' to forward.") |
637 | 625 |
638 ;;;###autoload | 626 ;; FIXME unused. |
639 (defvar rmail-show-mime-function nil | 627 (defvar rmail-show-mime-function nil |
640 "Function to show MIME decoded message of RMAIL file. | 628 "Function to show MIME decoded message of RMAIL file. |
641 This function is called when `rmail-enable-mime' is non-nil. | 629 This function is called when `rmail-enable-mime' is non-nil. |
642 It is called with no argument.") | 630 It is called with no argument.") |
643 | 631 |
648 `rmail-enable-mime-composing' is non-nil. | 636 `rmail-enable-mime-composing' is non-nil. |
649 It is called with one argument FORWARD-BUFFER, which is a | 637 It is called with one argument FORWARD-BUFFER, which is a |
650 buffer containing the message to forward. The current buffer | 638 buffer containing the message to forward. The current buffer |
651 is the outgoing mail buffer.") | 639 is the outgoing mail buffer.") |
652 | 640 |
653 ;;;###autoload | |
654 (defvar rmail-insert-mime-resent-message-function nil | 641 (defvar rmail-insert-mime-resent-message-function nil |
655 "Function to insert a message in MIME format so it can be resent. | 642 "Function to insert a message in MIME format so it can be resent. |
656 This function is called if `rmail-enable-mime' is non-nil. | 643 This function is called by `rmail-resend' if `rmail-enable-mime' is non-nil. |
657 It is called with one argument FORWARD-BUFFER, which is a | 644 It is called with one argument FORWARD-BUFFER, which is a |
658 buffer containing the message to forward. The current buffer | 645 buffer containing the message to forward. The current buffer |
659 is the outgoing mail buffer.") | 646 is the outgoing mail buffer.") |
660 | 647 |
661 ;;;###autoload | 648 ;; FIXME one might want to pass a LIMIT, as per |
649 ;; rmail-search-mime-header-function. | |
662 (defvar rmail-search-mime-message-function nil | 650 (defvar rmail-search-mime-message-function nil |
663 "Function to check if a regexp matches a MIME message. | 651 "Function to check if a regexp matches a MIME message. |
664 This function is called if `rmail-enable-mime' is non-nil. | 652 This function is called by `rmail-search-message' if |
665 It is called with two arguments MSG and REGEXP, where | 653 `rmail-enable-mime' is non-nil. It is called (with point at the |
654 start of the message) with two arguments MSG and REGEXP, where | |
666 MSG is the message number, REGEXP is the regular expression.") | 655 MSG is the message number, REGEXP is the regular expression.") |
667 | 656 |
668 ;;;###autoload | |
669 (defvar rmail-search-mime-header-function nil | 657 (defvar rmail-search-mime-header-function nil |
670 "Function to check if a regexp matches a header of MIME message. | 658 "Function to check if a regexp matches a header of MIME message. |
671 This function is called if `rmail-enable-mime' is non-nil. | 659 This function is called by `rmail-message-regexp-p-1' if |
672 It is called with three arguments MSG, REGEXP, and LIMIT, where | 660 `rmail-enable-mime' is non-nil. It is called (with point at the |
673 MSG is the message number, | 661 start of the header) with three arguments MSG, REGEXP, and LIMIT, |
674 REGEXP is the regular expression, | 662 where MSG is the message number, REGEXP is the regular |
675 LIMIT is the position specifying the end of header.") | 663 expression, LIMIT is the position specifying the end of header.") |
676 | 664 |
677 ;;;###autoload | |
678 (defvar rmail-mime-feature 'rmail-mime | 665 (defvar rmail-mime-feature 'rmail-mime |
679 "Feature to require to load MIME support in Rmail. | 666 "Feature to require to load MIME support in Rmail. |
680 When starting Rmail, if `rmail-enable-mime' is non-nil, | 667 When starting Rmail, if `rmail-enable-mime' is non-nil, |
681 this feature is required with `require'. | 668 this feature is required with `require'. |
682 | 669 |
683 The default value is `rmail-mime'. This feature is provided by | 670 The default value is `rmail-mime'. This feature is provided by |
684 the rmail-mime package available at <http://www.m17n.org/rmail-mime/>.") | 671 the rmail-mime package available at <http://www.m17n.org/rmail-mime/>.") |
685 | 672 |
686 ;;;###autoload | 673 ;; FIXME this is unused. |
687 (defvar rmail-decode-mime-charset t | 674 (defvar rmail-decode-mime-charset t |
688 "*Non-nil means a message is decoded by MIME's charset specification. | 675 "*Non-nil means a message is decoded by MIME's charset specification. |
689 If this variable is nil, or the message has not MIME specification, | 676 If this variable is nil, or the message has not MIME specification, |
690 the message is decoded as normal way. | 677 the message is decoded as normal way. |
691 | 678 |
692 If the variable `rmail-enable-mime' is non-nil, this variables is | 679 If the variable `rmail-enable-mime' is non-nil, this variable is |
693 ignored, and all the decoding work is done by a feature specified by | 680 ignored, and all the decoding work is done by a feature specified by |
694 the variable `rmail-mime-feature'.") | 681 the variable `rmail-mime-feature'.") |
695 | 682 |
696 ;;;###autoload | |
697 (defvar rmail-mime-charset-pattern | 683 (defvar rmail-mime-charset-pattern |
698 (concat "^content-type:[ \t]*text/plain;" | 684 (concat "^content-type:[ \t]*text/plain;" |
699 "\\(?:[ \t\n]*\\(?:format\\|delsp\\)=\"?[-a-z0-9]+\"?;\\)*" | 685 "\\(?:[ \t\n]*\\(?:format\\|delsp\\)=\"?[-a-z0-9]+\"?;\\)*" |
700 "[ \t\n]*charset=\"?\\([^ \t\n\";]+\\)\"?") | 686 "[ \t\n]*charset=\"?\\([^ \t\n\";]+\\)\"?") |
701 "Regexp to match MIME-charset specification in a header of message. | 687 "Regexp to match MIME-charset specification in a header of message. |
2056 It is put in comma-separated form. | 2042 It is put in comma-separated form. |
2057 MSG, if non-nil, identifies the message number to use. | 2043 MSG, if non-nil, identifies the message number to use. |
2058 If nil, that means the current message." | 2044 If nil, that means the current message." |
2059 (or msg (setq msg rmail-current-message)) | 2045 (or msg (setq msg rmail-current-message)) |
2060 (let (blurb attr-names keywords) | 2046 (let (blurb attr-names keywords) |
2061 ;; Combine the message attributes and keywords | 2047 ;; Combine the message attributes and keywords |
2062 ;; into a comma-separated list. | 2048 ;; into a comma-separated list. |
2063 (setq attr-names (rmail-get-attr-names msg) | 2049 (setq attr-names (rmail-get-attr-names msg) |
2064 keywords (rmail-get-keywords msg)) | 2050 keywords (rmail-get-keywords msg)) |
2065 (if (string= keywords "") | 2051 (if (string= keywords "") |
2066 (setq keywords nil)) | 2052 (setq keywords nil)) |
2151 (setq altered (/= value ?-)) | 2137 (setq altered (/= value ?-)) |
2152 (insert rmail-attribute-header ": " header-value "\n")))))) | 2138 (insert rmail-attribute-header ": " header-value "\n")))))) |
2153 (if (= msgnum rmail-current-message) | 2139 (if (= msgnum rmail-current-message) |
2154 (rmail-display-labels)))) | 2140 (rmail-display-labels)))) |
2155 ;; If we made a significant change in an attribute, | 2141 ;; If we made a significant change in an attribute, |
2156 ;; mark rmail-buffer modified, so it will be (1) saved | 2142 ;; mark rmail-buffer modified, so it will be (1) saved |
2157 ;; and (2) displayed in the mode line. | 2143 ;; and (2) displayed in the mode line. |
2158 (if altered | 2144 (if altered |
2159 (set-buffer-modified-p t))))) | 2145 (set-buffer-modified-p t))))) |
2160 | 2146 |
2161 (defun rmail-message-attr-p (msg attrs) | 2147 (defun rmail-message-attr-p (msg attrs) |
2785 "Return non-nil, if for message number MSG, regexp REGEXP matches." | 2771 "Return non-nil, if for message number MSG, regexp REGEXP matches." |
2786 ;; This is adequate because its only caller, rmail-search, | 2772 ;; This is adequate because its only caller, rmail-search, |
2787 ;; unswaps the buffers. | 2773 ;; unswaps the buffers. |
2788 (goto-char (rmail-msgbeg msg)) | 2774 (goto-char (rmail-msgbeg msg)) |
2789 (if rmail-enable-mime | 2775 (if rmail-enable-mime |
2790 (funcall rmail-search-mime-message-function msg regexp) | 2776 (if rmail-search-mime-message-function |
2777 (funcall rmail-search-mime-message-function msg regexp) | |
2778 (error "You must set `rmail-search-mime-message-function'")) | |
2791 (re-search-forward regexp (rmail-msgend msg) t))) | 2779 (re-search-forward regexp (rmail-msgend msg) t))) |
2792 | 2780 |
2793 (defvar rmail-search-last-regexp nil) | 2781 (defvar rmail-search-last-regexp nil) |
2794 (defun rmail-search (regexp &optional n) | 2782 (defun rmail-search (regexp &optional n) |
2795 "Show message containing next match for REGEXP (but not the current msg). | 2783 "Show message containing next match for REGEXP (but not the current msg). |
3426 (mailbuf rmail-buffer)) | 3414 (mailbuf rmail-buffer)) |
3427 (unwind-protect | 3415 (unwind-protect |
3428 (with-current-buffer tembuf | 3416 (with-current-buffer tembuf |
3429 ;;>> Copy message into temp buffer | 3417 ;;>> Copy message into temp buffer |
3430 (if rmail-enable-mime | 3418 (if rmail-enable-mime |
3431 (funcall rmail-insert-mime-resent-message-function mailbuf) | 3419 (if rmail-insert-mime-resent-message-function |
3420 (funcall rmail-insert-mime-resent-message-function mailbuf) | |
3421 (error "You must set `rmail-insert-mime-resent-message-function'")) | |
3432 (insert-buffer-substring mailbuf)) | 3422 (insert-buffer-substring mailbuf)) |
3433 (goto-char (point-min)) | 3423 (goto-char (point-min)) |
3434 ;; Delete any Sender field, since that's not specifiable. | 3424 ;; Delete any Sender field, since that's not specifiable. |
3435 ; Only delete Sender fields in the actual header. | 3425 ; Only delete Sender fields in the actual header. |
3436 (re-search-forward "^$" nil 'move) | 3426 (re-search-forward "^$" nil 'move) |
3630 (defun rmail-summary-displayed () | 3620 (defun rmail-summary-displayed () |
3631 "t if in RMAIL buffer and an associated summary buffer is displayed." | 3621 "t if in RMAIL buffer and an associated summary buffer is displayed." |
3632 (and rmail-summary-buffer (get-buffer-window rmail-summary-buffer))) | 3622 (and rmail-summary-buffer (get-buffer-window rmail-summary-buffer))) |
3633 | 3623 |
3634 (defcustom rmail-redisplay-summary nil | 3624 (defcustom rmail-redisplay-summary nil |
3635 "*Non-nil means Rmail should show the summary when it changes. | 3625 "Non-nil means Rmail should show the summary when it changes. |
3636 This has an effect only if a summary buffer exists." | 3626 This has an effect only if a summary buffer exists." |
3637 :type 'boolean | 3627 :type 'boolean |
3638 :group 'rmail-summary) | 3628 :group 'rmail-summary) |
3639 | 3629 |
3640 (defcustom rmail-summary-window-size nil | 3630 (defcustom rmail-summary-window-size nil |
3641 "*Non-nil means specify the height for an Rmail summary window." | 3631 "Non-nil means specify the height for an Rmail summary window." |
3642 :type '(choice (const :tag "Disabled" nil) integer) | 3632 :type '(choice (const :tag "Disabled" nil) integer) |
3643 :group 'rmail-summary) | 3633 :group 'rmail-summary) |
3644 | 3634 |
3645 ;; Put the summary buffer back on the screen, if user wants that. | 3635 ;; Put the summary buffer back on the screen, if user wants that. |
3646 (defun rmail-maybe-display-summary () | 3636 (defun rmail-maybe-display-summary () |