From: Teodor Zlatanov Date: Thu, 27 Sep 2007 10:40:02 +0000 (+0000) Subject: (gnus-summary-kill-thread): Allow universal prefix zero X-Git-Url: https://cgit.sxemacs.org/?a=commitdiff_plain;h=4258e532258754537d9751a3de585c8710ea9a9e;p=gnus (gnus-summary-kill-thread): Allow universal prefix zero to mark a thread as expirable. Add variable `hide' to handle hiding of thread for both the null and zero (kill/expire thread) universal prefix cases. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1fd71a94c..86bbfa1be 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2007-09-27 Teodor Zlatanov + + * gnus-sum.el (gnus-summary-kill-thread): Allow universal prefix zero + to mark a thread as expirable. Add variable `hide' to handle hiding of + thread for both the null and zero (kill/expire thread) universal prefix + cases. + 2007-09-25 Teodor Zlatanov * gnus-registry.el (gnus-registry-store-extra-entry): Allow for nil diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index db3932b53..6b74845c1 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -11397,11 +11397,13 @@ taken." (defun gnus-summary-kill-thread (&optional unmark) "Mark articles under current thread as read. If the prefix argument is positive, remove any kinds of marks. +If the prefix argument is zero, mark thread as expired. If the prefix argument is negative, tick articles instead." (interactive "P") (when unmark (setq unmark (prefix-numeric-value unmark))) - (let ((articles (gnus-summary-articles-in-thread))) + (let ((articles (gnus-summary-articles-in-thread)) + (hide (or (null unmark) (= unmark 0)))) (save-excursion ;; Expand the thread. (gnus-summary-show-thread) @@ -11412,15 +11414,17 @@ If the prefix argument is negative, tick articles instead." (gnus-summary-mark-article-as-read gnus-killed-mark)) ((> unmark 0) (gnus-summary-mark-article-as-unread gnus-unread-mark)) + ((= unmark 0) + (gnus-summary-mark-article-as-unread gnus-expirable-mark)) (t (gnus-summary-mark-article-as-unread gnus-ticked-mark))) (setq articles (cdr articles)))) - ;; Hide killed subtrees. - (and (null unmark) + ;; Hide killed subtrees when hide is true. + (and hide gnus-thread-hide-killed (gnus-summary-hide-thread)) - ;; If marked as read, go to next unread subject. - (when (null unmark) + ;; If hide is t, go to next unread subject. + (when hide ;; Go to next unread subject. (gnus-summary-next-subject 1 t))) (gnus-set-mode-line 'summary))