Commit 41b9a988 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(mh-forward): Get new subject line from the original,

not from the draft to forward.
parent 74a28ee2
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
;;; Change Log: ;;; Change Log:
;; $Id: mh-comp.el,v 1.13 1998/06/24 09:16:26 schwab Exp kwzh $ ;; $Id: mh-comp.el,v 1.14 1999/03/01 03:47:07 kwzh Exp rms $
;;; Code: ;;; Code:
...@@ -307,23 +307,27 @@ See also documentation for `\\[mh-send]' function." ...@@ -307,23 +307,27 @@ See also documentation for `\\[mh-send]' function."
(mh-insert-fields "To:" to "Cc:" cc) (mh-insert-fields "To:" to "Cc:" cc)
(save-buffer))) (save-buffer)))
(t (t
(mh-read-draft "" draft-name nil))))) (mh-read-draft "" draft-name nil))))
(fwd-msg-file (mh-msg-filename (if (numberp msg-or-seq)
msg-or-seq
(car (mh-seq-to-msgs msg-or-seq)))
folder)))
(let (orig-from (let (orig-from
orig-subject) orig-subject)
(goto-char (point-min)) (save-excursion
(re-search-forward "^------- Forwarded Message") (set-buffer (get-buffer-create mh-temp-buffer))
(forward-line 1) (erase-buffer)
(skip-chars-forward " \t\n") (insert-file-contents fwd-msg-file)
(save-restriction
(narrow-to-region (point) (point-max))
(setq orig-from (mh-get-header-field "From:")) (setq orig-from (mh-get-header-field "From:"))
(setq orig-subject (mh-get-header-field "Subject:"))) (setq orig-subject (mh-get-header-field "Subject:")))
(let ((forw-subject (let ((forw-subject
(mh-forwarded-letter-subject orig-from orig-subject))) (mh-forwarded-letter-subject orig-from orig-subject)))
(mh-insert-fields "Subject:" forw-subject) (mh-insert-fields "Subject:" forw-subject)
(goto-char (point-min)) (goto-char (point-min))
(re-search-forward "^------- Forwarded Message") (if (re-search-forward "^------- Forwarded Message" nil t)
(forward-line -1) (forward-line -1)
(re-search-forward "^--------")
(forward-line 1))
(delete-other-windows) (delete-other-windows)
(if (numberp msg-or-seq) (if (numberp msg-or-seq)
(mh-add-msgs-to-seq msg-or-seq 'forwarded t) (mh-add-msgs-to-seq msg-or-seq 'forwarded 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