diff --git a/lisp/nnmail.el b/lisp/nnmail.el index c86e96b..00de781 100644 --- a/lisp/nnmail.el +++ b/lisp/nnmail.el @@ -1389,6 +1389,10 @@ See the documentation for the variable `nnmail-split-fancy' for details." ((null split) nil) + ;; t split + ((eq split t) + (list t)) + ;; A group name. Do the \& and \N subs into the string. ((stringp split) (when nnmail-split-tracing @@ -1401,6 +1405,28 @@ See the documentation for the variable `nnmail-split-fancy' for details." (push "junk" nnmail-split-trace)) (list 'junk)) + ;; Logical OR operation. + ((eq (car split) 'or) + (let (done + (clauses (cadr split)) + (split (cddr split))) + (while (and (not done) (car clauses)) + (setq done (car (nnmail-split-it (car clauses))) + clauses (cdr clauses))) + (when done + (nnmail-split-it (car split))))) + + ;; Logical AND operation. + ((eq (car split) 'and) + (let ((done t) + (clauses (cadr split)) + (split (cddr split))) + (while (and done (car clauses)) + (setq done (car (nnmail-split-it (car clauses))) + clauses (cdr clauses))) + (when (and done (null clauses)) + (nnmail-split-it (car split))))) + ;; Builtin & operation. ((eq (car split) '&) (apply 'nconc (mapcar 'nnmail-split-it (cdr split))))