From 314474e2d5f16f609f38c067241280c85955c283 Mon Sep 17 00:00:00 2001 From: dickmao Date: Thu, 29 Jul 2021 13:33:08 +0200 Subject: [PATCH] Follow-up toggle-subscription name change * doc/misc/gnus.texi (Subscription Commands): Refer to correct function. * lisp/gnus/gnus-group.el (gnus-group-unsubscribe-current-group): Make backwards-compatible. (gnus-group-unsubscribe-group): Make backwards-compatible (bug#49768). --- doc/misc/gnus.texi | 6 +++--- lisp/gnus/gnus-group.el | 15 +++++++++++++-- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index 6dca5b6955b..c46047ff770 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi @@ -2318,10 +2318,10 @@ commands listed in @ref{Browse Foreign Server} at hand. @itemx u @kindex S t @r{(Group)} @kindex u @r{(Group)} -@findex gnus-group-toggle-subscription -@c @icon{gnus-group-toggle-subscription} +@findex gnus-group-toggle-subscription-at-point +@c @icon{gnus-group-toggle-subscription-at-point} Toggle subscription to group under point -(@code{gnus-group-toggle-subscription}). +(@code{gnus-group-toggle-subscription-at-point}). @item S s @itemx U diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index ec18b3f4648..6202567344f 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el @@ -3864,9 +3864,20 @@ Uses the process/prefix convention." (interactive "P" gnus-group-mode) (gnus-group-set-subscription-at-point n 'subscribe)) -(define-obsolete-function-alias 'gnus-group-unsubscribe-current-group +(defsubst gnus-group-unsubscribe-current-group (&optional n do-sub) + (if do-sub + (gnus-group-set-subscription-at-point n do-sub) + (gnus-group-toggle-subscription-at-point n))) + +(defsubst gnus-group-unsubscribe-group (group &optional level silent) + (if level + (gnus-group-set-subscription group level silent) + (gnus-group-toggle-subscription group silent))) + +(make-obsolete 'gnus-group-unsubscribe-current-group 'gnus-group-toggle-subscription-at-point "28.1") -(define-obsolete-function-alias 'gnus-group-unsubscribe-group + +(make-obsolete 'gnus-group-unsubscribe-group 'gnus-group-toggle-subscription "28.1") (defun gnus-group-toggle-subscription-at-point (&optional n) -- 2.39.2