]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/mail/sendmail.el (mail-citation-prefix-regexp): Fix bug#24081
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 17 Dec 2024 22:07:45 +0000 (17:07 -0500)
committerEshel Yaron <me@eshelyaron.com>
Mon, 23 Dec 2024 15:12:23 +0000 (16:12 +0100)
(cherry picked from commit 22806c65f4f8d68547d33997d017039763b4bf6a)

lisp/mail/sendmail.el

index cf641cfb652187b4eb5e39afca0c15f777cda074..b0f7baa4cae7f1568f66c6b6e361079d47a1239f 100644 (file)
@@ -258,7 +258,9 @@ regardless of what part of it (if any) is included in the cited text.")
 
 ;;;###autoload
 (defcustom mail-citation-prefix-regexp
-  (purecopy "\\([ \t]*\\(\\w\\|[_.]\\)+>+\\|[ \t]*[>|]\\)+")
+  ;; Use [[:word:]] rather than \w so we don't get tripped up if one
+  ;; of those chars has a weird `syntax-table' text property.
+  (purecopy "\\([ \t]*\\([[:word:]]\\|[_.]\\)+>+\\|[ \t]*[>|]\\)+")
   "Regular expression to match a citation prefix plus whitespace.
 It should match whatever sort of citation prefixes you want to handle,
 with whitespace before and after; it should also match just whitespace.