aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Tatarik2012-11-16 10:44:35 +0100
committerRomain Francoise2012-11-16 10:44:35 +0100
commita2cfe8a3b8d2368a96951710c774e126c8283c10 (patch)
tree6fa6f4e26fc0300f3aee1433e5f520c625a8c828
parent7c82753d4cee69bc63cf19daee89b69873559221 (diff)
downloademacs-a2cfe8a3b8d2368a96951710c774e126c8283c10.tar.gz
emacs-a2cfe8a3b8d2368a96951710c774e126c8283c10.zip
[Gnus] Don't score by headers when scoring by body
* gnus-score.el (gnus-score-body): * gnus-logic.el (gnus-advanced-body): Don't score by headers when scoring by body.
-rw-r--r--lisp/gnus/ChangeLog6
-rw-r--r--lisp/gnus/gnus-logic.el13
-rw-r--r--lisp/gnus/gnus-score.el17
3 files changed, 22 insertions, 14 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index d1cf22fd971..55d11d4c6b1 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,9 @@
12012-11-16 Jan Tatarik <jan.tatarik@gmail.com>
2
3 * gnus-score.el (gnus-score-body):
4 * gnus-logic.el (gnus-advanced-body): Don't score by headers when
5 scoring by body.
6
12012-11-13 Glenn Morris <rgm@gnu.org> 72012-11-13 Glenn Morris <rgm@gnu.org>
2 8
3 * gnus-diary.el (nndiary-request-create-group-functions) 9 * gnus-diary.el (nndiary-request-create-group-functions)
diff --git a/lisp/gnus/gnus-logic.el b/lisp/gnus/gnus-logic.el
index a440b779930..60d7b31713b 100644
--- a/lisp/gnus/gnus-logic.el
+++ b/lisp/gnus/gnus-logic.el
@@ -181,17 +181,18 @@
181 (with-current-buffer nntp-server-buffer 181 (with-current-buffer nntp-server-buffer
182 (let* ((request-func (cond ((string= "head" header) 182 (let* ((request-func (cond ((string= "head" header)
183 'gnus-request-head) 183 'gnus-request-head)
184 ;; We need to peek at the headers to detect the
185 ;; content encoding
186 ((string= "body" header) 184 ((string= "body" header)
187 'gnus-request-article) 185 'gnus-request-body)
188 (t 'gnus-request-article))) 186 (t 'gnus-request-article)))
189 ofunc article handles) 187 ofunc article handles)
190 ;; Not all backends support partial fetching. In that case, we 188 ;; Not all backends support partial fetching. In that case, we
191 ;; just fetch the entire article. 189 ;; just fetch the entire article.
192 (unless (gnus-check-backend-function 190 ;; When scoring by body, we need to peek at the headers to detect the
193 (intern (concat "request-" header)) 191 ;; content encoding
194 gnus-newsgroup-name) 192 (unless (or (gnus-check-backend-function
193 (intern (concat "request-" header))
194 gnus-newsgroup-name)
195 (string= "body" header))
195 (setq ofunc request-func) 196 (setq ofunc request-func)
196 (setq request-func 'gnus-request-article)) 197 (setq request-func 'gnus-request-article))
197 (setq article (mail-header-number gnus-advanced-headers)) 198 (setq article (mail-header-number gnus-advanced-headers))
diff --git a/lisp/gnus/gnus-score.el b/lisp/gnus/gnus-score.el
index f215b845514..b7061960839 100644
--- a/lisp/gnus/gnus-score.el
+++ b/lisp/gnus/gnus-score.el
@@ -1762,21 +1762,22 @@ score in `gnus-newsgroup-scored' by SCORE."
1762 (all-scores scores) 1762 (all-scores scores)
1763 (request-func (cond ((string= "head" header) 1763 (request-func (cond ((string= "head" header)
1764 'gnus-request-head) 1764 'gnus-request-head)
1765 ;; We need to peek at the headers to detect
1766 ;; the content encoding
1767 ((string= "body" header) 1765 ((string= "body" header)
1768 'gnus-request-article) 1766 'gnus-request-body)
1769 (t 'gnus-request-article))) 1767 (t 'gnus-request-article)))
1770 entries alist ofunc article last) 1768 entries alist ofunc article last)
1771 (when articles 1769 (when articles
1772 (setq last (mail-header-number (caar (last articles)))) 1770 (setq last (mail-header-number (caar (last articles))))
1773 ;; Not all backends support partial fetching. In that case, 1771 ;; Not all backends support partial fetching. In that case,
1774 ;; we just fetch the entire article. 1772 ;; we just fetch the entire article.
1775 (unless (gnus-check-backend-function 1773 ;; When scoring by body, we need to peek at the headers to detect
1776 (and (string-match "^gnus-" (symbol-name request-func)) 1774 ;; the content encoding
1777 (intern (substring (symbol-name request-func) 1775 (unless (or (gnus-check-backend-function
1778 (match-end 0)))) 1776 (and (string-match "^gnus-" (symbol-name request-func))
1779 gnus-newsgroup-name) 1777 (intern (substring (symbol-name request-func)
1778 (match-end 0))))
1779 gnus-newsgroup-name)
1780 (string= "body" header))
1780 (setq ofunc request-func) 1781 (setq ofunc request-func)
1781 (setq request-func 'gnus-request-article)) 1782 (setq request-func 'gnus-request-article))
1782 (while articles 1783 (while articles