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: Eli Zaretskii
Subject: [Emacs-diffs] Changes to emacs/lisp/mail/rmail.el
Date: Sat, 02 Feb 2002 11:58:34 -0500

Index: emacs/lisp/mail/rmail.el
diff -c emacs/lisp/mail/rmail.el:1.352 emacs/lisp/mail/rmail.el:1.353
*** emacs/lisp/mail/rmail.el:1.352      Fri Jan 11 16:23:40 2002
--- emacs/lisp/mail/rmail.el    Sat Feb  2 11:29:06 2002
***************
*** 2454,2496 ****
      (or (eq major-mode 'rmail-mode)
        (switch-to-buffer rmail-buffer))
      (save-excursion
!       (unwind-protect
!         (let ((msgbeg (rmail-msgbeg rmail-current-message))
!               (msgend (rmail-msgend rmail-current-message))
!               x-coding-header)
!           (narrow-to-region msgbeg msgend)
!           (goto-char (point-min))
!           (when (search-forward "\n*** EOOH ***\n" (point-max) t)
!             (narrow-to-region msgbeg (point)))
!           (goto-char (point-min))
!           (if (re-search-forward "^X-Coding-System: *\\(.*\\)$" nil t)
!               (let ((old-coding (intern (match-string 1)))
!                     (buffer-read-only nil))
!                 (check-coding-system old-coding)
!                 ;; Make sure the new coding system uses the same EOL
!                 ;; conversion, to prevent ^M characters from popping
!                 ;; up all over the place.
!                 (setq coding
!                       (coding-system-change-eol-conversion
!                        coding
!                        (coding-system-eol-type old-coding)))
!                 (setq x-coding-header (point-marker))
!                 (narrow-to-region msgbeg msgend)
!                 (encode-coding-region (point) msgend old-coding)
!                 (decode-coding-region (point) msgend coding)
!                 (setq last-coding-system-used coding)
!                 ;; Rewrite the coding-system header according
!                 ;; to what we did.
!                 (goto-char x-coding-header)
!                 (delete-region (point)
!                                (save-excursion
!                                  (beginning-of-line)
!                                  (point)))
!                 (insert "X-Coding-System: "
!                         (symbol-name last-coding-system-used))
!                 (set-marker x-coding-header nil)
!                 (rmail-show-message))
!             (error "No X-Coding-System header found")))))))
  
  ;; Find all occurrences of certain fields, and highlight them.
  (defun rmail-highlight-headers ()
--- 2454,2504 ----
      (or (eq major-mode 'rmail-mode)
        (switch-to-buffer rmail-buffer))
      (save-excursion
!       (let ((pruned (rmail-msg-is-pruned)))
!       (unwind-protect
!           (let ((msgbeg (rmail-msgbeg rmail-current-message))
!                 (msgend (rmail-msgend rmail-current-message))
!                 x-coding-header)
!             ;; We need the message headers pruned (we later restore
!             ;; the pruned stat to what it was, see the end of
!             ;; unwind-protect form).
!             (or pruned
!                 (rmail-toggle-header 1))
!             (narrow-to-region msgbeg msgend)
!             (goto-char (point-min))
!             (when (search-forward "\n*** EOOH ***\n" (point-max) t)
!               (narrow-to-region msgbeg (point)))
!             (goto-char (point-min))
!             (if (re-search-forward "^X-Coding-System: *\\(.*\\)$" nil t)
!                 (let ((old-coding (intern (match-string 1)))
!                       (buffer-read-only nil))
!                   (check-coding-system old-coding)
!                   ;; Make sure the new coding system uses the same EOL
!                   ;; conversion, to prevent ^M characters from popping
!                   ;; up all over the place.
!                   (setq coding
!                         (coding-system-change-eol-conversion
!                          coding
!                          (coding-system-eol-type old-coding)))
!                   (setq x-coding-header (point-marker))
!                   (narrow-to-region msgbeg msgend)
!                   (encode-coding-region (point) msgend old-coding)
!                   (decode-coding-region (point) msgend coding)
!                   (setq last-coding-system-used coding)
!                   ;; Rewrite the coding-system header according
!                   ;; to what we did.
!                   (goto-char x-coding-header)
!                   (delete-region (point)
!                                  (save-excursion
!                                    (beginning-of-line)
!                                    (point)))
!                   (insert "X-Coding-System: "
!                           (symbol-name last-coding-system-used))
!                   (set-marker x-coding-header nil)
!                   (rmail-show-message))
!               (error "No X-Coding-System header found")))
!         (or pruned
!             (rmail-toggle-header 0)))))))
  
  ;; Find all occurrences of certain fields, and highlight them.
  (defun rmail-highlight-headers ()



reply via email to

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