From: Richard M. Stallman Date: Thu, 19 May 1994 22:45:40 +0000 (+0000) Subject: (gnus-group-unsubscribe-current-group): X-Git-Tag: emacs-19.34~8280 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=acf3b6865a24e9cf244af490bda5259d9c306f04;p=emacs.git (gnus-group-unsubscribe-current-group): Fail nicely if no current group name. --- diff --git a/lisp/gnus.el b/lisp/gnus.el index ae1bb03a0f5..cd0272da233 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -1532,8 +1532,12 @@ Cross references (Xref: field) of articles are ignored." (defun gnus-group-unsubscribe-current-group () "Toggle subscribe from/to unsubscribe current group." (interactive) - (gnus-group-unsubscribe-group (gnus-group-group-name)) - (gnus-group-next-group 1)) + (let ((group (gnus-group-group-name))) + (if group + (progn + (gnus-group-unsubscribe-group group) + (gnus-group-next-group 1)) + (message "No Newsgroup found to \(un\)subscribe")))) (defun gnus-group-unsubscribe-group (group) "Toggle subscribe from/to unsubscribe GROUP.