Importing qgnus-0.24
[elisp/gnus.git-] / lisp / gnus-topic.el
index f5a574c..3aed794 100644 (file)
@@ -1250,6 +1250,10 @@ If COPYP, copy the groups instead."
    (let ((topic (gnus-current-topic)))
      (list topic
           (read-string (format "Rename %s to: " topic)))))
+  ;; Check whether the new name exists.
+  (when (gnus-topic-find-topology new-name)
+    (error "Topic '%s' already exists"))
+  ;; Do the renaming.
   (let ((top (gnus-topic-find-topology old-name))
        (entry (assoc old-name gnus-topic-alist)))
     (when top