(setq vc-enabled-backends nil
      vc-handled-backends nil)

(setq user-init-file "/home/mwolson/test.el")

(custom-set-variables
  ;; custom-set-variables was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 '(auto-compression-mode t nil (jka-compr))
 '(backup-directory-alist (quote (("." . "~/.emacs.d/backup"))))
 '(delete-selection-mode t)
 '(develock-auto-enable t)
 '(eldoc-minor-mode-string " E")
 '(eldoc-mode t t)
 '(enable-recursive-minibuffers t)
 '(flyspell-issue-welcome-flag nil)
 '(ido-everywhere nil)
 '(ido-mode (quote buffer) nil (ido))
 '(ido-save-directory-list-file "~/.emacs.d/.ido.last")
 '(indent-tabs-mode nil)
 '(show-paren-mode t)
 '(show-paren-style (quote parenthesis))
 '(tab-stop-list (quote (4 8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80 84 88 92 96 100 104 108 112 116 120)))
 '(tab-width 8)
 '(user-full-name "Michael Olson")
 '(user-mail-address "mwolson@member.fsf.org")
 '(vc-handled-backends (quote (RCS CVS SVN SCCS MCVS)))
 '(visible-bell t)
 '(x-select-enable-clipboard t))
(custom-set-faces
  ;; custom-set-faces was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 '(default ((t (:stipple nil :background "Gainsboro" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 130 :width semi-condensed :family "misc-fixed"))))
 '(font-lock-builtin-face ((((class color) (background light)) (:foreground "medium purple"))))
 '(font-lock-constant-face ((((class color) (background light)) (:foreground "medium slate blue"))))
 '(font-lock-string-face ((((class color) (background light)) (:foreground "forest green"))))
 '(font-lock-type-face ((((class color) (background light)) (:foreground "dodger blue"))))
 '(font-lock-variable-name-face ((((class color) (background light)) (:foreground "sienna"))))
 '(region ((((class color) (background light)) (:background "blue" :foreground "white")))))

(when window-system
  ;; Make Greek characters look decent
  (create-fontset-from-fontset-spec
   "-*-terminus-medium-r-*-*-14-*-*-*-*-*-iso8859-15,
mule-unicode-0100-24ff:-*-freemono-medium-r-*-*-17-*-*-*-c-*-iso10646-1,
mule-unicode-2500-33ff:-*-freemono-medium-r-*-*-17-*-*-*-c-*-iso10646-1")
  (set-face-font 'default "-*-terminus-medium-r-*-*-14-*-*-*-*-*-iso8859-15")
  (setq-default line-spacing 1)

  (defun my-reset-frame-size ()
    "Reset the size of the current frame according to `default-frame-alist'."
    (interactive)
    (dolist (param '(width height))
      (set-frame-parameter nil param (cdr (assoc param default-frame-alist)))))

  ;; the width and height get changed inexplicably when the font
  ;; changes; this changes them back
  (my-reset-frame-size))

(add-to-list 'load-path "/home/mwolson/proj/emacs/muse/master/lisp")
(require 'muse)          ; load generic module
(require 'muse-colors)   ; load coloring/font-lock module
(require 'muse-context)  ; load ConTeXt publishing style
(require 'muse-mode)     ; load authoring mode
(require 'muse-blosxom)  ; load blosxom module
(require 'muse-docbook)  ; load DocBook publishing style
(require 'muse-html)     ; load (X)HTML publishing style
(require 'muse-latex)    ; load LaTeX/PDF publishing styles
(require 'muse-latex2png) ; publish <latex> tags
(require 'muse-project)  ; load support for projects
(require 'muse-texinfo)  ; load Info publishing style
(require 'muse-wiki)     ; load Wiki support
(require 'muse-xml)      ; load XML support

(add-to-list 'load-path "/home/mwolson/proj/emacs/planner/community")
(require 'planner-publish)

;; This uses a different header and footer than normal
(muse-derive-style "htuto" "html"
                   :header "~/personal-site/muse/header.html"
                   :footer "~/personal-site/muse/footer.html")

;; meandtheshell's crap
(defun muse-publish-content ()
"This function creates a list of contents with regards to the
current page. Also, it is possible to specify the
contentdepth. The contentdepth directive needs to be present in
the header section of a page for the content listing to be
displayed. The numeric parameter specifies to which depth the
content listing should be generated. 1 will only include the
top-level headlines while 2, 3 etc. will include the
corresponding lower levels."
  (let ((depths (muse-publishing-directive "contentdepth")))
    (when depths
      (let ((depth (string-to-number depths)))
        (when (not (eq depth 0))
          (insert "<td class='contents'><div class='contenthead'>
                       Table of contents</div><div class='contentbody'>")
          (set (make-local-variable 'muse-publish-generate-contents)
               (cons (copy-marker (point) t) depth))
          (muse-html-insert-contents depth)
          (unless (eobp) (forward-char));(forward-char)
          (insert "</div></td>"))))))

(muse-derive-style "mats" "xhtml"
                   :header "~/sandbox/meandtheshell/header.html")

(setq muse-project-alist
      '(("Tutoriel" ("~/sandbox/Tutoriel" :default "index")
         (:base "context" :path "~/sandbox/Tutoriel")
         (:base "context-pdf" :path "~/Tutoriel")
         (:base "htuto" :path "/ftp:mwolson@localhos:sandbox/Tutoriel"))
        ("meandtheshell" ("~/sandbox/meandtheshell")
         (:base "mats" :path "~/sandbox/meandtheshell"))
        ("PlanTest" ("~/sandbox/Tutoriel/plans"
                     :default "TaskPool"
                     :major-mode planner-mode
                     :visit-link planner-visit-link)
         (:base "planner-html" :path "~/sandbox/Tutoriel/plans"))))

;;; Key customizations

(global-set-key "\C-cb" 'bbdb-display)
(global-set-key "\C-xg" 'goto-line)

;; Make adding entries to debian/changelog easy
(global-set-key "\C-xD" nil)
(global-set-key "\C-xDa" 'debian-changelog-add-entry)

;; Map some keys to find-function/find-variable
(global-set-key "\C-xF" nil)
(global-set-key "\C-xFf" 'find-function)
(global-set-key "\C-xFv" 'find-variable)
(global-set-key "\C-xFl" 'find-library)
(global-set-key "\C-xFa" 'find-face-definition)