;; -*-emacs-lisp-*-
;;
;; Emacs startup file, e.g.  /etc/emacs/site-start.d/50scim-bridge-el.el
;; for the Debian scim-bridge-el package

(let* ((package "scim-bridge")
       (main-dir (format "/usr/share/%s/site-lisp/%s" flavor package))
       (sub-dirs '("l10n"))
       (commands '(scim-mode scim-mode-on)))
  ;; If package-dir does not exist, the scim-bridge-el package must have
  ;; removed but not purged, and we should skip the setup.
  (when (file-directory-p main-dir)
    (add-to-list 'load-path main-dir)
    ;; In old flavors, `mapc' is not implemented.
    (mapcar (lambda (sub-dir)
	      (let ((path (format "%s/%s" main-dir sub-dir)))
		(if (file-directory-p path)
		    (add-to-list 'load-path path))))
	    sub-dirs)
    (mapcar (lambda (command)
	      (autoload command "scim-bridge"
		"Minor mode for using SCIM to input multibyte characters." t))
	    commands)))
