aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorKarl Heuer1996-02-20 19:21:45 +0000
committerKarl Heuer1996-02-20 19:21:45 +0000
commita915dc6d70636947f168d634495a1a84f28fdc6b (patch)
treec5fa6bb421684c8c3216a25e22ebae9896cf3d5b /lisp
parent0353f9e14423d7e9f6c3ec7d835def4fb38860c5 (diff)
downloademacs-a915dc6d70636947f168d634495a1a84f28fdc6b.tar.gz
emacs-a915dc6d70636947f168d634495a1a84f28fdc6b.zip
(gnus-inews-insert-headers): Check whether Sender
and From are equal before inserting a Sender header.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/gnus-msg.el12
1 files changed, 7 insertions, 5 deletions
diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el
index 2e182e6a97d..6756b9e1c52 100644
--- a/lisp/gnus-msg.el
+++ b/lisp/gnus-msg.el
@@ -1136,17 +1136,19 @@ Headers in `gnus-required-headers' will be generated."
1136 ;; Insert new Sender if the From is strange. 1136 ;; Insert new Sender if the From is strange.
1137 (let ((from (mail-fetch-field "from")) 1137 (let ((from (mail-fetch-field "from"))
1138 (sender (mail-fetch-field "sender"))) 1138 (sender (mail-fetch-field "sender")))
1139 (if (and from 1139 (if (and from
1140 (not (string= 1140 (not (string=
1141 (downcase (car (gnus-extract-address-components from))) 1141 (downcase
1142 (car (cdr (gnus-extract-address-components from))))
1142 (downcase (gnus-inews-real-user-address)))) 1143 (downcase (gnus-inews-real-user-address))))
1143 (or (null sender) 1144 (or (null sender)
1144 (not 1145 (not
1145 (string= 1146 (string=
1146 (downcase (car (gnus-extract-address-components sender))) 1147 (downcase
1148 (car (cdr (gnus-extract-address-components sender))))
1147 (downcase (gnus-inews-real-user-address)))))) 1149 (downcase (gnus-inews-real-user-address))))))
1148 (progn 1150 (progn
1149 (goto-char (point-min)) 1151 (goto-char (point-min))
1150 (and (re-search-forward "^Sender:" nil t) 1152 (and (re-search-forward "^Sender:" nil t)
1151 (progn 1153 (progn
1152 (beginning-of-line) 1154 (beginning-of-line)