From: dickmao Date: Thu, 29 Jul 2021 11:33:08 +0000 (+0200) Subject: Follow-up toggle-subscription name change X-Git-Tag: emacs-28.0.90~1664 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=314474e2d5f16f609f38c067241280c85955c283;p=emacs.git 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). --- 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)