Function: gnus-summary-score-effect
gnus-summary-score-effect is an interactive and byte-compiled function
defined in gnus-score.el.gz.
Signature
(gnus-summary-score-effect HEADER MATCH TYPE SCORE &optional EXTRA)
Documentation
Simulate the effect of a score file entry.
HEADER is the header being scored. MATCH is the string we are looking for. TYPE is the score type. SCORE is the score to add. EXTRA is the possible non-standard header.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/gnus-score.el.gz
(defun gnus-summary-score-effect (header match type score &optional extra)
"Simulate the effect of a score file entry.
HEADER is the header being scored.
MATCH is the string we are looking for.
TYPE is the score type.
SCORE is the score to add.
EXTRA is the possible non-standard header."
(interactive (list (gnus-completing-read "Header"
(mapcar
#'car
(seq-filter
(lambda (x) (fboundp (nth 2 x)))
gnus-header-index))
t)
(read-string "Match: ")
(if (y-or-n-p "Use regexp match? ") 'r 's)
(string-to-number (read-string "Score: ")))
gnus-article-mode gnus-summary-mode)
(save-excursion
(unless (and (stringp match) (> (length match) 0))
(error "No match"))
(goto-char (point-min))
(let ((regexp (cond ((eq type 'f)
(gnus-simplify-subject-fuzzy match))
((eq type 'r)
match)
((eq type 'e)
(concat "\\`" (regexp-quote match) "\\'"))
(t
(regexp-quote match)))))
(while (not (eobp))
(let ((content (gnus-summary-header header 'noerr extra))
(case-fold-search t))
(and content
(when (if (eq type 'f)
(string-equal (gnus-simplify-subject-fuzzy content)
regexp)
(string-match regexp content))
(gnus-summary-raise-score score))))
(beginning-of-line 2))))
(gnus-set-mode-line 'summary))