/[emacs]/emacs/lisp/mail/rmail.el
ViewVC logotype

Diff of /emacs/lisp/mail/rmail.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.412 by schwab, Sun Aug 14 23:44:12 2005 UTC revision 1.413 by rms, Mon Aug 15 02:04:29 2005 UTC
# Line 254  It is useful to set this variable in the Line 254  It is useful to set this variable in the
254            "\\|^x-mailer:\\|^delivered-to:\\|^lines:"            "\\|^x-mailer:\\|^delivered-to:\\|^lines:"
255            "\\|^content-transfer-encoding:\\|^x-coding-system:"            "\\|^content-transfer-encoding:\\|^x-coding-system:"
256            "\\|^return-path:\\|^errors-to:\\|^return-receipt-to:"            "\\|^return-path:\\|^errors-to:\\|^return-receipt-to:"
           "\\|^x-sign:\\|^x-beenthere:\\|^x-mailman-version:\\|^x-mailman-copy:"  
257            "\\|^precedence:\\|^list-help:\\|^list-post:\\|^list-subscribe:"            "\\|^precedence:\\|^list-help:\\|^list-post:\\|^list-subscribe:"
258            "\\|^list-id:\\|^list-unsubscribe:\\|^list-archive:"            "\\|^list-id:\\|^list-unsubscribe:\\|^list-archive:"
259            "\\|^content-length:"            "\\|^content-length:\\|^nntp-posting-date:\\|^user-agent"
260            "\\|^x-attribution:\\|^x-disclaimer:\\|^x-trace:"            "\\|^importance:\\|^envelope-to:\\|^delivery-date\\|^openpgp:"
261            "\\|^x-complaints-to:\\|^nntp-posting-date:\\|^user-agent"            "\\|^mbox-line:\\|^cancel-lock:"
262            "\\|^importance:\\|^envelope-to:\\|^delivery-date"            "\\|^resent-face:\\|^resent-x.*:\\|^resent-organization:\\|^resent-openpgp:"
263            "\\|^x.*-priority:\\|^x-mimeole:\\|^x-archive:"  
264            "\\|^resent-face:\\|^resent-x.*:\\|^resent-organization\\|^resent-openpgp"            "\\|^x-.*:")
           "\\|^openpgp:\\|^x-request-pgp:\\|^x-original.*:"  
           "\\|^x-virus-scanned:\\|^x-spam-[^s].*:")  
265    "*Regexp to match header fields that Rmail should normally hide.    "*Regexp to match header fields that Rmail should normally hide.
266    \(See also `rmail-nonignored-headers', which overrides this regexp.)
267    This variable is used for reformatting the message header,
268    which normally happens once for each message,
269    when you view the message for the first time in Rmail.
270    To make a change in this variable take effect
271    for a message that you have already viewed,
272    go to that message and type \\[rmail-toggle-header] twice."
273      :type 'regexp
274      :group 'rmail-headers)
275    
276    (defcustom rmail-nonignored-headers "^x-spam-status:"
277      "*Regexp to match X header fields that Rmail should show.
278    This regexp overrides `rmail-ignored-headers'; if both this regexp
279    and that one match a certain header field, Rmail shows the field.
280    
281  This variable is used for reformatting the message header,  This variable is used for reformatting the message header,
282  which normally happens once for each message,  which normally happens once for each message,
283  when you view the message for the first time in Rmail.  when you view the message for the first time in Rmail.
# Line 2183  If the optional argument IGNORED-HEADERS Line 2195  If the optional argument IGNORED-HEADERS
2195  delete all header fields whose names match that regexp.  delete all header fields whose names match that regexp.
2196  Otherwise, if `rmail-displayed-headers' is non-nil,  Otherwise, if `rmail-displayed-headers' is non-nil,
2197  delete all header fields *except* those whose names match that regexp.  delete all header fields *except* those whose names match that regexp.
2198  Otherwise, delete all header fields whose names match `rmail-ignored-headers'."  Otherwise, delete all header fields whose names match `rmail-ignored-headers'
2199    unless they also match `rmail-nonignored-headers'."
2200    (when (search-forward "\n\n" nil t)    (when (search-forward "\n\n" nil t)
2201      (forward-char -1)      (forward-char -1)
2202      (let ((case-fold-search t)      (let ((case-fold-search t)
# Line 2207  Otherwise, delete all header fields whos Line 2220  Otherwise, delete all header fields whos
2220          (or ignored-headers (setq ignored-headers rmail-ignored-headers))          (or ignored-headers (setq ignored-headers rmail-ignored-headers))
2221          (save-restriction          (save-restriction
2222            (narrow-to-region (point-min) (point))            (narrow-to-region (point-min) (point))
2223              (goto-char (point-min))
2224            (while (and ignored-headers            (while (and ignored-headers
2225                        (progn                        (re-search-forward ignored-headers nil t))
                         (goto-char (point-min))  
                         (re-search-forward ignored-headers nil t)))  
2226              (beginning-of-line)              (beginning-of-line)
2227              (delete-region (point)              (if (looking-at rmail-nonignored-headers)
2228                             (if (re-search-forward "\n[^ \t]" nil t)                  (forward-line 1)
2229                                 (1- (point))                (delete-region (point)
2230                               (point-max)))))))))                               (save-excursion
2231                                   (if (re-search-forward "\n[^ \t]" nil t)
2232                                       (1- (point))
2233                                     (point-max)))))))))))
2234    
2235  (defun rmail-msg-is-pruned ()  (defun rmail-msg-is-pruned ()
2236    (rmail-maybe-set-message-counters)    (rmail-maybe-set-message-counters)
# Line 3412  use \\[mail-yank-original] to yank the o Line 3427  use \\[mail-yank-original] to yank the o
3427                                (progn (search-forward "\n*** EOOH ***\n")                                (progn (search-forward "\n*** EOOH ***\n")
3428                                       (beginning-of-line) (point)))))                                       (beginning-of-line) (point)))))
3429          (setq from (mail-fetch-field "from")          (setq from (mail-fetch-field "from")
3430                reply-to (or (if just-sender                reply-to (or (mail-fetch-field "mail-reply-to" nil t)
                                (mail-fetch-field "mail-reply-to" nil t)  
                              (mail-fetch-field "mail-followup-to" nil t))  
3431                             (mail-fetch-field "reply-to" nil t)                             (mail-fetch-field "reply-to" nil t)
3432                             from)                             from)
               cc (and (not just-sender)  
                       ;; mail-followup-to, if given, overrides cc.  
                       (not (mail-fetch-field "mail-followup-to" nil t))  
                       (mail-fetch-field "cc" nil t))  
3433                subject (mail-fetch-field "subject")                subject (mail-fetch-field "subject")
3434                date (mail-fetch-field "date")                date (mail-fetch-field "date")
               to (or (mail-fetch-field "to" nil t) "")  
3435                message-id (mail-fetch-field "message-id")                message-id (mail-fetch-field "message-id")
3436                references (mail-fetch-field "references" nil nil t)                references (mail-fetch-field "references" nil nil t)
3437                resent-reply-to (mail-fetch-field "resent-reply-to" nil t)                resent-reply-to (mail-fetch-field "resent-reply-to" nil t)
# Line 3433  use \\[mail-yank-original] to yank the o Line 3441  use \\[mail-yank-original] to yank the o
3441  ;;;           resent-subject (mail-fetch-field "resent-subject")  ;;;           resent-subject (mail-fetch-field "resent-subject")
3442  ;;;           resent-date (mail-fetch-field "resent-date")  ;;;           resent-date (mail-fetch-field "resent-date")
3443  ;;;           resent-message-id (mail-fetch-field "resent-message-id")  ;;;           resent-message-id (mail-fetch-field "resent-message-id")
3444                )))                )
3445            (unless just-sender
3446              (if (mail-fetch-field "mail-followup-to" nil t)
3447                  ;; If this header field is present, use it instead of the To and CC fields.
3448                  (setq to (mail-fetch-field "mail-followup-to" nil t))
3449                (setq cc (or (mail-fetch-field "cc" nil t) "")
3450                      to (or (mail-fetch-field "to" nil t) ""))))
3451    
3452            ))
3453    
3454      ;; Merge the resent-to and resent-cc into the to and cc.      ;; Merge the resent-to and resent-cc into the to and cc.
3455      (if (and resent-to (not (equal resent-to "")))      (if (and resent-to (not (equal resent-to "")))
3456          (if (not (equal to ""))          (if (not (equal to ""))

Legend:
Removed from v.1.412  
changed lines
  Added in v.1.413

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26