emacs-diffs
[Top][All Lists]
Advanced

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

emacs-27 876b95b: Teach Rmail about NBSP in "Re:"


From: Eli Zaretskii
Subject: emacs-27 876b95b: Teach Rmail about NBSP in "Re:"
Date: Sat, 13 Mar 2021 04:23:26 -0500 (EST)

branch: emacs-27
commit 876b95bf90653fe61ad0b9e2d17924832422e8bb
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    Teach Rmail about NBSP in "Re:"
    
    * lisp/mail/rmail.el (rmail-simplified-subject)
    (rmail-reply-regexp): Allow NBSP in "RE:" prefixes.
---
 lisp/mail/rmail.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index 628e876..86154f2 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -582,7 +582,7 @@ Examples:
 ;; This pattern should catch all the common variants.
 ;; rms: I deleted the change to delete tags in square brackets
 ;; because they mess up RT tags.
-(defvar rmail-reply-regexp 
"\\`\\(Re\\(([0-9]+)\\|\\[[0-9]+\\]\\|\\^[0-9]+\\)?: *\\)*"
+(defvar rmail-reply-regexp 
"\\`\\(Re\\(([0-9]+)\\|\\[[0-9]+\\]\\|\\^[0-9]+\\)?\u00a0*: *\\)*"
   "Regexp to delete from Subject line before inserting `rmail-reply-prefix'.")
 
 (defcustom rmail-display-summary nil
@@ -3398,7 +3398,8 @@ whitespace, replacing whitespace runs with a single space 
and
 removing prefixes such as Re:, Fwd: and so on and mailing list
 tags such as [tag]."
   (let ((subject (or (rmail-get-header "Subject" msgnum) ""))
-       (regexp "\\`[ \t\n]*\\(\\(\\w\\{1,3\\}:\\|\\[[^]]+]\\)[ \t\n]+\\)*"))
+       (regexp
+         "\\`[ \t\n]*\\(\\(\\w\\{1,3\\}\u00a0*:\\|\\[[^]]+]\\)[ \t\n]+\\)*"))
     (setq subject (rfc2047-decode-string subject))
     (setq subject (replace-regexp-in-string regexp "" subject))
     (replace-regexp-in-string "[ \t\n]+" " " subject)))



reply via email to

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