From: okazaki Date: Tue, 1 Feb 2011 01:18:26 +0000 (+0000) Subject: * WL-MK (wl-scan-path): New function. X-Git-Tag: merged-trunk-to-elmo-imap4-compliance-2^2~7 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=cf54fe5d1c9e4b4f89aaeccafe7396425be94915;p=elisp%2Fwanderlust.git * WL-MK (wl-scan-path): New function. (wl-scan-source): Use `wl-scan-path'. (wl-scan-icons): New function. (uninstall-wl-icons): Use `wl-scan-icons'. Check existence of `PIXMAPDIR'. --- diff --git a/ChangeLog b/ChangeLog index 22bc186..de7bf5a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2011-02-01 Tetsurou Okazaki + + * WL-MK (wl-scan-path): New function. + (wl-scan-source): Use `wl-scan-path'. + (wl-scan-icons): New function. + (uninstall-wl-icons): Use `wl-scan-icons'. + Check existence of `PIXMAPDIR'. + 2010-07-19 TAKAHASHI Kaoru * INSTALL: Update recommended version of APEL. diff --git a/WL-MK b/WL-MK index 88f8dc8..0086a93 100644 --- a/WL-MK +++ b/WL-MK @@ -210,16 +210,25 @@ (setq files (cdr files))) (lunit suite))) -(defun wl-scan-source (path) - (let (ret) - (mapc - (lambda (x) - (mapc (lambda (y) - (setq ret (append (list y (concat y "c")) ret))) - (directory-files x nil "\\(.+\\)\\.el$" t))) - path) - ret)) +(defun wl-scan-path (path scanner) + (let ((dirs (if (listp path) + path + (list path)))) + (apply 'append (mapcar scanner dirs)))) +(defun wl-scan-source (path) + (wl-scan-path path + (lambda (x) + (apply 'append + (mapcar (lambda (y) + (list y (concat y "c"))) + (directory-files x nil "\\(.+\\)\\.el$" t)))))) + +(defun wl-scan-icons (path) + (wl-scan-path path + (lambda (x) + (let ((case-fold-search t)) + (directory-files x nil "\\.img$\\|\\.x[bp]m$"))))) (defun wl-uninstall (objs path) ;(message (mapconcat 'identity objs " ")) @@ -266,17 +275,10 @@ (install-files icons ICONDIR PIXMAPDIR nil 'overwrite))) (defun uninstall-wl-icons () - (let* ((case-fold-search t) - (icons (directory-files PIXMAPDIR t "\\.img$\\|\\.x[bp]m$")) - icon) - (while icons - (setq icon (car icons) - icons (cdr icons)) - (if (and (file-exists-p icon) - (file-writable-p icon)) - (progn - (princ (format "%s was uninstalled.\n" icon)) - (delete-file icon)))))) + (if (not (file-directory-p PIXMAPDIR)) + () + (wl-uninstall (wl-scan-icons PIXMAPDIR) + PIXMAPDIR))) (defun install-wl-package () (compile-wl-package)