summaryrefslogtreecommitdiff
path: root/lisp/gnus/gnus-art.el
diff options
context:
space:
mode:
authorJulien Danjou <julien@danjou.info>2011-03-01 14:32:24 +0000
committerKatsumi Yamaoka <yamaoka@jpl.org>2011-03-01 14:32:24 +0000
commitfb9b91be56a3d294cf5a96a279e7f0d4edf64e41 (patch)
tree7fbf3389cccdbbbb83fd09bb5d29094d8fd317a7 /lisp/gnus/gnus-art.el
parent3b0468c4a6089cf4910a9c88c7a3c328110d9a02 (diff)
downloademacs-fb9b91be56a3d294cf5a96a279e7f0d4edf64e41.tar.gz
gnus-art.el (list-identifier): Add list-identifier as a parameter group.
(article-hide-list-identifiers): Use list-identifier group parameter.
Diffstat (limited to 'lisp/gnus/gnus-art.el')
-rw-r--r--lisp/gnus/gnus-art.el27
1 files changed, 23 insertions, 4 deletions
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index 250ebaf3f95..7469c4445c6 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -1253,6 +1253,24 @@ predicate. See Info node `(gnus)Customizing Articles'."
:link '(custom-manual "(gnus)Customizing Articles")
:type gnus-article-treat-custom)
+(gnus-define-group-parameter
+ list-identifier
+ :variable-document
+ "Alist of regexps and correspondent identifiers."
+ :variable-group gnus-article-washing
+ :parameter-type
+ '(choice :tag "Identifier"
+ :value nil
+ (symbol :tag "Item in `gnus-list-identifiers'" none)
+ regexp
+ (const :tag "None" nil))
+ :parameter-document
+ "If non-nil, specify how to remove `identifiers' from articles' subject.
+
+Any symbol is used to look up a regular expression to match the
+banner in `gnus-list-identifiers'. A string is used as a regular
+expression to match the identifier directly.")
+
(make-obsolete-variable 'gnus-treat-strip-pgp nil
"Gnus 5.10 (Emacs 22.1)")
@@ -3056,10 +3074,11 @@ images if any to the browser, and deletes them when exiting the group
The `gnus-list-identifiers' variable specifies what to do."
(interactive)
(let ((inhibit-point-motion-hooks t)
- (regexp (if (consp gnus-list-identifiers)
- (mapconcat 'identity gnus-list-identifiers " *\\|")
- gnus-list-identifiers))
- (inhibit-read-only t))
+ (regexp (or (gnus-parameter-list-identifier gnus-newsgroup-name)
+ (if (consp gnus-list-identifiers)
+ (mapconcat 'identity gnus-list-identifiers " *\\|")
+ gnus-list-identifiers)))
+ (inhibit-read-only t))
(when regexp
(save-excursion
(save-restriction