Re: share-subdirs-list too long



>>>>> "Andrej" == Andrej Vodopivec <andrej.vodopivec at gmail.com> writes:

    Andrej> Attached is a patch which solves the problem.

[snip]

    >> Andrej
    >> 

[snip]

    Andrej> -	 (share-subdirs-list '("affine" "algebra" "calculus" "combinatorics" "contrib" "contrib/nset" "contrib/pdiff" "contrib/numericalio" "contrib/descriptive" "contrib/distrib" "contrib/diffequations" "contrib/stringproc" "contrib/Zeilberger" "linearalgebra" "diffequations" "graphics" "integequations" "integration" "macro" "matrix" "misc" "numeric" "orthopoly" "physics" "simplification" "sym" "tensor" "trigonometry" "utils" "vector"))
    Andrej> +	 (share-subdirs-list '("affine" "algebra" "calculus" "combinatorics" "contrib" "contrib/solve_rec" "contrib/simplex" "contrib/nset" "contrib/pdiff" "contrib/numericalio" "contrib/descriptive" "contrib/distrib" "contrib/diffequations" "contrib/stringproc" "contrib/Zeilberger" "linearalgebra" "diffequations" "graphics" "integequations" "integration" "macro" "matrix" "misc" "numeric" "orthopoly" "physics" "simplification" "sym" "tensor" "trigonometry" "utils" "vector"))
    Andrej>       ; Smash the list of share subdirs into a string of the form "{affine,algebra,...,vector}" .
    Andrej> -     (L (eval `(concatenate 'list ,@(mapcar #'(lambda (x) `(list "," ,x)) (cdr share-subdirs-list)))))
    Andrej> -	 (share-subdirs (eval `(concatenate 'string "{" ,(car share-subdirs-list) , at L "}"))))
    Andrej> +     (L (eval `(concatenate 'string ,@(mapcar #'(lambda (x) (concatenate 'string "," x)) (cdr share-subdirs-list)))))
    Andrej> +	 (share-subdirs (eval `(concatenate 'string "{" ,(car share-subdirs-list) ,L "}"))))
 
If comment is correct and we want to basically convert the list in
share-subdirs-list into a string, then I think the following should
work well, and doesn't have to call eval:

(let (...
      (share-subdirs (format nil "{~{~A~^,~}}" share-subdirs-list)))
  ...)

Fortunately, even gcl 2.4 understands this format string.  Warning:  I
didn't test this.

Ray