Function: rsf-add-subject-to-spam-list
rsf-add-subject-to-spam-list is an interactive and byte-compiled
function defined in rmail-spam-filter.el.gz.
Signature
(rsf-add-subject-to-spam-list)
Documentation
Add the "Subject" header to the spam list.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/mail/rmail-spam-filter.el.gz
;; define functions for interactively adding sender/subject of a
;; specific message to the spam definitions while reading it, using
;; the menubar:
(defun rsf-add-subject-to-spam-list ()
"Add the \"Subject\" header to the spam list."
(interactive)
(let ((message-subject (regexp-quote (rmail-get-header "Subject"))))
;; Note the use of a backquote and comma on the subject line here,
;; to make sure message-subject is actually evaluated and its value
;; substituted.
(add-to-list 'rsf-definitions-alist
;; Note that an empty element is treated the same as
;; an absent one, so why does it bother to add them?
(list '(from . "")
'(to . "")
`(subject . ,message-subject)
'(content-type . "")
'(contents . "")
'(action . output-and-delete))
t)
(customize-mark-to-save 'rsf-definitions-alist)
(if rsf-autosave-newly-added-definitions
(progn
(custom-save-all)
(message "Added subject `%s' to spam list, and saved it"
message-subject))
(message "Added subject `%s' to spam list (remember to save it)"
message-subject))))