changeset 7573:059281285df7

(gnus-group-unsubscribe-current-group): Fail nicely if no current group name.
author Richard M. Stallman <rms@gnu.org>
date Thu, 19 May 1994 22:45:40 +0000
parents 9439aeb622d7
children 040547adfab2
files lisp/=gnus.el
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/=gnus.el	Thu May 19 22:42:22 1994 +0000
+++ b/lisp/=gnus.el	Thu May 19 22:45:40 1994 +0000
@@ -1532,8 +1532,12 @@
 (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.