diff options
| author | Kenichi Handa | 1998-08-24 01:46:43 +0000 |
|---|---|---|
| committer | Kenichi Handa | 1998-08-24 01:46:43 +0000 |
| commit | da241b5c3c830632c3e83426ffcd9ad9dfe2b01e (patch) | |
| tree | 9bbd720584d3c2ea64032b086d19c2740954b2aa | |
| parent | 469a3717cc97dfea5d3239137f838cfdde06489c (diff) | |
| download | emacs-da241b5c3c830632c3e83426ffcd9ad9dfe2b01e.tar.gz emacs-da241b5c3c830632c3e83426ffcd9ad9dfe2b01e.zip | |
(sendmail-coding-system): Doc-string modified.
(default-sendmail-coding-system): New variable.
(sendmail-send-it): Encode the message by a coding system
select-message-coding-system returns.
| -rw-r--r-- | lisp/mail/sendmail.el | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index 31b0a06cd3e..c5ebe297914 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el | |||
| @@ -712,7 +712,22 @@ the user from the mailer." | |||
| 712 | 712 | ||
| 713 | ;;;###autoload | 713 | ;;;###autoload |
| 714 | (defvar sendmail-coding-system nil | 714 | (defvar sendmail-coding-system nil |
| 715 | "Coding system to encode the outgoing mail.") | 715 | "*Coding system for encoding the outgoing mail. |
| 716 | This has higher priority than `defualt-buffer-file-coding-system' | ||
| 717 | and `default-sendmail-coding-system', | ||
| 718 | but lower priority than the local value of `buffer-file-coding-system'. | ||
| 719 | See also the function `select-sendmail-coding-system'.") | ||
| 720 | |||
| 721 | ;;;###autoload | ||
| 722 | (defvar default-sendmail-coding-system 'iso-latin-1 | ||
| 723 | "Default coding system for encodihng the outgoing mail. | ||
| 724 | This variable is used only when `sendmail-coding-system' is nil. | ||
| 725 | |||
| 726 | This variable is set/changed by the command set-language-environment. | ||
| 727 | User should not set this variable manually, | ||
| 728 | instead use sendmail-coding-system to get a constant encoding | ||
| 729 | of outgoing mails regardless of the current language environment. | ||
| 730 | See also the function `select-sendmail-coding-system'.") | ||
| 716 | 731 | ||
| 717 | (defun sendmail-send-it () | 732 | (defun sendmail-send-it () |
| 718 | (require 'mail-utils) | 733 | (require 'mail-utils) |
| @@ -724,17 +739,7 @@ the user from the mailer." | |||
| 724 | resend-to-addresses | 739 | resend-to-addresses |
| 725 | delimline | 740 | delimline |
| 726 | fcc-was-found | 741 | fcc-was-found |
| 727 | (mailbuf (current-buffer)) | 742 | (mailbuf (current-buffer))) |
| 728 | (sendmail-coding-system | ||
| 729 | (if (local-variable-p 'buffer-file-coding-system) | ||
| 730 | buffer-file-coding-system | ||
| 731 | (or sendmail-coding-system | ||
| 732 | default-buffer-file-coding-system | ||
| 733 | 'iso-latin-1)))) | ||
| 734 | (if (fboundp select-safe-coding-system-function) | ||
| 735 | (setq sendmail-coding-system | ||
| 736 | (funcall select-safe-coding-system-function | ||
| 737 | (point-min) (point-max) sendmail-coding-system))) | ||
| 738 | (unwind-protect | 743 | (unwind-protect |
| 739 | (save-excursion | 744 | (save-excursion |
| 740 | (set-buffer tembuf) | 745 | (set-buffer tembuf) |
| @@ -877,7 +882,7 @@ the user from the mailer." | |||
| 877 | \\|^resent-cc:\\|^resent-bcc:" | 882 | \\|^resent-cc:\\|^resent-bcc:" |
| 878 | delimline t)) | 883 | delimline t)) |
| 879 | (let ((default-directory "/") | 884 | (let ((default-directory "/") |
| 880 | (coding-system-for-write sendmail-coding-system)) | 885 | (coding-system-for-write (select-message-coding-system))) |
| 881 | (apply 'call-process-region | 886 | (apply 'call-process-region |
| 882 | (append (list (point-min) (point-max) | 887 | (append (list (point-min) (point-max) |
| 883 | (if (boundp 'sendmail-program) | 888 | (if (boundp 'sendmail-program) |