diff options
| author | Eli Zaretskii | 2009-04-08 12:43:40 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2009-04-08 12:43:40 +0000 |
| commit | 92655f6c693ecc1502f25f88dee94e4eb7f05cbf (patch) | |
| tree | c4d1feaba6345c380964acfbacfe9f4d2435b29f | |
| parent | 7f4b360b320d8646ec33c02a215acbfbf6a1f75b (diff) | |
| download | emacs-92655f6c693ecc1502f25f88dee94e4eb7f05cbf.tar.gz emacs-92655f6c693ecc1502f25f88dee94e4eb7f05cbf.zip | |
(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.
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/mail/rmail.el | 4 |
2 files changed, 11 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9459d03a8f6..d4cdf2257c8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2009-04-08 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * mail/rmail.el (rmail-simplified-subject): Normalize whitespace | ||
| 4 | in subject. This resurrects a feature, lost in transition to | ||
| 5 | mbox, whereby Subject is matched even if it's broken into several | ||
| 6 | lines at arbitrary places. | ||
| 7 | |||
| 1 | 2009-04-08 Nick Roberts <nickrob@snap.net.nz> | 8 | 2009-04-08 Nick Roberts <nickrob@snap.net.nz> |
| 2 | 9 | ||
| 3 | * progmodes/gdb-ui.el: Give hint for GDB in Emacs on Mac OSX. | 10 | * progmodes/gdb-ui.el: Give hint for GDB in Emacs on Mac OSX. |
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index dec4c07d6e7..a950f903f70 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el | |||
| @@ -3046,6 +3046,10 @@ and typical reply prefixes such as Re:." | |||
| 3046 | (setq subject (substring subject (match-end 0)))) | 3046 | (setq subject (substring subject (match-end 0)))) |
| 3047 | (if (string-match "[ \t]+\\'" subject) | 3047 | (if (string-match "[ \t]+\\'" subject) |
| 3048 | (setq subject (substring subject 0 (match-beginning 0)))) | 3048 | (setq subject (substring subject 0 (match-beginning 0)))) |
| 3049 | ;; If Subject is long, mailers will break it into several lines at | ||
| 3050 | ;; arbitrary places, so normalize whitespace by replacing every | ||
| 3051 | ;; run of whitespace characters with a single space. | ||
| 3052 | (setq subject (replace-regexp-in-string "[ \t\n]+" " " subject)) | ||
| 3049 | subject)) | 3053 | subject)) |
| 3050 | 3054 | ||
| 3051 | (defun rmail-simplified-subject-regexp () | 3055 | (defun rmail-simplified-subject-regexp () |