From: yamaoka Date: Thu, 9 Dec 1999 09:16:03 +0000 (+0000) Subject: (dgnushack-install-package): Preserve any file in $(PACKAGEDIR)/lisp/t-gnus X-Git-Tag: t-gnus-6_14_0-06~2 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=ce0886adb9f65f6d2fd0361cd57f97daaec6a914;p=elisp%2Fgnus.git- (dgnushack-install-package): Preserve any file in $(PACKAGEDIR)/lisp/t-gnus if it is without .el or .elc suffix. (mapcon): New compiler macro for emulating cl function. (mapc): Bug fix - treat the last arg as a list. --- diff --git a/lisp/dgnushack.el b/lisp/dgnushack.el index b454f2b..17fd114 100644 --- a/lisp/dgnushack.el +++ b/lisp/dgnushack.el @@ -58,7 +58,7 @@ (if rest `(let* ((fn ,fn) (seq ,seq) - (args (cons seq ,rest)) + (args (cons seq (list ,@rest))) (m (apply (function min) (mapcar (function length) args))) (n 0)) (while (< n m) @@ -91,6 +91,28 @@ (pop x)) x)))) +(define-compiler-macro mapcon (&whole form fn seq &rest rest) + (if (and (fboundp 'mapcon) + (subrp (symbol-function 'mapcon))) + form + (if rest + `(let (res + (args (cons ,seq (list ,@rest))) + p) + (while (not (memq nil args)) + (push (apply ,fn args) res) + (setq p args) + (while p + (setcar p (cdr (pop p))) + )) + (apply (function nconc) (nreverse res))) + `(let (res + (arg ,seq)) + (while arg + (push (funcall ,fn arg) res) + (setq arg (cdr arg))) + (apply (function nconc) (nreverse res)))))) + ;; If we are building w3 in a different directory than the source ;; directory, we must read *.el from source directory and write *.elc ;; into the building directory. For that, we define this function @@ -389,7 +411,8 @@ You must specify the name of the package path as follows: 'string-lessp)) (mapcar (lambda (file) - (unless (member file files) + (unless (or (member file files) + (not (string-match "\\.elc?$" file))) (setq file (expand-file-name file lisp-dir)) (message "Removing %s..." file) (condition-case nil