227 |
|
|
228 |
;;;###autoload |
;;;###autoload |
229 |
(defcustom rmail-mail-new-frame nil |
(defcustom rmail-mail-new-frame nil |
230 |
"*Non-nil means Rmail makes a new frame for composing outgoing mail." |
"*Non-nil means Rmail makes a new frame for composing outgoing mail. |
231 |
|
This is handy if you want to preserve the window configuration of |
232 |
|
the frame where you have the RMAIL buffer displayed." |
233 |
:type 'boolean |
:type 'boolean |
234 |
:group 'rmail-reply) |
:group 'rmail-reply) |
235 |
|
|
1139 |
(make-local-variable 'kill-buffer-hook) |
(make-local-variable 'kill-buffer-hook) |
1140 |
(add-hook 'kill-buffer-hook 'rmail-mode-kill-summary) |
(add-hook 'kill-buffer-hook 'rmail-mode-kill-summary) |
1141 |
(make-local-variable 'file-precious-flag) |
(make-local-variable 'file-precious-flag) |
1142 |
(setq file-precious-flag t)) |
(setq file-precious-flag t) |
1143 |
|
(make-local-variable 'desktop-save-buffer) |
1144 |
|
(setq desktop-save-buffer t)) |
1145 |
|
|
1146 |
;; Handle M-x revert-buffer done in an rmail-mode buffer. |
;; Handle M-x revert-buffer done in an rmail-mode buffer. |
1147 |
(defun rmail-revert (arg noconfirm) |
(defun rmail-revert (arg noconfirm) |
1670 |
(defun rmail-decode-region (from to coding) |
(defun rmail-decode-region (from to coding) |
1671 |
(if (or (not coding) (not (coding-system-p coding))) |
(if (or (not coding) (not (coding-system-p coding))) |
1672 |
(setq coding 'undecided)) |
(setq coding 'undecided)) |
1673 |
(decode-coding-region from to coding)) |
;; Use -dos decoding, to remove ^M characters left from base64 or |
1674 |
|
;; rogue qp-encoded text. |
1675 |
|
(decode-coding-region from to |
1676 |
|
(coding-system-change-eol-conversion coding 1)) |
1677 |
|
;; Don't reveal the fact we used -dos decoding, as users generally |
1678 |
|
;; will not expect the RMAIL buffer to use DOS EOL format. |
1679 |
|
(setq buffer-file-coding-system |
1680 |
|
(setq last-coding-system-used |
1681 |
|
(coding-system-change-eol-conversion coding 0)))) |
1682 |
|
|
1683 |
;; the rmail-break-forwarded-messages feature is not implemented |
;; the rmail-break-forwarded-messages feature is not implemented |
1684 |
(defun rmail-convert-to-babyl-format () |
(defun rmail-convert-to-babyl-format () |
1763 |
(error nil)) |
(error nil)) |
1764 |
;; Change "base64" to "8bit", to reflect the |
;; Change "base64" to "8bit", to reflect the |
1765 |
;; decoding we just did. |
;; decoding we just did. |
|
(goto-char (1+ header-end)) |
|
|
(while (search-forward "\r\n" (point-max) t) |
|
|
(replace-match "\n")) |
|
1766 |
(goto-char base64-header-field-end) |
(goto-char base64-header-field-end) |
1767 |
(delete-region (point) (search-backward ":")) |
(delete-region (point) (search-backward ":")) |
1768 |
(insert ": 8bit")))) |
(insert ": 8bit")))) |
1910 |
(point))) |
(point))) |
1911 |
t) |
t) |
1912 |
(error nil)) |
(error nil)) |
|
(goto-char header-end) |
|
|
(while (search-forward "\r\n" (point-max) t) |
|
|
(replace-match "\n")) |
|
1913 |
;; Change "base64" to "8bit", to reflect the |
;; Change "base64" to "8bit", to reflect the |
1914 |
;; decoding we just did. |
;; decoding we just did. |
1915 |
(goto-char base64-header-field-end) |
(goto-char base64-header-field-end) |
3173 |
(compose-mail to subject others |
(compose-mail to subject others |
3174 |
noerase nil |
noerase nil |
3175 |
yank-action sendactions) |
yank-action sendactions) |
3176 |
(if (and (display-multi-frame-p) rmail-mail-new-frame) |
(if rmail-mail-new-frame |
3177 |
(prog1 |
(prog1 |
3178 |
(compose-mail to subject others |
(compose-mail to subject others |
3179 |
noerase 'switch-to-buffer-other-frame |
noerase 'switch-to-buffer-other-frame |
3873 |
(setq i (1+ i))) |
(setq i (1+ i))) |
3874 |
(concat string-vector))) |
(concat string-vector))) |
3875 |
|
|
3876 |
|
;;;; Desktop support |
3877 |
|
|
3878 |
|
;;;###autoload |
3879 |
|
(defun rmail-restore-desktop-buffer (desktop-buffer-file-name |
3880 |
|
desktop-buffer-name |
3881 |
|
desktop-buffer-misc) |
3882 |
|
"Restore an rmail buffer specified in a desktop file." |
3883 |
|
(condition-case error |
3884 |
|
(progn |
3885 |
|
(rmail-input desktop-buffer-file-name) |
3886 |
|
(if (eq major-mode 'rmail-mode) |
3887 |
|
(current-buffer) |
3888 |
|
rmail-buffer)) |
3889 |
|
(file-locked |
3890 |
|
(kill-buffer (current-buffer)) |
3891 |
|
nil))) |
3892 |
|
|
3893 |
(provide 'rmail) |
(provide 'rmail) |
3894 |
|
|
3895 |
;;; arch-tag: cff0a950-57fe-4f73-a86e-91ff75afd06c |
;;; arch-tag: cff0a950-57fe-4f73-a86e-91ff75afd06c |