]> git.eshelyaron.com Git - emacs.git/commitdiff
(rmail-simplified-subject): Normalize whitespace in subject. This
authorEli Zaretskii <eliz@gnu.org>
Wed, 8 Apr 2009 12:43:40 +0000 (12:43 +0000)
committerEli Zaretskii <eliz@gnu.org>
Wed, 8 Apr 2009 12:43:40 +0000 (12:43 +0000)
resurrects a feature, lost in transition to mbox, whereby Subject is
matched even if it's broken into several lines at arbitrary places.

lisp/ChangeLog
lisp/mail/rmail.el

index 9459d03a8f6ef54c50417026431e88238a56b2f9..d4cdf2257c8a69eec25167e8999a891264ae045c 100644 (file)
@@ -1,3 +1,10 @@
+2009-04-08  Eli Zaretskii  <eliz@gnu.org>
+
+       * mail/rmail.el (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.
+
 2009-04-08  Nick Roberts  <nickrob@snap.net.nz>
 
        * progmodes/gdb-ui.el: Give hint for GDB in Emacs on Mac OSX.
index dec4c07d6e74305e10af06390beca31537873143..a950f903f708c762e51115b063e0bbde5439ce60 100644 (file)
@@ -3046,6 +3046,10 @@ and typical reply prefixes such as Re:."
        (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 ()