Commit 3a3ffba4 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(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.
parent 39bcc759
......@@ -315,6 +315,7 @@ C-c C-v mail-sent-via (add a sent-via field for each To or CC)."
(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 @@ C-c C-v mail-sent-via (add a sent-via field for each To or CC)."
(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 @@ the user from the mailer."
(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 @@ the user from the mailer."
(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))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment