Function: gnus-topic-remove-topic
gnus-topic-remove-topic is a byte-compiled function defined in
gnus-topic.el.gz.
Signature
(gnus-topic-remove-topic &optional INSERT TOTAL-REMOVE HIDE IN-LEVEL)
Documentation
Remove the current topic.
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/gnus-topic.el.gz
(defun gnus-topic-remove-topic (&optional insert total-remove _hide in-level)
"Remove the current topic."
(let ((topic (gnus-group-topic-name))
(level (gnus-group-topic-level))
(beg (progn (beginning-of-line) (point)))
buffer-read-only)
(when topic
(while (and (zerop (forward-line 1))
(> (or (gnus-group-topic-level) (1+ level)) level)))
(delete-region beg (point))
;; Do the change in this rather odd manner because it has been
;; reported that some topics share parts of some lists, for some
;; reason. I have been unable to determine why this is the
;; case, but this hack seems to take care of things.
(let ((data (cadr (gnus-topic-find-topology topic))))
(setcdr data
(list (if insert 'visible 'invisible)
(caddr data)
(cadddr data))))
(if total-remove
(setq gnus-topic-alist
(delq (assoc topic gnus-topic-alist) gnus-topic-alist))
(gnus-topic-insert-topic topic in-level)))))