2000-10-02 14:43:13 ShengHuo ZHU <zsh@cs.rochester.edu>
authorShengHuo ZHU <zsh@cs.rochester.edu>
Mon, 2 Oct 2000 17:50:10 +0000 (17:50 +0000)
committerShengHuo ZHU <zsh@cs.rochester.edu>
Mon, 2 Oct 2000 17:50:10 +0000 (17:50 +0000)
* gnus-art.el (gnus-article-banner-alist): New variable.
(article-strip-banner): Use it.
* gnus-cus.el (gnus-group-parameters): Allow symbol.

lisp/ChangeLog
lisp/gnus-art.el
lisp/gnus-cus.el

index 6aaea0e..bb116dd 100644 (file)
@@ -1,3 +1,9 @@
+2000-10-02 14:43:13  ShengHuo ZHU  <zsh@cs.rochester.edu>
+
+       * gnus-art.el (gnus-article-banner-alist): New variable.
+       (article-strip-banner): Use it.
+       * gnus-cus.el (gnus-group-parameters): Allow symbol.
+
 2000-10-02  Dave Love  <fx@gnu.org>
 
        * mail-source.el (mail-sources): Revert to nil.
index e52c1f4..60d38c0 100644 (file)
@@ -219,6 +219,13 @@ asynchronously.     The compressed face will be piped to this command."
   :type '(choice regexp (const nil))
   :group 'gnus-article-washing)
 
+(defcustom gnus-article-banner-alist nil
+  "Banner alist for stripping.
+For example, 
+     ((egroups . \"^[ \\t\\n]*-------------------+\\\\( eGroups Sponsor -+\\\\)?....\\n\\\\(.+\\n\\\\)+\"))"
+  :type '(repeat (cons symbol regexp))
+  :group 'gnus-article-washing)
+
 (defcustom gnus-emphasis-alist
   (let ((format
         "\\(\\s-\\|^\\|[-\"]\\|\\s(\\)\\(%s\\(\\w+\\(\\s-+\\w+\\)*[.,]?\\)%s\\)\\(\\s-\\|[-,;:\"]\\s-\\|[?!.]+\\s-\\|\\s)\\)")
@@ -1705,6 +1712,10 @@ always hide."
              (widen)
              (forward-line -1)
              (delete-region (point) (point-max))))
+          ((symbolp banner)
+           (if (setq banner (cdr (assq banner gnus-article-banner-alist)))
+               (while (re-search-forward banner nil t)
+                 (delete-region (match-beginning 0) (match-end 0)))))
           ((stringp banner)
            (while (re-search-forward banner nil t)
              (delete-region (match-beginning 0) (match-end 0))))))))))
index 142049a..74a3a0e 100644 (file)
@@ -170,6 +170,7 @@ rules as described later).")
 
     (banner (choice :tag "Banner"
                    (const signature)
+                   symbol
                    regexp
                    (const :tag "None" nil)) "\
 Regular expression matching banners to be removed from articles.")