Function: nnml-request-delete-group
nnml-request-delete-group is a byte-compiled function defined in
nnml.el.gz.
Signature
(nnml-request-delete-group GROUP &optional FORCE SERVER)
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/nnml.el.gz
(deffoo nnml-request-delete-group (group &optional force server)
(nnml-possibly-change-directory group server)
(let ((file (directory-file-name nnml-current-directory))
(file-name-coding-system nnmail-pathname-coding-system))
(if (file-exists-p file)
(if (file-directory-p file)
(progn
(when force
;; Delete all articles in GROUP.
(let ((articles
(directory-files
nnml-current-directory t
(concat
nnheader-numerical-short-files
"\\|" (regexp-quote nnml-nov-file-name) "$"))))
(dolist (article articles)
(when (file-writable-p article)
(nnheader-message 5 "Deleting article %s in %s..."
(file-name-nondirectory article)
group)
(funcall nnmail-delete-file-function article))))
;; Try to delete the directory itself.
(ignore-errors (delete-directory nnml-current-directory))))
(nnheader-report 'nnml "%s is not a directory" file))
(nnheader-report 'nnml "No such directory: %s/" file))
;; Remove the group from all structures.
(setq nnml-group-alist
(delq (assoc-string group nnml-group-alist) nnml-group-alist)
nnml-current-group nil
nnml-current-directory nil)
;; Save the active file.
(nnmail-save-active nnml-group-alist nnml-active-file))
t)