Function: gnus-topic-create-topic
gnus-topic-create-topic is an interactive and byte-compiled function
defined in gnus-topic.el.gz.
Signature
(gnus-topic-create-topic TOPIC PARENT &optional PREVIOUS FULL-TOPIC)
Documentation
Create a new TOPIC under PARENT.
When used interactively, PARENT will be the topic under point.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/gnus-topic.el.gz
(defun gnus-topic-create-topic (topic parent &optional previous full-topic)
"Create a new TOPIC under PARENT.
When used interactively, PARENT will be the topic under point."
(interactive
(list
(read-string "New topic: ")
(gnus-current-topic))
gnus-topic-mode)
;; Check whether this topic already exists.
(when (gnus-topic-find-topology topic)
(error "Topic already exists"))
(unless parent
(setq parent (caar gnus-topic-topology)))
(let ((top (cdr (gnus-topic-find-topology parent)))
(full-topic (or full-topic (list (list topic 'visible nil nil)))))
(unless top
(error "No such parent topic: %s" parent))
(if previous
(progn
(while (and (cdr top)
(not (equal (caaadr top) previous)))
(setq top (cdr top)))
(setcdr top (cons full-topic (cdr top))))
(nconc top (list full-topic)))
(unless (assoc topic gnus-topic-alist)
(push (list topic) gnus-topic-alist)))
(gnus-topic-enter-dribble)
(gnus-group-list-groups)
(gnus-topic-goto-topic topic))