emacs-diffs
[Top][All Lists]
Advanced

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

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


From: Eli Zaretskii
Subject: [Emacs-diffs] emacs/lisp/mail rmail.el
Date: Wed, 08 Apr 2009 12:41:48 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Eli Zaretskii <eliz>    09/04/08 12:41:48

Modified files:
        lisp/mail      : rmail.el 

Log message:
        (rmail-simplified-subject): Normalize whitespace in subject.  This
        resurrects a feature, lost in transition to mbox, whereby Subject is
        matched even if it's broken into several lines at arbitrary places.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/mail/rmail.el?cvsroot=emacs&r1=1.531&r2=1.532

Patches:
Index: rmail.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/mail/rmail.el,v
retrieving revision 1.531
retrieving revision 1.532
diff -u -b -r1.531 -r1.532
--- rmail.el    7 Apr 2009 03:01:12 -0000       1.531
+++ rmail.el    8 Apr 2009 12:41:48 -0000       1.532
@@ -3046,6 +3046,10 @@
        (setq subject (substring subject (match-end 0))))
     (if (string-match "[ \t]+\\'" subject)
        (setq subject (substring subject 0 (match-beginning 0))))
+    ;; If Subject is long, mailers will break it into several lines at
+    ;; arbitrary places, so normalize whitespace by replacing every
+    ;; run of whitespace characters with a single space.
+    (setq subject (replace-regexp-in-string "[ \t\n]+" " " subject))
     subject))
 
 (defun rmail-simplified-subject-regexp ()




reply via email to

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