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 /lisp/mail | |
| 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.
Diffstat (limited to 'lisp/mail')
| -rw-r--r-- | lisp/mail/rmail.el | 4 |
1 files changed, 4 insertions, 0 deletions
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 () |