[gnus git] branch master updated: m0-7-184-g5663a1d =1= Add possibility to show the current thread's total score.

Tassilo Horn <[email protected]>
Newsgroups gmane.emacs.gnus.cvs
Message-ID <[email protected]>
       via  5663a1d48fdc09cd4bae33a7d8dff8e41a0de84f (commit)
      from  fff80f88ef397fca65cb382217ce9c9a08b1329e (commit)


- Log -----------------------------------------------------------------
commit 5663a1d48fdc09cd4bae33a7d8dff8e41a0de84f
Author: Tassilo Horn <[email protected]>
Date:   Tue Jul 30 15:27:18 2013 +0200

    Add possibility to show the current thread's total score.
    
    * gnus-sum.el (gnus-summary-make-menu-bar): Add "Current thread score"
    menu entry.
    
    * gnus-score.el (gnus-summary-current-score): Use prefix arg to show
    the current thread's total score instead of the current article's
    score.

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index a6f0f65..7c4f060 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,12 @@
 2013-07-30  Tassilo Horn  <[email protected]>
 
+	* gnus-sum.el (gnus-summary-make-menu-bar): Add "Current thread score"
+	menu entry.
+
+	* gnus-score.el (gnus-summary-current-score): Use prefix arg to show
+	the current thread's total score instead of the current article's
+	score.
+
 	* gnus-sum.el (gnus-subthread-sort-functions): New defcustom.
 	(gnus-sort-threads-recursively): Delete defcustom.
 	(gnus-sort-threads-recursive): Adapt accordingly.
diff --git a/lisp/gnus-score.el b/lisp/gnus-score.el
index da5c313..5f91246 100644
--- a/lisp/gnus-score.el
+++ b/lisp/gnus-score.el
@@ -1071,10 +1071,15 @@ EXTRA is the possible non-standard header."
 	(push (cons article n) gnus-newsgroup-scored)))
     (gnus-summary-update-line)))
 
-(defun gnus-summary-current-score ()
-  "Return the score of the current article."
-  (interactive)
-  (gnus-message 1 "%s" (gnus-summary-article-score)))
+(defun gnus-summary-current-score (arg)
+  "Return the score of the current article.
+  With prefix ARG, return the total score of the current (sub)thread."
+  (interactive "P")
+  (gnus-message 1 "%s" (if arg
+			   (gnus-thread-total-score
+			    (gnus-id-to-thread
+			     (mail-header-id (gnus-summary-article-header))))
+			   (gnus-summary-article-score))))
 
 (defun gnus-score-change-score-file (file)
   "Change current score alist."
diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el
index a7269ba..94f4e70 100644
--- a/lisp/gnus-sum.el
+++ b/lisp/gnus-sum.el
@@ -2359,7 +2359,8 @@ increase the score of each group you read."
 	   ["Mark above" gnus-summary-mark-above t]
 	   ["Tick above" gnus-summary-tick-above t]
 	   ["Clear above" gnus-summary-clear-above t])
-	  ["Current score" gnus-summary-current-score t]
+	  ["Current article score" gnus-summary-current-score t]
+	  ["Current thread score" (gnus-summary-current-score 'total) t]
 	  ["Set score" gnus-summary-set-score t]
 	  ["Switch current score file..." gnus-score-change-score-file t]
 	  ["Set mark below..." gnus-score-set-mark-below t]

-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.

Summary of changes:
 lisp/ChangeLog     |    7 +++++++
 lisp/gnus-score.el |   13 +++++++++----
 lisp/gnus-sum.el   |    3 ++-
 3 files changed, 18 insertions(+), 5 deletions(-)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".

The branch, master has been updated


hooks/post-receive
-- 
Gnus Project
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.