diff options
author | Miles Bader <miles@gnu.org> | 2004-12-26 23:33:51 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 2004-12-26 23:33:51 +0000 |
commit | aa0a8561bb79265b7e525f62a0a5e04221f78e15 (patch) | |
tree | 1a87ba43201e1c9fd8ffdb4acee1f603e296f150 /lisp/gnus/gnus-util.el | |
parent | f3e4c362ff4ce52d0103f1a3553f1efcb33463e7 (diff) | |
download | emacs-aa0a8561bb79265b7e525f62a0a5e04221f78e15.tar.gz |
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-750
Merge from gnus--rel--5.10
Patches applied:
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-78
Merge from emacs--cvs-trunk--0
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-79
- miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-80
Update from CVS
2004-12-22 Katsumi Yamaoka <yamaoka@jpl.org>
* lisp/gnus/gnus-spec.el (gnus-spec-tab): Make a Lisp form which works
correctly even if there are wide characters.
2004-12-21 Katsumi Yamaoka <yamaoka@jpl.org>
* lisp/gnus/rfc2231.el (rfc2231-parse-string): Decode encoded value after
concatenating segments rather than before concatenating them.
Suggested by ARISAWA Akihiro <ari@mbf.ocn.ne.jp>.
2004-12-17 Katsumi Yamaoka <yamaoka@jpl.org>
* lisp/gnus/mm-util.el (mm-xemacs-find-mime-charset): New macro.
2004-12-17 Aidan Kehoe <kehoea@parhasard.net>
* lisp/gnus/mm-util.el (mm-xemacs-find-mime-charset-1): New function used to
unify Latin characters in XEmacs.
(mm-find-mime-charset-region): Use it.
2004-12-17 Katsumi Yamaoka <yamaoka@jpl.org>
* lisp/gnus/gnus-util.el (gnus-delete-directory): New function.
* lisp/gnus/gnus-agent.el (gnus-agent-delete-group): Use it.
* lisp/gnus/gnus-cache.el (gnus-cache-delete-group): Use it.
Diffstat (limited to 'lisp/gnus/gnus-util.el')
-rw-r--r-- | lisp/gnus/gnus-util.el | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index d9952fd8cdc..91e087f05d5 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el @@ -708,6 +708,23 @@ Bind `print-quoted' and `print-readably' to t, and `print-length' and (when (file-exists-p file) (delete-file file))) +(defun gnus-delete-directory (directory) + "Delete files in DIRECTORY. Subdirectories remain. +If there's no subdirectory, delete DIRECTORY as well." + (when (file-directory-p directory) + (let ((files (directory-files + directory t "^\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*")) + file dir) + (while files + (setq file (pop files)) + (if (eq t (car (file-attributes file))) + ;; `file' is a subdirectory. + (setq dir t) + ;; `file' is a file or a symlink. + (delete-file file))) + (unless dir + (delete-directory directory))))) + (defun gnus-strip-whitespace (string) "Return STRING stripped of all whitespace." (while (string-match "[\r\n\t ]+" string) |