diff --git a/scm/motif.scm b/scm/motif.scm index 4f3c105..1a739c4 100644 --- a/scm/motif.scm +++ b/scm/motif.scm @@ -4,8 +4,5 @@ ;;; are to be used. (provide 'motif) - (require 'xwidgets) -(set! widget-subdirectory 'xm) -(set! load-always '(support)) diff --git a/scm/xaw.scm b/scm/xaw.scm index ce1b028..b705bde 100644 --- a/scm/xaw.scm +++ b/scm/xaw.scm @@ -2,61 +2,6 @@ ;;; ;;; The Scheme part of the X11 widget interface. -; kludge -(define site-lib-xaw "") -(define site-lib-xmotif "") +(provide 'xaw) +(require 'xwidgets) -(require 'xaw) - -(define widget-subdirectory 'xaw) - -(define load-always '()) - -(define widget-aliases #f) - -(define (widget-loaded? w) - ;;(feature? (string->symbol (format #f "~a:~a.so" widget-subdirectory w)))) - (feature? (string->symbol (format #f "~a:~a.so" widget-subdirectory widget-subdirectory)))) - -(define-macro (load-widgets . w) - (let ((wl '()) (l '())) - (if (null? w) - (error 'load-widgets "no arguments")) - (for-each - (lambda (w) - (if (not (symbol? w)) - (error 'load-widgets "argument not a symbol")) - (if (not (widget-loaded? w)) - (set! l (cons w l)))) - w) - (for-each - (lambda (w) - (if (not (widget-loaded? w)) - (set! l (cons w l)))) - load-always) - (if (not (null? l)) - (begin - (if (not widget-aliases) - (load (format #f "~a/ALIASES" widget-subdirectory))) - (if autoload-notify? (format #t "[Loading ")) - (do ((f l (cdr f))) ((null? f)) - (let* ((file (car f)) - (alias (assq (car f) widget-aliases))) - (if alias (set! file (cdr alias))) - (if autoload-notify? - (format #t "~a~a" file (if (null? (cdr f)) "" " "))) - ;; XXX: don't load all widgets, they're all in the same lib - ;;(set! wl (cons (format #f "~a/~a.so" widget-subdirectory file) - ;; wl)))) - (set! wl (list (format #f "~a/~a.so" widget-subdirectory widget-subdirectory))))) - (if autoload-notify? (format #t "]~%")) - `(fluid-let ((load-libraries - (if (feature? 'motif) - (string-append site-lib-xmotif " " load-libraries) - (string-append site-lib-xaw " " load-libraries)))) - (load ',wl))) - #f))) - -(define load-widget load-widgets) - -(provide 'xwidgets) diff --git a/scm/xlib.scm b/scm/xlib.scm index 052a053..8644d79 100644 --- a/scm/xlib.scm +++ b/scm/xlib.scm @@ -2,11 +2,7 @@ ;;; ;;; The Scheme part of the Xlib extension. -; kludge -(define site-lib-xlib "") - -(fluid-let ((load-libraries (string-append site-lib-xlib " " load-libraries))) - (require 'xlib.so)) +(require 'xlib.so) (define (create-window . args) (apply-with-keywords diff --git a/scm/xwidgets.scm b/scm/xwidgets.scm index e540d81..52a87c2 100644 --- a/scm/xwidgets.scm +++ b/scm/xwidgets.scm @@ -2,24 +2,13 @@ ;;; ;;; The Scheme part of the Xt extension. -;; kludge -(define site-lib-xt "") -(define site-force-load-xm "") -(define site-lib-xmotif "") +(define widgets (if (feature? 'motif) 'motif 'xaw)) -(if (feature? 'motif) - (fluid-let ((load-libraries - (string-append site-force-load-xm " " site-lib-xmotif " " - load-libraries))) - (require 'xaw.so 'xt-motif.so)) - (fluid-let ((load-libraries - (string-append site-lib-xt " " load-libraries))) - (require 'xaw.so))) +(require 'xlib) +(require 'xt.so (string->symbol (format #f "~a-xt.so" widgets))) +(require (string->symbol (format #f "~a-widgets.so" widgets))) -(load 'xlib.scm) - -(provide 'xlib) -(provide 'xt) +(provide 'xwidgets) (define (manage-child w) (manage-children (list w)))