;;; 50miscbits-el.el -- debian emacs setups for miscbits-el. -*- mode: emacs-lisp -*-

;; Copyright 2009, 2012, 2014 Kevin Ryde

;; This file is part of miscbits-el.
;;
;; miscbits-el is free software; you can redistribute it and/or modify it
;; under the terms of the GNU General Public License as published by the
;; Free Software Foundation; either version 3, or (at your option) any later
;; version.
;;
;; miscbits-el is distributed in the hope that it will be useful, but
;; WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
;; Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program.  If not, see <http://www.gnu.org/licenses/>.


(let ((dir (concat "/usr/share/"
                   (symbol-name debian-emacs-flavor)
                   "/site-lisp/miscbits-el")))

  (cond ((not (file-exists-p "/usr/share/emacs/site-lisp/miscbits-el/align-let.el"))
         (message "miscbits-el removed but not purged, skipping setup"))

        ((not (file-exists-p (expand-file-name "miscbits-el-loaddefs.elc" dir)))
         ;; autoloads not available until install script succeeds, ignore until
         ;; then for the benefit of other byte compiling, such as emacsen-common
         ;; compiling 00debian-vars.el
         (message "miscbits-el not yet byte-compiled, skipping setup"))

        (t
         ;; debian-pkg-add-load-path-item as from debian 3.1 "sarge", in
         ;; emacsen-common 1.4.14 of June 2002
         (debian-pkg-add-load-path-item dir)

         (require 'miscbits-el-loaddefs))))
