X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=WL-MK;h=0086a93080e2a84339789a73e1298d97421519b0;hb=7f4eb868ba231a6d8a8354f3a9344f0266ce39fa;hp=d7ab2d64d886b1a2cf4d10c7239d358c8bfdd3e8;hpb=3a60c8832bbffb3d8bd9f9c691e5411b8e20bc21;p=elisp%2Fwanderlust.git diff --git a/WL-MK b/WL-MK index d7ab2d6..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 " ")) @@ -265,6 +274,12 @@ "\\.img$\\|\\.xbm$"))))) (install-files icons ICONDIR PIXMAPDIR nil 'overwrite))) +(defun uninstall-wl-icons () + (if (not (file-directory-p PIXMAPDIR)) + () + (wl-uninstall (wl-scan-icons PIXMAPDIR) + PIXMAPDIR))) + (defun install-wl-package () (compile-wl-package) (let ((wl-install-dir (expand-file-name WL_PREFIX LISPDIR)) @@ -291,17 +306,7 @@ (wl-uninstall (wl-scan-source (list ELMODIR)) elmo-install-dir)) (if PIXMAPDIR - (let* ((case-fold-search t) - (icons (directory-files PIXMAPDIR t "\\.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))))))) + (uninstall-wl-icons))) (defun config-wl-package-xmas ()