diff options
| author | Eli Zaretskii | 2011-09-03 13:00:13 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2011-09-03 13:00:13 +0300 |
| commit | fd59d131bb4fe60fe008156795c243ec6e1127b0 (patch) | |
| tree | 9b65f930481355c5bc8fc289fa2e91eda5744d56 | |
| parent | b911cc52c93288b12c04cc5ad658a7ce01fe4991 (diff) | |
| download | emacs-fd59d131bb4fe60fe008156795c243ec6e1127b0.tar.gz emacs-fd59d131bb4fe60fe008156795c243ec6e1127b0.zip | |
Fix rmail-forward.
| -rw-r--r-- | lisp/gnus/message.el | 3 | ||||
| -rw-r--r-- | lisp/mail/rmail.el | 19 | ||||
| -rw-r--r-- | lisp/mail/rmailmm.el | 4 | ||||
| -rw-r--r-- | lisp/mail/sendmail.el | 9 | ||||
| -rw-r--r-- | lisp/simple.el | 5 |
5 files changed, 32 insertions, 8 deletions
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 52cef1925a2..70bca776de1 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el | |||
| @@ -6530,7 +6530,8 @@ are not included." | |||
| 6530 | (message-position-point) | 6530 | (message-position-point) |
| 6531 | ;; Allow correct handling of `message-checksum' in `message-yank-original': | 6531 | ;; Allow correct handling of `message-checksum' in `message-yank-original': |
| 6532 | (set-buffer-modified-p nil) | 6532 | (set-buffer-modified-p nil) |
| 6533 | (undo-boundary)) | 6533 | (undo-boundary) |
| 6534 | t) | ||
| 6534 | 6535 | ||
| 6535 | (defun message-set-auto-save-file-name () | 6536 | (defun message-set-auto-save-file-name () |
| 6536 | "Associate the message buffer with a file in the drafts directory." | 6537 | "Associate the message buffer with a file in the drafts directory." |
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 9b4bbf91823..a5a6a4985ef 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el | |||
| @@ -91,6 +91,7 @@ its character representation and its display representation.") | |||
| 91 | (defvar messages-head) | 91 | (defvar messages-head) |
| 92 | (defvar total-messages) | 92 | (defvar total-messages) |
| 93 | (defvar tool-bar-map) | 93 | (defvar tool-bar-map) |
| 94 | (defvar mail-encode-mml) | ||
| 94 | 95 | ||
| 95 | (defvar rmail-header-style 'normal | 96 | (defvar rmail-header-style 'normal |
| 96 | "The current header display style choice, one of | 97 | "The current header display style choice, one of |
| @@ -642,7 +643,7 @@ unless the feature specified by `rmail-mime-feature' is available." | |||
| 642 | :version "23.3" | 643 | :version "23.3" |
| 643 | :group 'rmail) | 644 | :group 'rmail) |
| 644 | 645 | ||
| 645 | (defvar rmail-enable-mime-composing nil | 646 | (defvar rmail-enable-mime-composing t |
| 646 | "*If non-nil, RMAIL uses `rmail-insert-mime-forwarded-message-function' to forward.") | 647 | "*If non-nil, RMAIL uses `rmail-insert-mime-forwarded-message-function' to forward.") |
| 647 | 648 | ||
| 648 | ;; FIXME unused. | 649 | ;; FIXME unused. |
| @@ -3794,9 +3795,17 @@ see the documentation of `rmail-resend'." | |||
| 3794 | ;; Insert after header separator--before signature if any. | 3795 | ;; Insert after header separator--before signature if any. |
| 3795 | (rfc822-goto-eoh) | 3796 | (rfc822-goto-eoh) |
| 3796 | (forward-line 1) | 3797 | (forward-line 1) |
| 3797 | (if (or rmail-enable-mime rmail-enable-mime-composing) | 3798 | (if (and rmail-enable-mime rmail-enable-mime-composing) |
| 3798 | (funcall rmail-insert-mime-forwarded-message-function | 3799 | (prog1 |
| 3799 | forward-buffer) | 3800 | (funcall rmail-insert-mime-forwarded-message-function |
| 3801 | forward-buffer) | ||
| 3802 | ;; rmail-insert-mime-forwarded-message-function | ||
| 3803 | ;; works by inserting MML tags into forward-buffer. | ||
| 3804 | ;; The MUA will need to convert it to MIME before | ||
| 3805 | ;; sending. mail-encode-mml tells them to do that. | ||
| 3806 | ;; message.el does that automagically. | ||
| 3807 | (or (eq mail-user-agent 'message-user-agent) | ||
| 3808 | (setq mail-encode-mml t))) | ||
| 3800 | (insert "------- Start of forwarded message -------\n") | 3809 | (insert "------- Start of forwarded message -------\n") |
| 3801 | ;; Quote lines with `- ' if they start with `-'. | 3810 | ;; Quote lines with `- ' if they start with `-'. |
| 3802 | (let ((beg (point)) end) | 3811 | (let ((beg (point)) end) |
| @@ -4507,7 +4516,7 @@ With prefix argument N moves forward N messages with these labels. | |||
| 4507 | 4516 | ||
| 4508 | ;;;*** | 4517 | ;;;*** |
| 4509 | 4518 | ||
| 4510 | ;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" "a7d3e7205efa4e20ca9038c9b260ce83") | 4519 | ;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" "2c8675d7c069c68bc36a4003b15448d1") |
| 4511 | ;;; Generated autoloads from rmailmm.el | 4520 | ;;; Generated autoloads from rmailmm.el |
| 4512 | 4521 | ||
| 4513 | (autoload 'rmail-mime "rmailmm" "\ | 4522 | (autoload 'rmail-mime "rmailmm" "\ |
diff --git a/lisp/mail/rmailmm.el b/lisp/mail/rmailmm.el index 597068562b5..d3351255583 100644 --- a/lisp/mail/rmailmm.el +++ b/lisp/mail/rmailmm.el | |||
| @@ -426,7 +426,7 @@ The value is a vector [ INDEX HEADER TAGLINE BODY END], where | |||
| 426 | "Insert a tag line for MIME-entity ENTITY. | 426 | "Insert a tag line for MIME-entity ENTITY. |
| 427 | ITEM-LIST is a list of strings or button-elements (list) to be added | 427 | ITEM-LIST is a list of strings or button-elements (list) to be added |
| 428 | to the tag line." | 428 | to the tag line." |
| 429 | (insert "[") | 429 | (insert "\n[") |
| 430 | (let ((tag (aref (rmail-mime-entity-tagline entity) 0))) | 430 | (let ((tag (aref (rmail-mime-entity-tagline entity) 0))) |
| 431 | (if (> (length tag) 0) (insert (substring tag 1) ":"))) | 431 | (if (> (length tag) 0) (insert (substring tag 1) ":"))) |
| 432 | (insert (car (rmail-mime-entity-type entity)) " ") | 432 | (insert (car (rmail-mime-entity-type entity)) " ") |
| @@ -439,7 +439,7 @@ to the tag line." | |||
| 439 | (if (stringp item) | 439 | (if (stringp item) |
| 440 | (insert item) | 440 | (insert item) |
| 441 | (apply 'insert-button item)))) | 441 | (apply 'insert-button item)))) |
| 442 | (insert "]\n")) | 442 | (insert "]\n\n")) |
| 443 | 443 | ||
| 444 | (defun rmail-mime-update-tagline (entity) | 444 | (defun rmail-mime-update-tagline (entity) |
| 445 | "Update the current tag line for MIME-entity ENTITY." | 445 | "Update the current tag line for MIME-entity ENTITY." |
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index 158435de86b..c460cec77c1 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el | |||
| @@ -31,6 +31,9 @@ | |||
| 31 | 31 | ||
| 32 | (require 'rfc2047) | 32 | (require 'rfc2047) |
| 33 | 33 | ||
| 34 | (autoload 'mml-to-mime "mml" | ||
| 35 | "Translate the current buffer from MML to MIME.") | ||
| 36 | |||
| 34 | (defgroup sendmail nil | 37 | (defgroup sendmail nil |
| 35 | "Mail sending commands for Emacs." | 38 | "Mail sending commands for Emacs." |
| 36 | :prefix "mail-" | 39 | :prefix "mail-" |
| @@ -678,6 +681,7 @@ switching to, the `*mail*' buffer. See also `mail-setup-hook'." | |||
| 678 | :options '(footnote-mode)) | 681 | :options '(footnote-mode)) |
| 679 | 682 | ||
| 680 | (defvar mail-mode-abbrev-table text-mode-abbrev-table) | 683 | (defvar mail-mode-abbrev-table text-mode-abbrev-table) |
| 684 | (defvar mail-encode-mml) | ||
| 681 | ;;;###autoload | 685 | ;;;###autoload |
| 682 | (define-derived-mode mail-mode text-mode "Mail" | 686 | (define-derived-mode mail-mode text-mode "Mail" |
| 683 | "Major mode for editing mail to be sent. | 687 | "Major mode for editing mail to be sent. |
| @@ -701,6 +705,8 @@ Turning on Mail mode runs the normal hooks `text-mode-hook' and | |||
| 701 | (make-local-variable 'mail-reply-action) | 705 | (make-local-variable 'mail-reply-action) |
| 702 | (make-local-variable 'mail-send-actions) | 706 | (make-local-variable 'mail-send-actions) |
| 703 | (make-local-variable 'mail-return-action) | 707 | (make-local-variable 'mail-return-action) |
| 708 | (make-local-variable 'mail-encode-mml) | ||
| 709 | (setq mail-encode-mml nil) | ||
| 704 | (setq buffer-offer-save t) | 710 | (setq buffer-offer-save t) |
| 705 | (make-local-variable 'font-lock-defaults) | 711 | (make-local-variable 'font-lock-defaults) |
| 706 | (setq font-lock-defaults '(mail-font-lock-keywords t t)) | 712 | (setq font-lock-defaults '(mail-font-lock-keywords t t)) |
| @@ -934,6 +940,9 @@ the user from the mailer." | |||
| 934 | (error "Invalid header line (maybe a continuation line lacks initial whitespace)")) | 940 | (error "Invalid header line (maybe a continuation line lacks initial whitespace)")) |
| 935 | (forward-line 1))) | 941 | (forward-line 1))) |
| 936 | (goto-char opoint) | 942 | (goto-char opoint) |
| 943 | (when mail-encode-mml | ||
| 944 | (mml-to-mime) | ||
| 945 | (setq mail-encode-mml nil)) | ||
| 937 | (run-hooks 'mail-send-hook) | 946 | (run-hooks 'mail-send-hook) |
| 938 | (message "Sending...") | 947 | (message "Sending...") |
| 939 | (funcall send-mail-function) | 948 | (funcall send-mail-function) |
diff --git a/lisp/simple.el b/lisp/simple.el index fe46e36fdac..499ffc1acb9 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -5727,6 +5727,11 @@ else the end of the last line. This function obeys RFC822." | |||
| 5727 | "^\\([:\n]\\|[^: \t\n]+[ \t\n]\\)" nil 'move) | 5727 | "^\\([:\n]\\|[^: \t\n]+[ \t\n]\\)" nil 'move) |
| 5728 | (goto-char (match-beginning 0)))) | 5728 | (goto-char (match-beginning 0)))) |
| 5729 | 5729 | ||
| 5730 | ;; Used by Rmail (e.g., rmail-forward). | ||
| 5731 | (defvar mail-encode-mml nil | ||
| 5732 | "If non-nil, mail-user-agent's `sendfunc' command should mml-encode | ||
| 5733 | the outgoing message before sending it.") | ||
| 5734 | |||
| 5730 | (defun compose-mail (&optional to subject other-headers continue | 5735 | (defun compose-mail (&optional to subject other-headers continue |
| 5731 | switch-function yank-action send-actions | 5736 | switch-function yank-action send-actions |
| 5732 | return-action) | 5737 | return-action) |