gnus-apply-kill-hook

gnus-apply-kill-hook is a variable defined in `gnus.el'.
Its value is
(gnus-apply-kill-file)

  • This variable may be risky if used as a file-local variable.

Documentation:
A hook called to apply kill files to a group.
This hook is intended to apply a kill file to the selected newsgroup.
The function `gnus-apply-kill-file' is called by default.

Since a general kill file is too heavy to use only for a few
newsgroups, I recommend you to use a lighter hook function. For
example, if you'd like to apply a kill file to articles which contains
a string `rmgroup' in subject in newsgroup `control', you can use the
following hook:

(setq gnus-apply-kill-hook
(list
(lambda ()
(cond ((string-match "control" gnus-newsgroup-name)
(gnus-kill "Subject" "rmgroup")
(gnus-expunge "X"))))))

You can customize this variable.