[Remove `bot:load' in favor of `load-from-path' clinton@unknownlamer.org**20090730165400 Ignore-this: 24800fb46fb93499f232bc1cebd751 * Removed %bot:loadpath and instead push the bobot++ script directories onto the global load path * Removed bot:load definition instead defining it to be an alias for load-from-path ] { hunk ./scripts/bobot-utils.scm 15 -(define-public %bot:loadpath (list - (string-append (getenv "HOME") - "/.bobotpp/scripts/") - bot:sys-scripts-dir)) - -(define-public %bot:load-extensions %load-extensions) +(set! %load-path (cons* (string-append (getenv "HOME") "/.bobotpp/scripts/") + bot:sys-scripts-dir + %load-path)) hunk ./scripts/bobot-utils.scm 31 -(define-public (bot:load file) - (let path-loop ((load-path %bot:loadpath)) - (cond ((not (null? load-path)) - (if (not - (let ext-loop ((extensions %bot:load-extensions)) - (cond ((not (null? extensions)) - (if (catch 'system-error - (lambda () - (load - (string-append (car load-path) - file - (car extensions))) - #t) - (lambda args - #f )) - #t - (ext-loop (cdr extensions)))) - (else #f)))) - (path-loop (cdr load-path)))) - (else - (begin (bot:log "ERROR: File " file " Not Found!\n") #f))))) +(define-public bot:load load-from-path) }