init.lsp right way

Started by Dmi, September 21, 2005, 05:46:24 AM

Previous topic - Next topic

Dmi

Hi, All!



Is there the more right way to write init.lsp?
(set 'newlisp-base "C:\Program Files\newlisp")
(set 'preload-modules '("dbf.lsp" "awk.lsp"))
(dolist (l preload-modules) (load (append newlisp-base "\" l)))
WBR, Dmi

alex

#1

(import "kernel32.dll" "GetModuleFileNameA")

(define (find-newlisp , buff)
  (setq buff (dup "00" 260))
  (GetModuleFileNameA 0 buff 259)
  (trim buff)
)

(set 'newlisp-base (join (chop (parse (find-newlisp) {/|\} 0)) "\"))
(set 'preload-modules '("dbf.lsp" "awk.lsp"))
(dolist (l preload-modules) (load (append newlisp-base "\" l)))

Dmi

#2
Nice. Thanks!
WBR, Dmi