;;;;
;;;; default.el - Site-specific customisations for Emacs
;;;;              Easily ignorable/configurable by users
;;;;

;; Apply keybindings

(if (not (or (member 'key-bindings inhibit-default-init-portions)
             (member 'all-key-bindings inhibit-default-init-portions)))
    (gawd-apply-key-bindings))

;; Remove keybindings for major modes applied by site-start, if
;; required

(if (member 'all-key-bindings inhibit-default-init-portions)
    (progn (remove-hook 'tshell-mode-hook 'gawd-frob-tshell-keymap)
           (remove-hook 'Manual-mode-hook 'gawd-frob-man-keymap)))

;; Load the desktop, if required

(when (not (fboundp 'desktop-save-mode))
  (if (not (member 'desktop-load inhibit-default-init-portions))
      (let ((term-setup-hook))
        (desktop-read))))                           ; Read in the desktop, if it was saved

;; Activate icompletion, if required

(if (not (member 'icomplete inhibit-default-init-portions))
    (progn (require 'icomplete)
           (icomplete-mode)
           (setq teach-extended-commands-p nil      ; Useless, with icompletion.
                 suggest-key-bindings nil)))        ; So is this.

;; Load macros, if required

(if (not (member 'macro-load inhibit-default-init-portions))
    (load (expand-file-name power-macros-file) t nil t))