X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=WL-MK;h=c42e4f36a3bfea9c7a440f488183ce4967404953;hb=d97aa2fa9cfebeea3b00b48f2d97c140300b7922;hp=043cc58435e075b462ef6c6d05e8277ebda21b5b;hpb=fd44e582ccc0cb3d87ac3ddfe83f49203326c534;p=elisp%2Fwanderlust.git diff --git a/WL-MK b/WL-MK index 043cc58..c42e4f3 100644 --- a/WL-MK +++ b/WL-MK @@ -43,7 +43,7 @@ ;; ignore broken module (not (featurep 'tinycustom))) (when (and (boundp 'emacs-major-version) - (eq emacs-major-version 19) + (= emacs-major-version 19) (>= emacs-minor-version 29)) (message "%s" " Warning: You don't seem to have \"new custom\" package installed. @@ -96,7 +96,6 @@ (setq load-path (cons (expand-file-name ".") load-path)) (setq load-path (cons (expand-file-name WLDIR) (cons (expand-file-name ELMODIR) load-path))) - (setq wl-icon-dir (expand-file-name ICONDIR)) ;; load custom file if exists. `WL-CFG.el' override for committer. (load "./WL-CFG" t nil nil) ;; load-path @@ -104,13 +103,17 @@ (setq load-path (cons (expand-file-name UTILSDIR) load-path))) (require 'install) (load "./WL-ELS" nil nil t) - (condition-case () - (require 'mime-setup) - (error (error "No MIME module was detected. Please install SEMI."))) + ;; product.el version check + (require 'product) + (if (not (fboundp 'product-version-as-string)) + (error "Please install new APEL. See INSTALL or INSTALL.ja")) ;; smtp.el version check. (require 'smtp) (if (not (fboundp 'smtp-send-buffer)) - (error "Please install new FLIM. See INSTALL or INSTALL.ja.")))) + (error "Please install new FLIM. See INSTALL or INSTALL.ja")) + (condition-case () + (require 'mime-setup) + (error (error "Cannot load `mime-setup'. Please install SEMI"))))) (defun config-wl-pixmap-dir (&optional packagedir) "Examine pixmap directory where icon files should go." @@ -138,6 +141,26 @@ (config-wl-pixmap-dir) (princ "\n")) +(defun update-version () + "Update version number of documents." + (config-wl-package) + (load-file "elmo/elmo-version.el") + (let ((version (mapconcat + 'number-to-string + (product-version (product-find 'elmo-version)) + "."))) + (princ (concat "Update version number to " version "\n")) + ;; generate version.tex + (with-temp-buffer + (insert "\\def\\versionnumber{" version "}\n") + (write-region (point-min) (point-max) (expand-file-name + "version.tex" "doc"))) + ;; generate version.texi + (with-temp-buffer + (insert "@set VERSION " version "\n") + (write-region (point-min) (point-max) (expand-file-name + "version.texi" "doc"))))) + (defun test-wl () "Run test suite for developer." (config-wl-package) @@ -208,10 +231,11 @@ (make-directory PIXMAPDIR t)) (let* ((case-fold-search t) (icons (directory-files ICONDIR t - (cond ((or (featurep 'xemacs) - (and (boundp 'emacs-major-version) - (>= emacs-major-version 21))) + (cond ((featurep 'xemacs) "\\.x[bp]m$") + ((and (boundp 'emacs-major-version) + (>= emacs-major-version 21)) + "\\.img$\\|\\.x[bp]m$") ((featurep 'mule) "\\.img$\\|\\.xbm$")))) icon dest) @@ -219,7 +243,9 @@ (setq icon (car icons) icons (cdr icons) dest (expand-file-name (file-name-nondirectory icon) PIXMAPDIR)) - (princ (format "%s->%s\n" icon dest)) + (princ (format "%s -> %s\n" + (file-name-nondirectory icon) + (substring (file-name-directory dest) 0 -1))) (copy-file icon dest t)))) (defun install-wl-package () @@ -263,7 +289,7 @@ (defun config-wl-package-xmas () (if (not (featurep 'xemacs)) - (error "This directive is only for XEmacs.")) + (error "This directive is only for XEmacs")) (config-wl-package-subr) ;; PACKAGEDIR check. (let (package-dir) @@ -355,8 +381,7 @@ ))) (defun wl-texinfo-format () - (unless INFODIR - (setq INFODIR (wl-detect-info-directory))) + (wl-detect-info-directory) (cond ((listp wl-info-lang) (mapcar 'wl-texinfo-format-file wl-info-lang)) ((stringp wl-info-lang) @@ -364,7 +389,7 @@ (defun wl-texinfo-install-file (lang) (let ((infofile (symbol-value (intern (format "wl-%s-info" lang))))) - (install-file infofile DOCDIR INFODIR))) + (install-file infofile DOCDIR INFODIR nil 'overwrite))) (defun wl-texinfo-install () (cond ((listp wl-info-lang) @@ -387,22 +412,22 @@ (require 'info) (if (fboundp 'info-initialize) (info-initialize)) - (let ((infodir (car command-line-args-left)) - (info (wl-primary-info-file)) - previous INFODIR) - (setq INFODIR - (if (string= infodir "NONE") - (if (setq previous - (exec-installed-p info Info-directory-list - COMPRESS-SUFFIX-LIST)) - ;;(progn - ;;(condition-case nil (delete-file previous)) - (directory-file-name (file-name-directory previous));) - (car Info-directory-list)) - infodir)) - (setq command-line-args-left (cdr command-line-args-left)) - (princ (format "INFODIR is %s\n\n" INFODIR)) - INFODIR)) + (unless INFODIR + (let ((infodir (car command-line-args-left)) + (info (wl-primary-info-file)) + previous) + (setq INFODIR + (if (string= infodir "NONE") + (if (setq previous + (exec-installed-p info Info-directory-list + COMPRESS-SUFFIX-LIST)) + ;;(progn + ;;(condition-case nil (delete-file previous)) + (directory-file-name (file-name-directory previous));) + (car Info-directory-list)) + infodir)) + (setq command-line-args-left (cdr command-line-args-left)))) + (princ (format "INFODIR is %s\n\n" INFODIR))) (defun install-wl-info () (wl-texinfo-format)