X-Git-Url: http://cgit.sxemacs.org/?p=gnus;a=blobdiff_plain;f=lisp%2Fnnmail.el;h=62fcc2d8bd52a058dd49340228afb060c7bf8b16;hp=d88a1bf1580645b921786c2d6d33998b191b372e;hb=997404c721a1de533aa9f82d4d5bbc5447bfc23d;hpb=37159f7bfe7bc12dc4ca3966e2a7525be82a60c9 diff --git a/lisp/nnmail.el b/lisp/nnmail.el index d88a1bf15..62fcc2d8b 100644 --- a/lisp/nnmail.el +++ b/lisp/nnmail.el @@ -1,6 +1,6 @@ ;;; nnmail.el --- mail support functions for the Gnus mail backends -;; Copyright (C) 1995-2014 Free Software Foundation, Inc. +;; Copyright (C) 1995-2015 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen ;; Keywords: news, mail @@ -1393,7 +1393,7 @@ See the documentation for the variable `nnmail-split-fancy' for details." ((stringp split) (when nnmail-split-tracing (push split nnmail-split-trace)) - (list (nnmail-expand-newtext split))) + (list (nnmail-expand-newtext split t))) ;; Junk the message. ((eq split 'junk) @@ -1513,7 +1513,7 @@ See the documentation for the variable `nnmail-split-fancy' for details." ;; on the same split, which will find it immediately in the cache. (nnmail-split-it split)))))) -(defun nnmail-expand-newtext (newtext) +(defun nnmail-expand-newtext (newtext &optional fancyp) (let ((len (length newtext)) (pos 0) c expanded beg N did-expand) @@ -1538,6 +1538,10 @@ See the documentation for the variable `nnmail-split-fancy' for details." (if (= c ?\&) (setq N 0) (setq N (- c ?0))) + ;; We wrapped the searches in parentheses, so we have to + ;; add some parentheses here... + (when fancyp + (setq N (+ N 3))) (when (match-beginning N) (push (if nnmail-split-lowercase-expanded (downcase (buffer-substring (match-beginning N)