/[emacs]/emacs/lisp/gnus/gnus-mlspl.el
ViewVC logotype

Diff of /emacs/lisp/gnus/gnus-mlspl.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8 by miles, Mon Sep 1 15:45:24 2003 UTC revision 1.8.2.1 by schwab, Thu Jul 22 16:45:47 2004 UTC
# Line 1  Line 1 
1  ;;; gnus-mlspl.el --- a group params-based mail splitting mechanism  ;;; gnus-mlspl.el --- a group params-based mail splitting mechanism
2  ;; Copyright (C) 1998, 1999, 2000  
3    ;; Copyright (C) 1998, 1999, 2000, 2001, 2002
4  ;;        Free Software Foundation, Inc.  ;;        Free Software Foundation, Inc.
5    
6  ;; Author: Alexandre Oliva <oliva@lsd.ic.unicamp.br>  ;; Author: Alexandre Oliva <oliva@lsd.ic.unicamp.br>
# Line 8  Line 9 
9  ;; This file is part of GNU Emacs.  ;; This file is part of GNU Emacs.
10    
11  ;; GNU Emacs is free software; you can redistribute it and/or modify  ;; GNU Emacs is free software; you can redistribute it and/or modify
12  ;; it under the terms of the GNU General Public License as published by  ;; it under the terms of the GNU General Public License as published
13  ;; the Free Software Foundation; either version 2, or (at your option)  ;; by the Free Software Foundation; either version 2, or (at your
14  ;; any later version.  ;; option) any later version.
15    
16  ;; GNU Emacs is distributed in the hope that it will be useful,  ;; GNU Emacs is distributed in the hope that it will be useful, but
17  ;; but WITHOUT ANY WARRANTY; without even the implied warranty of  ;; WITHOUT ANY WARRANTY; without even the implied warranty of
18  ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19  ;; GNU General Public License for more details.  ;; General Public License for more details.
20    
21  ;; You should have received a copy of the GNU General Public License  ;; You should have received a copy of the GNU General Public License
22  ;; along with GNU Emacs; see the file COPYING.  If not, write to the  ;; along with this program; see the file COPYING.  If not, write to
23  ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,  ;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
24  ;; Boston, MA 02111-1307, USA.  ;; Boston, MA 02111-1307, USA.
25    
26  ;;; Commentary:  ;;; Commentary:
# Line 62  unless overridden by any group marked as Line 63  unless overridden by any group marked as
63  uses are as simple as the name of a default mail group, but more  uses are as simple as the name of a default mail group, but more
64  elaborate fancy splits may also be useful to split mail that doesn't  elaborate fancy splits may also be useful to split mail that doesn't
65  match any of the group-specified splitting rules.  See  match any of the group-specified splitting rules.  See
66  gnus-group-split-fancy for details."  `gnus-group-split-fancy' for details."
67    (interactive "P")    (interactive "P")
68    (setq nnmail-split-methods 'nnmail-split-fancy)    (setq nnmail-split-methods 'nnmail-split-fancy)
69    (when catch-all    (when catch-all
# Line 88  instead.  This variable is set by gnus-g Line 89  instead.  This variable is set by gnus-g
89  ;;;###autoload  ;;;###autoload
90  (defun gnus-group-split ()  (defun gnus-group-split ()
91    "Uses information from group parameters in order to split mail.    "Uses information from group parameters in order to split mail.
92  See gnus-group-split-fancy for more information.  See `gnus-group-split-fancy' for more information.
93    
94  gnus-group-split is a valid value for nnmail-split-methods."  gnus-group-split is a valid value for nnmail-split-methods."
95    (let (nnmail-split-fancy)    (let (nnmail-split-fancy)
# Line 140  nnml:mail.foo: Line 141  nnml:mail.foo:
141  nnml:mail.others:  nnml:mail.others:
142  \((split-spec . catch-all))  \((split-spec . catch-all))
143    
144  Calling (gnus-group-split-fancy nil nil \"mail.misc\") returns:  Calling (gnus-group-split-fancy nil nil \"mail.others\") returns:
145    
146  \(| (& (any \"\\\\(bar@femail\\\\.com\\\\|.*@femail\\\\.com\\\\)\"  \(| (& (any \"\\\\(bar@femail\\\\.com\\\\|.*@femail\\\\.com\\\\)\"
147             \"mail.bar\")             \"mail.bar\")
148        (any \"\\\\(foo@nowhere\\\\.gov\\\\|foo@localhost\\\\|foo-redist@home\\\\)\"        (any \"\\\\(foo@nowhere\\\\.gov\\\\|foo@localhost\\\\|foo-redist@home\\\\)\"
149             - \"bugs-foo\" - \"rambling-foo\" \"mail.foo\"))             - \"bugs-foo\" - \"rambling-foo\" \"mail.foo\"))
150     \"mail.others\")"     \"mail.others\")"
151    (let* ((newsrc (cdr gnus-newsrc-alist))    (let* ((newsrc (cdr gnus-newsrc-alist))
152           split)           split)
# Line 202  Calling (gnus-group-split-fancy nil nil Line 203  Calling (gnus-group-split-fancy nil nil
203                           (list 'any split-regexp)                           (list 'any split-regexp)
204                           ;; Generate RESTRICTs for SPLIT-EXCLUDEs.                           ;; Generate RESTRICTs for SPLIT-EXCLUDEs.
205                           (if (listp split-exclude)                           (if (listp split-exclude)
206                               (let ((seq split-exclude)                               (apply #'append
207                                     res)                                      (mapcar (lambda (arg) (list '- arg))
208                                 (while seq                                              split-exclude))
                                  (push (cons '- (pop seq))  
                                        res))  
                                (apply #'nconc (nreverse res)))  
209                             (list '- split-exclude))                             (list '- split-exclude))
210                           (list group-clean))                           (list group-clean))
211                          split)                          split)

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.8.2.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26