X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=emacs%2Fnotmuch-wash.el;h=31fda61f96428d136233367d883a6a71a0cf4580;hp=00ac45b676508a597e3d10e0435761e4461e14b7;hb=dfb1b8eb89e814f4bf6f6e62b700c72aa1b4659a;hpb=caaa10876046096320f4e69053542eabe17e7e55 diff --git a/emacs/notmuch-wash.el b/emacs/notmuch-wash.el index 00ac45b6..31fda61f 100644 --- a/emacs/notmuch-wash.el +++ b/emacs/notmuch-wash.el @@ -370,10 +370,10 @@ filename, before trimming any trailing . and - characters." Return the patch sequence number N from the last \"[PATCH N/M]\" style prefix in SUBJECT, or nil if such a prefix can't be found." - (when (string-match - "^ *\\(\\[[^]]*\\] *\\)*\\[[^]]*?\\([0-9]+\\)/[0-9]+[^]]*\\].*" - subject) - (string-to-number (substring subject (match-beginning 2) (match-end 2))))) + (and (string-match + "^ *\\(\\[[^]]*\\] *\\)*\\[[^]]*?\\([0-9]+\\)/[0-9]+[^]]*\\].*" + subject) + (string-to-number (substring subject (match-beginning 2) (match-end 2))))) (defun notmuch-wash-subject-to-patch-filename (subject) "Convert a patch mail SUBJECT into a filename.