Mercurial > emacs
changeset 10726:596c3e2c168d
(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.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 13 Feb 1995 06:49:27 +0000 |
parents | 24958130d147 |
children | 7720faec5ca7 |
files | lisp/mail/sendmail.el |
diffstat | 1 files changed, 28 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/mail/sendmail.el Mon Feb 13 05:28:47 1995 +0000 +++ b/lisp/mail/sendmail.el Mon Feb 13 06:49:27 1995 +0000 @@ -315,6 +315,7 @@ (define-key mail-mode-map "\C-c\C-f\C-f" 'mail-fcc) (define-key mail-mode-map "\C-c\C-f\C-c" 'mail-cc) (define-key mail-mode-map "\C-c\C-f\C-s" 'mail-subject) + (define-key mail-mode-map "\C-c\C-f\C-r" 'mail-reply-to) (define-key mail-mode-map "\C-c\C-t" 'mail-text) (define-key mail-mode-map "\C-c\C-y" 'mail-yank-original) (define-key mail-mode-map "\C-c\C-q" 'mail-fill-yanked-message) @@ -347,6 +348,9 @@ (define-key mail-mode-map [menu-bar headers] (cons "Headers" (make-sparse-keymap "Headers"))) +(define-key mail-mode-map [menu-bar headers reply-to] + '("Reply-To" . mail-reply-to)) + (define-key mail-mode-map [menu-bar headers sent-via] '("Sent Via" . mail-sent-via)) @@ -615,11 +619,24 @@ (forward-char -5) (insert ?>))) (while fcc-list - (let ((buffer (get-file-buffer (car fcc-list))) - (curbuf (current-buffer)) - (beg (point-min)) (end (point-max)) - (beg2 (save-excursion (goto-char (point-min)) - (forward-line 2) (point)))) + (let* ((truename (file-truename (car fcc-list))) + (buffer + (or (get-file-buffer (car fcc-list)) + (get-file-buffer truename) + ;; Look for a buffer whose truename + ;; matches that of the file we want. + (let ((buflist (buffer-list))) + (save-excursion + (while buflist + (set-buffer (car buflist)) + (if (equal buffer-file-truename truename) + (setq buflist nil)) + (setq buflist (cdr buflist))) + (current-buffer))))) + (curbuf (current-buffer)) + (beg (point-min)) (end (point-max)) + (beg2 (save-excursion (goto-char (point-min)) + (forward-line 2) (point)))) (if buffer ;; File is present in a buffer => append to that buffer. (save-excursion @@ -739,6 +756,12 @@ (mail-position-on-field "to")) (insert "\nFCC: " folder)) +(defun mail-reply-to () + "Move point to end of Reply-To-field." + (interactive) + (expand-abbrev) + (mail-position-on-field "Reply-To")) + (defun mail-position-on-field (field &optional soft) (let (end (case-fold-search t))