;                                                         -*-Scheme-*-
;;;
;;; Common init file for gaf
;;;

; The following global variables are defined by libgeda:
;
; path-sep       -- system path separator
; geda-data-path -- path to gEDA system-wide data directory
; geda-rc-path   -- path to gEDA system-wide config directory

;; Set some flags to aid in debugging rc files
(cond-expand (guile-2 #t)
             (guile (debug-enable 'debug)))
(debug-enable 'backtrace)
(read-enable 'positions)

; The libgeda Scheme library provides a number of useful functions for
; writing Scheme code for embedding in gaf.
(load-from-path "geda.scm")

;; Import deprecated Scheme functions
(load-from-path "geda-deprecated-config.scm")
(use-modules (geda deprecated)
             (lepton color-map))


; Function: scheme-directory( dir )
;
; Allows additional directories to be added to the list
; of directories which are used by Lepton EDA to load Scheme code.
; Environment variables in 'dir' are expanded.


;;;; Color maps
;; Load up a color scheme for printing optimised for a white background.
; Comment out the second line and comment in the first line for a
; dark background. The dark background is the original look.
;
;(load (build-path geda-rc-path "print-colormap-darkbg")) ; dark background
(primitive-load (build-path geda-rc-path "print-colormap-lightbg")) ; light background


;;;; Process configuration script directory

;; The directory containing any extra scheme files to load
(define autoload-path (build-path geda-data-path "scheme" "autoload"))

;; Execute any scheme files found in the autoload-path directory.
(load-scheme-dir autoload-path)
