Variable: gnus-apply-kill-hook

gnus-apply-kill-hook is a customizable variable defined in gnus.el.gz.

Value

(gnus-apply-kill-file)

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"))))))

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/gnus.el.gz
(defcustom gnus-apply-kill-hook '(gnus-apply-kill-file)
  "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\"))))))"
  :group 'gnus-score-kill
  :options '(gnus-apply-kill-file)
  :type 'hook)