Function: gnus-topic-rename
gnus-topic-rename is an interactive and byte-compiled function defined
in gnus-topic.el.gz.
Signature
(gnus-topic-rename OLD-NAME NEW-NAME)
Documentation
Rename a topic.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/gnus-topic.el.gz
(defun gnus-topic-rename (old-name new-name)
"Rename a topic."
(interactive
(let ((topic (gnus-current-topic)))
(list topic
(read-string (format "Rename %s to: " topic) topic)))
gnus-topic-mode)
;; Check whether the new name exists.
(when (gnus-topic-find-topology new-name)
(error "Topic `%s' already exists" new-name))
;; "nil" is an invalid name, for reasons I'd rather not go
;; into here. Trust me.
(when (equal new-name "nil")
(error "Invalid name: %s" nil))
;; Do the renaming.
(let ((top (gnus-topic-find-topology old-name))
(entry (assoc old-name gnus-topic-alist)))
(when top
(setcar (cadr top) new-name))
(when entry
(setcar entry new-name))
(forward-line -1)
(gnus-dribble-touch)
(gnus-group-list-groups)
(forward-line 1)))