diff options
| author | Richard M. Stallman | 1995-02-13 06:49:27 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-02-13 06:49:27 +0000 |
| commit | 3a3ffba4fc6ad1a5196985aa86453e21d927c162 (patch) | |
| tree | 1687472578f7634be207503e00505724ec54e6f0 | |
| parent | 39bcc759ed57df6b500f24fe82643564989294ae (diff) | |
| download | emacs-3a3ffba4fc6ad1a5196985aa86453e21d927c162.tar.gz emacs-3a3ffba4fc6ad1a5196985aa86453e21d927c162.zip | |
(mail-reply-to): New command, on C-c C-f C-r and in menu.
(mail-do-fcc): Find buffer to add to
using truename, if can't find it by real name.
| -rw-r--r-- | lisp/mail/sendmail.el | 33 |
1 files changed, 28 insertions, 5 deletions
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index 1c98a9c9083..f20da2b44fa 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el | |||
| @@ -315,6 +315,7 @@ C-c C-v mail-sent-via (add a sent-via field for each To or CC)." | |||
| 315 | (define-key mail-mode-map "\C-c\C-f\C-f" 'mail-fcc) | 315 | (define-key mail-mode-map "\C-c\C-f\C-f" 'mail-fcc) |
| 316 | (define-key mail-mode-map "\C-c\C-f\C-c" 'mail-cc) | 316 | (define-key mail-mode-map "\C-c\C-f\C-c" 'mail-cc) |
| 317 | (define-key mail-mode-map "\C-c\C-f\C-s" 'mail-subject) | 317 | (define-key mail-mode-map "\C-c\C-f\C-s" 'mail-subject) |
| 318 | (define-key mail-mode-map "\C-c\C-f\C-r" 'mail-reply-to) | ||
| 318 | (define-key mail-mode-map "\C-c\C-t" 'mail-text) | 319 | (define-key mail-mode-map "\C-c\C-t" 'mail-text) |
| 319 | (define-key mail-mode-map "\C-c\C-y" 'mail-yank-original) | 320 | (define-key mail-mode-map "\C-c\C-y" 'mail-yank-original) |
| 320 | (define-key mail-mode-map "\C-c\C-q" 'mail-fill-yanked-message) | 321 | (define-key mail-mode-map "\C-c\C-q" 'mail-fill-yanked-message) |
| @@ -347,6 +348,9 @@ C-c C-v mail-sent-via (add a sent-via field for each To or CC)." | |||
| 347 | (define-key mail-mode-map [menu-bar headers] | 348 | (define-key mail-mode-map [menu-bar headers] |
| 348 | (cons "Headers" (make-sparse-keymap "Headers"))) | 349 | (cons "Headers" (make-sparse-keymap "Headers"))) |
| 349 | 350 | ||
| 351 | (define-key mail-mode-map [menu-bar headers reply-to] | ||
| 352 | '("Reply-To" . mail-reply-to)) | ||
| 353 | |||
| 350 | (define-key mail-mode-map [menu-bar headers sent-via] | 354 | (define-key mail-mode-map [menu-bar headers sent-via] |
| 351 | '("Sent Via" . mail-sent-via)) | 355 | '("Sent Via" . mail-sent-via)) |
| 352 | 356 | ||
| @@ -615,11 +619,24 @@ the user from the mailer." | |||
| 615 | (forward-char -5) | 619 | (forward-char -5) |
| 616 | (insert ?>))) | 620 | (insert ?>))) |
| 617 | (while fcc-list | 621 | (while fcc-list |
| 618 | (let ((buffer (get-file-buffer (car fcc-list))) | 622 | (let* ((truename (file-truename (car fcc-list))) |
| 619 | (curbuf (current-buffer)) | 623 | (buffer |
| 620 | (beg (point-min)) (end (point-max)) | 624 | (or (get-file-buffer (car fcc-list)) |
| 621 | (beg2 (save-excursion (goto-char (point-min)) | 625 | (get-file-buffer truename) |
| 622 | (forward-line 2) (point)))) | 626 | ;; Look for a buffer whose truename |
| 627 | ;; matches that of the file we want. | ||
| 628 | (let ((buflist (buffer-list))) | ||
| 629 | (save-excursion | ||
| 630 | (while buflist | ||
| 631 | (set-buffer (car buflist)) | ||
| 632 | (if (equal buffer-file-truename truename) | ||
| 633 | (setq buflist nil)) | ||
| 634 | (setq buflist (cdr buflist))) | ||
| 635 | (current-buffer))))) | ||
| 636 | (curbuf (current-buffer)) | ||
| 637 | (beg (point-min)) (end (point-max)) | ||
| 638 | (beg2 (save-excursion (goto-char (point-min)) | ||
| 639 | (forward-line 2) (point)))) | ||
| 623 | (if buffer | 640 | (if buffer |
| 624 | ;; File is present in a buffer => append to that buffer. | 641 | ;; File is present in a buffer => append to that buffer. |
| 625 | (save-excursion | 642 | (save-excursion |
| @@ -739,6 +756,12 @@ the user from the mailer." | |||
| 739 | (mail-position-on-field "to")) | 756 | (mail-position-on-field "to")) |
| 740 | (insert "\nFCC: " folder)) | 757 | (insert "\nFCC: " folder)) |
| 741 | 758 | ||
| 759 | (defun mail-reply-to () | ||
| 760 | "Move point to end of Reply-To-field." | ||
| 761 | (interactive) | ||
| 762 | (expand-abbrev) | ||
| 763 | (mail-position-on-field "Reply-To")) | ||
| 764 | |||
| 742 | (defun mail-position-on-field (field &optional soft) | 765 | (defun mail-position-on-field (field &optional soft) |
| 743 | (let (end | 766 | (let (end |
| 744 | (case-fold-search t)) | 767 | (case-fold-search t)) |