]> git.eshelyaron.com Git - emacs.git/commitdiff
Teach Rmail about NBSP in "Re:"
authorEli Zaretskii <eliz@gnu.org>
Sat, 13 Mar 2021 09:22:01 +0000 (11:22 +0200)
committerEli Zaretskii <eliz@gnu.org>
Sat, 13 Mar 2021 09:22:01 +0000 (11:22 +0200)
* lisp/mail/rmail.el (rmail-simplified-subject)
(rmail-reply-regexp): Allow NBSP in "RE:" prefixes.

lisp/mail/rmail.el

index 628e876238766fde27be40b581411d26d3efbfc8..86154f2a61fb00e96d6b804d080915e0b95a8b85 100644 (file)
@@ -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)))