Philippe Brochard a écrit :
I answer to myself :) [...] > PS: I've tested the last hack with clisp and cmucl. All works fine > with cmucl but I can't compile it with clisp. I got this : > > -- clisp load.lisp -- > ;; Loading file /home/phil/local/stumpwm-cvs/stumpwm-cvs/stumpwm/user.fas ... > *** - POSITION-IF: :START should be an integer >=0, not NIL > The following restarts are available: > SKIP :R1 skip 29 72 (DEFVAR *ROOT-MAP* (LET # # ...) ...)-2 > STOP :R2 stop loading file > /home/phil/local/stumpwm-cvs/stumpwm-cvs/stumpwm/user.fas > RETRY :R3 Retry performing #<ASDF:LOAD-OP NIL #x2046B2F6> on > #<ASDF:CL-SOURCE-FILE "user" #x2046CAE6>. > ACCEPT :R4 Continue, treating #<ASDF:LOAD-OP NIL #x2046B2F6> on > #<ASDF:CL-SOURCE-FILE "user" #x2046CAE6> as having been successful. > SKIP :R5 skip (OOS 'LOAD-OP STUMPWM) > STOP :R6 stop loading file > /home/phil/local/stumpwm-cvs/stumpwm-cvs/stumpwm/load.lisp > ABORT :R7 ABORT > Break 1 STUMPWM[2]> > The following special variables were defined too late: > STUMPWM::*TOP-MAP* > 0 errors, 34 warnings > --------------------- > The problem is with the #\Space key, split-string complain because the first position-if return nil with " " as string. I found this as a workaround, but I'm sure there is a more elegant loop way. ---------------------------------------------------------------------- (defun split-string (string &optional (separators " ")) [snip doc string] ;; FIXME: This let is here because movitz doesn't 'lend optional' (let ((seps separators)) (labels ((sep (c) (find c seps :test #'char=))) (if (position-if (complement #'sep) string) (loop for i = (or (position-if (complement #'sep) string) 0) then (position-if (complement #'sep) string :start j) while i as j = (position-if #'sep string :start i) collect (subseq string i j) while j) (list string))))) ---------------------------------------------------------------------- Philippe -- Philippe Brochard <[EMAIL PROTECTED]> http://hocwp.free.fr -=-= http://www.gnu.org/home.fr.html =-=- _______________________________________________ Stumpwm-devel mailing list Stumpwm-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/stumpwm-devel