[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nnshimbun] group deletion
- From: Katsumi Yamaoka <yamaoka@xxxxxxx>
- Date: Thu, 16 Dec 2004 17:42:10 +0900
- X-ml-name: emacs-w3m
- X-mail-count: 07270
nnshimbun に `G DEL' でグループを消す機能が無いのは、何か理由が
あるんでしたっけ?
ちょっと作ってみたのですが:
(defun nnshimbun-delete-file (file)
"Delete FILE or directory."
(if (eq t (car (file-attributes file)))
;; FILE is a directory.
(let ((files (directory-files
file t "^\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*")))
(while files
(nnshimbun-delete-file (car files))
(setq files (cdr files)))
(delete-directory file))
;; FILE is a file or a symlink.
(delete-file file)))
(deffoo nnshimbun-request-delete-group (group &optional force server)
(when (nnshimbun-possibly-change-group group server)
(let ((dir (nnmail-group-pathname group (nnshimbun-server-directory))))
(when (file-exists-p dir)
(nnshimbun-delete-file dir)
(setq dir (expand-file-name ".." dir))
(unless (directory-files
dir t "^\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*")
(delete-directory dir))))
t))