;; -*-emacs-lisp-*-
;;
;; Emacs startup file, e.g.  /etc/emacs/site-start.d/50icicles.el
;; for the Debian icicles package
;;
;; Originally contributed by Nils Naumann <naumann@unileoben.ac.at>
;; Modified by Dirk Eddelbuettel <edd@debian.org>
;; Adapted for dh-make by Jim Van Zandt <jrv@debian.org>

;; The icicles package follows the Debian/GNU Linux 'emacsen' policy and
;; byte-compiles its elisp files for each 'emacs flavor' (emacs19,
;; xemacs19, emacs20, xemacs20...).  The compiled code is then
;; installed in a subdirectory of the respective site-lisp directory.
;; We have to add this to the load-path:
(let ((package-dir (concat "/usr/share/"
                           (symbol-name debian-emacs-flavor)
                           "/site-lisp/icicles")))

;; If package-dir does not exist, the icicles package must have
;; removed but not purged, and we should skip the setup.
  (when (file-directory-p package-dir)
    (debian-pkg-add-load-path-item package-dir)
    (autoload 'icy-mode "icicles" "Icicles mode" t)
    (autoload 'icicle-mode "icicles" "Icicles mode" t)

    (autoload 'crosshairs "crosshairs"
      "Highlight current position with crosshairs." t)
    (autoload 'crosshairs-mode "crosshairs"
      "Toggle highlighting the current line and column." t)
    (autoload 'crosshairs-toggle-when-idle "crosshairs"
      "Toggle highlighting the current line and column when Emacs is idle." t)
    (autoload 'crosshairs-flash "crosshairs"
      "Highlight the current line and column temporarily." t)
    (autoload 'crosshairs-highlight "crosshairs"
      "Echo current position and highlight it with crosshairs." t)

    (autoload 'column-highlight-mode "col-highlight"
      "Toggle highlighting the current column." t)
    (autoload 'col-highlight-toggle-when-idle "col-highlight"
      "Turn on or off highlighting the current column when Emacs is idle." t)
    (autoload 'col-highlight-set-interval "col-highlight"
      "Set wait until highlight current column when Emacs is idle." t)
    (autoload 'col-highlight-flash "col-highlight"
      "Highlight the current column for `col-highlight-period' seconds." t)

    (autoload 'vline-mode "vline"
      "Display vertical line mode." t)
    (autoload 'vline-global-mode "vline"
      "Toggle Vline mode in all buffers." t)))
