diff options
| author | Glenn Morris | 2010-12-13 21:01:08 -0800 |
|---|---|---|
| committer | Glenn Morris | 2010-12-13 21:01:08 -0800 |
| commit | e758216c60d9c7f6040378829ed26b8794f66e34 (patch) | |
| tree | 36c86fa57e6c83b26eb0383326d7b9fc2d32465e /lisp | |
| parent | 38e9aa5346cd332b6d969a8ecb180cb290740379 (diff) | |
| download | emacs-e758216c60d9c7f6040378829ed26b8794f66e34.tar.gz emacs-e758216c60d9c7f6040378829ed26b8794f66e34.zip | |
Misc sendmail.el.
* lisp/mail/sendmail.el: Don't require rmail or mailalias when compiling.
Require mail-utils.
(mail-alias-file): Don't autoload. Doc fix.
(mail-bury-selects-summary, mail-send-nonascii): Don't autoload.
(mail-mailer-swallows-blank-line): Default to nil. Doc fix.
Mark as obsolete, and risky.
(mail-setup): Simplify.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 8 | ||||
| -rw-r--r-- | lisp/mail/sendmail.el | 55 |
2 files changed, 28 insertions, 35 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 778d47c4b04..9642b36acee 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,13 @@ | |||
| 1 | 2010-12-14 Glenn Morris <rgm@gnu.org> | 1 | 2010-12-14 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * mail/sendmail.el: Don't require rmail or mailalias when compiling. | ||
| 4 | Require mail-utils. | ||
| 5 | (mail-alias-file): Don't autoload. Doc fix. | ||
| 6 | (mail-bury-selects-summary, mail-send-nonascii): Don't autoload. | ||
| 7 | (mail-mailer-swallows-blank-line): Default to nil. Doc fix. | ||
| 8 | Mark as obsolete, and risky. | ||
| 9 | (mail-setup): Simplify. | ||
| 10 | |||
| 3 | * mail/mailalias.el (build-mail-aliases): Make it interactive. | 11 | * mail/mailalias.el (build-mail-aliases): Make it interactive. |
| 4 | * mail/sendmail.el (build-mail-aliases): Update autoload. | 12 | * mail/sendmail.el (build-mail-aliases): Update autoload. |
| 5 | 13 | ||
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index 5c0176cea0d..ca91d9512ee 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el | |||
| @@ -28,11 +28,7 @@ | |||
| 28 | ;; documented in the Emacs user's manual. | 28 | ;; documented in the Emacs user's manual. |
| 29 | 29 | ||
| 30 | ;;; Code: | 30 | ;;; Code: |
| 31 | (eval-when-compile | 31 | (require 'mail-utils) |
| 32 | ;; Necessary to avoid recursive `require's. | ||
| 33 | (provide 'sendmail) | ||
| 34 | (require 'rmail) | ||
| 35 | (require 'mailalias)) | ||
| 36 | 32 | ||
| 37 | (autoload 'rfc2047-encode-string "rfc2047") | 33 | (autoload 'rfc2047-encode-string "rfc2047") |
| 38 | 34 | ||
| @@ -203,13 +199,14 @@ when you first send mail." | |||
| 203 | :type '(choice (const nil) string) | 199 | :type '(choice (const nil) string) |
| 204 | :group 'sendmail) | 200 | :group 'sendmail) |
| 205 | 201 | ||
| 206 | ;;;###autoload | ||
| 207 | (defcustom mail-alias-file nil | 202 | (defcustom mail-alias-file nil |
| 208 | "If non-nil, the name of a file to use instead of `/usr/lib/aliases'. | 203 | "If non-nil, the name of a file to use instead of the sendmail default. |
| 209 | This file defines aliases to be expanded by the mailer; this is a different | 204 | This file defines aliases to be expanded by the mailer; this is a different |
| 210 | feature from that of defining aliases in `.mailrc' to be expanded in Emacs. | 205 | feature from that of defining aliases in `.mailrc' to be expanded in Emacs. |
| 211 | This variable has no effect unless your system uses sendmail as its mailer." | 206 | This variable has no effect unless your system uses sendmail as its mailer. |
| 212 | :type '(choice (const nil) file) | 207 | The default file is defined in sendmail's configuration file, e.g. |
| 208 | `/etc/aliases'." | ||
| 209 | :type '(choice (const :tag "Sendmail default" nil) file) | ||
| 213 | :group 'sendmail) | 210 | :group 'sendmail) |
| 214 | 211 | ||
| 215 | ;;;###autoload | 212 | ;;;###autoload |
| @@ -433,8 +430,6 @@ before you edit the message, so you can edit or delete the lines." | |||
| 433 | :type '(choice (const nil) string) | 430 | :type '(choice (const nil) string) |
| 434 | :group 'sendmail) | 431 | :group 'sendmail) |
| 435 | 432 | ||
| 436 | ;; FIXME no need for autoload | ||
| 437 | ;;;###autoload | ||
| 438 | (defcustom mail-bury-selects-summary t | 433 | (defcustom mail-bury-selects-summary t |
| 439 | "If non-nil, try to show Rmail summary buffer after returning from mail. | 434 | "If non-nil, try to show Rmail summary buffer after returning from mail. |
| 440 | The functions \\[mail-send-on-exit] or \\[mail-dont-send] select | 435 | The functions \\[mail-send-on-exit] or \\[mail-dont-send] select |
| @@ -443,8 +438,6 @@ is non-nil." | |||
| 443 | :type 'boolean | 438 | :type 'boolean |
| 444 | :group 'sendmail) | 439 | :group 'sendmail) |
| 445 | 440 | ||
| 446 | ;; FIXME no need for autoload | ||
| 447 | ;;;###autoload | ||
| 448 | (defcustom mail-send-nonascii 'mime | 441 | (defcustom mail-send-nonascii 'mime |
| 449 | "Specify whether to allow sending non-ASCII characters in mail. | 442 | "Specify whether to allow sending non-ASCII characters in mail. |
| 450 | If t, that means do allow it. nil means don't allow it. | 443 | If t, that means do allow it. nil means don't allow it. |
| @@ -468,23 +461,16 @@ support Delivery Status Notification." | |||
| 468 | 461 | ||
| 469 | ;; Note: could use /usr/ucb/mail instead of sendmail; | 462 | ;; Note: could use /usr/ucb/mail instead of sendmail; |
| 470 | ;; options -t, and -v if not interactive. | 463 | ;; options -t, and -v if not interactive. |
| 471 | (defvar mail-mailer-swallows-blank-line | 464 | (defvar mail-mailer-swallows-blank-line nil |
| 472 | (if (and (string-match "sparc-sun-sunos\\(\\'\\|[^5]\\)" system-configuration) | ||
| 473 | (file-readable-p "/etc/sendmail.cf") | ||
| 474 | (with-temp-buffer | ||
| 475 | (insert-file-contents "/etc/sendmail.cf") | ||
| 476 | (goto-char (point-min)) | ||
| 477 | (let ((case-fold-search nil)) | ||
| 478 | (re-search-forward "^OR\\>" nil t)))) | ||
| 479 | ;; According to RFC822, "The field-name must be composed of printable | ||
| 480 | ;; ASCII characters (i.e. characters that have decimal values between | ||
| 481 | ;; 33 and 126, except colon)", i.e. any chars except ctl chars, | ||
| 482 | ;; space, or colon. | ||
| 483 | '(looking-at "[ \t]\\|[][!\"#$%&'()*+,-./0-9;<=>?@A-Z\\\\^_`a-z{|}~]+:")) | ||
| 484 | "Set this non-nil if the system's mailer runs the header and body together. | 465 | "Set this non-nil if the system's mailer runs the header and body together. |
| 485 | \(This problem exists on Sunos 4 when sendmail is run in remote mode.) | 466 | The actual value should be an expression to evaluate that returns |
| 486 | The value should be an expression to test whether the problem will | 467 | non-nil if the problem will actually occur. |
| 487 | actually occur.") | 468 | \(As far as we know, this is not an issue on any system still supported |
| 469 | by Emacs.)") | ||
| 470 | |||
| 471 | (put 'mail-mailer-swallows-blank-line 'risky-local-variable t) ; gets evalled | ||
| 472 | (make-obsolete-variable 'mail-mailer-swallows-blank-line | ||
| 473 | "no need to set this on any modern system." "24.1") | ||
| 488 | 474 | ||
| 489 | (defvar mail-mode-syntax-table | 475 | (defvar mail-mode-syntax-table |
| 490 | ;; define-derived-mode will make it inherit from text-mode-syntax-table. | 476 | ;; define-derived-mode will make it inherit from text-mode-syntax-table. |
| @@ -539,12 +525,11 @@ actually occur.") | |||
| 539 | (or mail-default-reply-to | 525 | (or mail-default-reply-to |
| 540 | (setq mail-default-reply-to (getenv "REPLYTO"))) | 526 | (setq mail-default-reply-to (getenv "REPLYTO"))) |
| 541 | (sendmail-sync-aliases) | 527 | (sendmail-sync-aliases) |
| 542 | (if (eq mail-aliases t) | 528 | (when (eq mail-aliases t) |
| 543 | (progn | 529 | (setq mail-aliases nil) |
| 544 | (setq mail-aliases nil) | 530 | (and mail-personal-alias-file |
| 545 | (when mail-personal-alias-file | 531 | (file-exists-p mail-personal-alias-file) |
| 546 | (if (file-exists-p mail-personal-alias-file) | 532 | (build-mail-aliases))) |
| 547 | (build-mail-aliases))))) | ||
| 548 | ;; Don't leave this around from a previous message. | 533 | ;; Don't leave this around from a previous message. |
| 549 | (kill-local-variable 'buffer-file-coding-system) | 534 | (kill-local-variable 'buffer-file-coding-system) |
| 550 | ;; This doesn't work for enable-multibyte-characters. | 535 | ;; This doesn't work for enable-multibyte-characters. |