diff options
| author | Eli Zaretskii | 2021-03-13 11:22:01 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2021-03-13 11:22:01 +0200 |
| commit | 876b95bf90653fe61ad0b9e2d17924832422e8bb (patch) | |
| tree | b140ebd94072d6d32ee7a0bfe4d71b605c025f8b | |
| parent | a2960025e8e029bcccf22143e183b9e1e9965dd6 (diff) | |
| download | emacs-876b95bf90653fe61ad0b9e2d17924832422e8bb.tar.gz emacs-876b95bf90653fe61ad0b9e2d17924832422e8bb.zip | |
Teach Rmail about NBSP in "Re:"
* lisp/mail/rmail.el (rmail-simplified-subject)
(rmail-reply-regexp): Allow NBSP in "RE:" prefixes.
| -rw-r--r-- | lisp/mail/rmail.el | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 628e8762387..86154f2a61f 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el | |||
| @@ -582,7 +582,7 @@ Examples: | |||
| 582 | ;; This pattern should catch all the common variants. | 582 | ;; This pattern should catch all the common variants. |
| 583 | ;; rms: I deleted the change to delete tags in square brackets | 583 | ;; rms: I deleted the change to delete tags in square brackets |
| 584 | ;; because they mess up RT tags. | 584 | ;; because they mess up RT tags. |
| 585 | (defvar rmail-reply-regexp "\\`\\(Re\\(([0-9]+)\\|\\[[0-9]+\\]\\|\\^[0-9]+\\)?: *\\)*" | 585 | (defvar rmail-reply-regexp "\\`\\(Re\\(([0-9]+)\\|\\[[0-9]+\\]\\|\\^[0-9]+\\)?\u00a0*: *\\)*" |
| 586 | "Regexp to delete from Subject line before inserting `rmail-reply-prefix'.") | 586 | "Regexp to delete from Subject line before inserting `rmail-reply-prefix'.") |
| 587 | 587 | ||
| 588 | (defcustom rmail-display-summary nil | 588 | (defcustom rmail-display-summary nil |
| @@ -3398,7 +3398,8 @@ whitespace, replacing whitespace runs with a single space and | |||
| 3398 | removing prefixes such as Re:, Fwd: and so on and mailing list | 3398 | removing prefixes such as Re:, Fwd: and so on and mailing list |
| 3399 | tags such as [tag]." | 3399 | tags such as [tag]." |
| 3400 | (let ((subject (or (rmail-get-header "Subject" msgnum) "")) | 3400 | (let ((subject (or (rmail-get-header "Subject" msgnum) "")) |
| 3401 | (regexp "\\`[ \t\n]*\\(\\(\\w\\{1,3\\}:\\|\\[[^]]+]\\)[ \t\n]+\\)*")) | 3401 | (regexp |
| 3402 | "\\`[ \t\n]*\\(\\(\\w\\{1,3\\}\u00a0*:\\|\\[[^]]+]\\)[ \t\n]+\\)*")) | ||
| 3402 | (setq subject (rfc2047-decode-string subject)) | 3403 | (setq subject (rfc2047-decode-string subject)) |
| 3403 | (setq subject (replace-regexp-in-string regexp "" subject)) | 3404 | (setq subject (replace-regexp-in-string regexp "" subject)) |
| 3404 | (replace-regexp-in-string "[ \t\n]+" " " subject))) | 3405 | (replace-regexp-in-string "[ \t\n]+" " " subject))) |