+(defun gnus-pick-article-or-thread (&optional arg)
+ "If `gnus-thread-hide-subtree' is t, then pick the thread on the current line.
+Otherwise pick the article on the current line.
+If ARG, pick the article/thread on that line instead."
+ (interactive "P")
+ (when arg
+ (gnus-pick-goto-article arg))
+ (if gnus-thread-hide-subtree
+ (progn
+ (save-excursion
+ (gnus-uu-mark-thread))
+ (forward-line 1))
+ (gnus-summary-mark-as-processable 1)))
+
+(defun gnus-pick-unmark-article-or-thread (&optional arg)
+ "If `gnus-thread-hide-subtree' is t, then unmark the thread on current line.
+Otherwise unmark the article on current line.
+If ARG, unmark thread/article on that line instead."
+ (interactive "P")
+ (when arg
+ (gnus-pick-goto-article arg))
+ (if gnus-thread-hide-subtree
+ (save-excursion
+ (gnus-uu-unmark-thread))
+ (gnus-summary-unmark-as-processable 1)))
+