emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/mail/rmail.el


From: Richard M . Stallman
Subject: [Emacs-diffs] Changes to emacs/lisp/mail/rmail.el
Date: Sun, 14 Aug 2005 22:04:29 -0400

Index: emacs/lisp/mail/rmail.el
diff -c emacs/lisp/mail/rmail.el:1.412 emacs/lisp/mail/rmail.el:1.413
*** emacs/lisp/mail/rmail.el:1.412      Sun Aug 14 23:44:12 2005
--- emacs/lisp/mail/rmail.el    Mon Aug 15 02:04:29 2005
***************
*** 254,271 ****
          "\\|^x-mailer:\\|^delivered-to:\\|^lines:"
          "\\|^content-transfer-encoding:\\|^x-coding-system:"
          "\\|^return-path:\\|^errors-to:\\|^return-receipt-to:"
-         "\\|^x-sign:\\|^x-beenthere:\\|^x-mailman-version:\\|^x-mailman-copy:"
          "\\|^precedence:\\|^list-help:\\|^list-post:\\|^list-subscribe:"
          "\\|^list-id:\\|^list-unsubscribe:\\|^list-archive:"
!         "\\|^content-length:"
!         "\\|^x-attribution:\\|^x-disclaimer:\\|^x-trace:"
!         "\\|^x-complaints-to:\\|^nntp-posting-date:\\|^user-agent"
!         "\\|^importance:\\|^envelope-to:\\|^delivery-date"
!         "\\|^x.*-priority:\\|^x-mimeole:\\|^x-archive:"
!         
"\\|^resent-face:\\|^resent-x.*:\\|^resent-organization\\|^resent-openpgp"
!         "\\|^openpgp:\\|^x-request-pgp:\\|^x-original.*:"
!         "\\|^x-virus-scanned:\\|^x-spam-[^s].*:")
    "*Regexp to match header fields that Rmail should normally hide.
  This variable is used for reformatting the message header,
  which normally happens once for each message,
  when you view the message for the first time in Rmail.
--- 254,283 ----
          "\\|^x-mailer:\\|^delivered-to:\\|^lines:"
          "\\|^content-transfer-encoding:\\|^x-coding-system:"
          "\\|^return-path:\\|^errors-to:\\|^return-receipt-to:"
          "\\|^precedence:\\|^list-help:\\|^list-post:\\|^list-subscribe:"
          "\\|^list-id:\\|^list-unsubscribe:\\|^list-archive:"
!         "\\|^content-length:\\|^nntp-posting-date:\\|^user-agent"
!         "\\|^importance:\\|^envelope-to:\\|^delivery-date\\|^openpgp:"
!         "\\|^mbox-line:\\|^cancel-lock:"
!         
"\\|^resent-face:\\|^resent-x.*:\\|^resent-organization:\\|^resent-openpgp:"
! 
!         "\\|^x-.*:")
    "*Regexp to match header fields that Rmail should normally hide.
+ \(See also `rmail-nonignored-headers', which overrides this regexp.)
+ This variable is used for reformatting the message header,
+ which normally happens once for each message,
+ when you view the message for the first time in Rmail.
+ To make a change in this variable take effect
+ for a message that you have already viewed,
+ go to that message and type \\[rmail-toggle-header] twice."
+   :type 'regexp
+   :group 'rmail-headers)
+ 
+ (defcustom rmail-nonignored-headers "^x-spam-status:"
+   "*Regexp to match X header fields that Rmail should show.
+ This regexp overrides `rmail-ignored-headers'; if both this regexp
+ and that one match a certain header field, Rmail shows the field.
+ 
  This variable is used for reformatting the message header,
  which normally happens once for each message,
  when you view the message for the first time in Rmail.
***************
*** 2183,2189 ****
  delete all header fields whose names match that regexp.
  Otherwise, if `rmail-displayed-headers' is non-nil,
  delete all header fields *except* those whose names match that regexp.
! Otherwise, delete all header fields whose names match 
`rmail-ignored-headers'."
    (when (search-forward "\n\n" nil t)
      (forward-char -1)
      (let ((case-fold-search t)
--- 2195,2202 ----
  delete all header fields whose names match that regexp.
  Otherwise, if `rmail-displayed-headers' is non-nil,
  delete all header fields *except* those whose names match that regexp.
! Otherwise, delete all header fields whose names match `rmail-ignored-headers'
! unless they also match `rmail-nonignored-headers'."
    (when (search-forward "\n\n" nil t)
      (forward-char -1)
      (let ((case-fold-search t)
***************
*** 2207,2221 ****
        (or ignored-headers (setq ignored-headers rmail-ignored-headers))
        (save-restriction
          (narrow-to-region (point-min) (point))
          (while (and ignored-headers
!                     (progn
!                       (goto-char (point-min))
!                       (re-search-forward ignored-headers nil t)))
            (beginning-of-line)
!           (delete-region (point)
!                          (if (re-search-forward "\n[^ \t]" nil t)
!                              (1- (point))
!                            (point-max)))))))))
  
  (defun rmail-msg-is-pruned ()
    (rmail-maybe-set-message-counters)
--- 2220,2236 ----
        (or ignored-headers (setq ignored-headers rmail-ignored-headers))
        (save-restriction
          (narrow-to-region (point-min) (point))
+         (goto-char (point-min))
          (while (and ignored-headers
!                     (re-search-forward ignored-headers nil t))
            (beginning-of-line)
!           (if (looking-at rmail-nonignored-headers)
!               (forward-line 1)
!             (delete-region (point)
!                            (save-excursion
!                              (if (re-search-forward "\n[^ \t]" nil t)
!                                  (1- (point))
!                                (point-max)))))))))))
  
  (defun rmail-msg-is-pruned ()
    (rmail-maybe-set-message-counters)
***************
*** 3412,3429 ****
                              (progn (search-forward "\n*** EOOH ***\n")
                                     (beginning-of-line) (point)))))
        (setq from (mail-fetch-field "from")
!             reply-to (or (if just-sender
!                              (mail-fetch-field "mail-reply-to" nil t)
!                            (mail-fetch-field "mail-followup-to" nil t))
                           (mail-fetch-field "reply-to" nil t)
                           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))
              subject (mail-fetch-field "subject")
              date (mail-fetch-field "date")
-             to (or (mail-fetch-field "to" nil t) "")
              message-id (mail-fetch-field "message-id")
              references (mail-fetch-field "references" nil nil t)
              resent-reply-to (mail-fetch-field "resent-reply-to" nil t)
--- 3427,3437 ----
                              (progn (search-forward "\n*** EOOH ***\n")
                                     (beginning-of-line) (point)))))
        (setq from (mail-fetch-field "from")
!             reply-to (or (mail-fetch-field "mail-reply-to" nil t)
                           (mail-fetch-field "reply-to" nil t)
                           from)
              subject (mail-fetch-field "subject")
              date (mail-fetch-field "date")
              message-id (mail-fetch-field "message-id")
              references (mail-fetch-field "references" nil nil t)
              resent-reply-to (mail-fetch-field "resent-reply-to" nil t)
***************
*** 3433,3439 ****
  ;;;         resent-subject (mail-fetch-field "resent-subject")
  ;;;         resent-date (mail-fetch-field "resent-date")
  ;;;         resent-message-id (mail-fetch-field "resent-message-id")
!             )))
      ;; Merge the resent-to and resent-cc into the to and cc.
      (if (and resent-to (not (equal resent-to "")))
        (if (not (equal to ""))
--- 3441,3456 ----
  ;;;         resent-subject (mail-fetch-field "resent-subject")
  ;;;         resent-date (mail-fetch-field "resent-date")
  ;;;         resent-message-id (mail-fetch-field "resent-message-id")
!             )
!       (unless just-sender
!         (if (mail-fetch-field "mail-followup-to" nil t)
!             ;; If this header field is present, use it instead of the To and 
CC fields.
!             (setq to (mail-fetch-field "mail-followup-to" nil t))
!           (setq cc (or (mail-fetch-field "cc" nil t) "")
!                 to (or (mail-fetch-field "to" nil t) ""))))
! 
!       ))
! 
      ;; Merge the resent-to and resent-cc into the to and cc.
      (if (and resent-to (not (equal resent-to "")))
        (if (not (equal to ""))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]