1 ; minimal.scm - guile code compiled into gwave so its always there.
2 ; Copyright (C) 1999 Steve Tell
3 ; portions from scwm/minimal.scm:
4 ;;;; Copyright (C) 1997-1999 Maciej Stachowiak and Greg J. Badros
8 (display "in minimal.scm") (newline)))
11 (read-enable 'positions)
13 (define startup-error-flag #f)
14 ; TODO: replace this with a catch around the next stuff
18 ; (set! startup-error-flag #t)))
20 ; print list if debug flag is set
23 (for-each (lambda (e) (display e (current-output-port))) l)))
26 ; TODO: check to see if gwave-guiledir is already present in the load-path,
27 ; and if so, don't add it.
28 (let* ((genv (getenv "GWAVE_GUILE_DIR"))
29 (gwave-guiledir (if genv
31 (string-append gwave-datadir "/guile"))))
32 (set! %load-path (cons gwave-guiledir %load-path)))
34 (dbprint "%load-path=" %load-path "\n")
36 ; Do setup and find a .gwaverc
37 (load-from-path "app/gwave/gwave-startup.scm")
39 (dbprint "minimal.scm load done flag=" startup-error-flag "\n")
41 ; this next expression must be the last one, returning #t or #f, which becomes
42 ; the return value of the call to scwm_safe_eval_str() in gwave.c
43 (if startup-error-flag
45 (display "gwave: Error(s) in gwave-startup.scm or other startup files\n")
46 (display "gwave: %load-path was ")(display %load-path)(newline)