branch: externals/debbugs
commit 87ee7dd7cd1c962670b680ad6b20ede921c5a7f5
Author: Maxim Cournoyer <maxim.courno...@gmail.com>
Commit: Michael Albinus <michael.albi...@gmx.de>

    Refine the debbugs-gnu-summary-keep-subject regexp
    
    This allows matching more variations of the 'git format-patch'
    prepared messages that should have their title retains in Debbugs to
    ease review.
    
    * debbugs-gnu.el (debbugs-gnu-summary-keep-subject): Refine regexp
    and add comments.
---
 debbugs-gnu.el | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/debbugs-gnu.el b/debbugs-gnu.el
index 63905b20d6..b2c22e58f9 100644
--- a/debbugs-gnu.el
+++ b/debbugs-gnu.el
@@ -1915,7 +1915,16 @@ MERGED is the list of bugs merged with this one."
     (debbugs-gnu-summary-mode 1)))
 
 (defcustom debbugs-gnu-summary-keep-subject
-  (rx "[PATCH" (? (0+ (not (any digit "/]"))) (1+ digit) "/" (1+ digit)) "]")
+  ;; This intends to match the message subject as prepared by 'git
+  ;; format-patch', including optional use of
+  ;; --subject-prefix='leading-prefix PATCH' or
+  ;; --subject-prefix='PATCH trailing-prefix' as well as
+  ;; --reroll-count=n.
+  (rx "[" (? (1+ (not space)) space)    ;leading prefix?
+      "PATCH "
+      (? (1+ (not space)) space)        ;trailing prefix?
+      (? "v" (1+ digit) space)          ;optional reroll count
+      (1+ digit) "/" (1+ digit) "]")    ;patch number
   "Regular expression which keeps the original message subject in replies."
   :version "29.1"
   :type 'regexp)

Reply via email to