(defun extend-list (list element)
"Add an element to a list"
(setq list (cons element list)))
(defun extend-load-path (element)
"Use this function to extend the load-path with ELEMENT."
(setq load-path (cons (expand-file-name element) load-path)))
(byte-recompile-directory (expand-file-name "~/.emacs.d"))
(extend-load-path "~/.emacs.d")
(setq tab-width 4)
(setq default-tab-width 4)
;(setq-default tab-width 4)
; Anden mener det her skulle do the trick med tabs på 4.
(setq-default c-basic-offset 4)
;(set-default-font
(setq font-lock-maximum-decoration t)
(setq-default font-lock-maximum-size nil)
(global-font-lock-mode)
;(setq auto-mode-alist (cons '("\\.h\\'" . c++-mode) auto-mode-alist))
(tool-bar-mode)
;(font-lock-mode)
;(standard-display-european t)
(require 'latin-1)
;(require 'csharp-mode)
;(setq auto-mode-alist (cons '("\\.cs\\'" . csharp-mode) auto-mode-alist))
;(require 'xtla)
;(require 'xtla-browse)
;(require 'lua-mode)
;(setq auto-mode-alist (cons '("\\.lua\\'" . lua-mode) auto-mode-alist))
;(set-input-mode nil nil 1)
(setq line-number-mode t)
(setq display-time-day-and-date t)
(setq display-time-24hrs-format t)
(setq visible-bell t)
(standard-display-european 1)
(show-paren-mode 1)
(display-time)
;(require 'jde)
(setq w3-default-homepage "http://halfdans.net")
(add-hook 'text-mode-hook 'auto-fill-mode)
(add-hook 'text-mode-hook 'flyspell-mode)
;(highlight-beyond-fill-column)
;; Case is significant.
(setq dabbrev-case-fold-search nil)
(global-set-key "\M- " 'dabbrev-expand)
(require 'cc-mode)
(setq c-site-default-style "k&r")
(setq c-basic-offset 4)
(setq c-brace-imaginary-offset 0)
(setq-default indent-tabs-mode nil)
; Indent continuation lines
(c-set-offset 'statement-cont 4)
; Do not indent inline method definitions
(c-set-offset 'inline-open 0)
(require 'apt-utils)
(require 'csharp-mode)
(add-hook 'rcirc-print-hooks 'my-rcirc-print-hook)
(defun my-rcirc-print-hook (process sender response target text)
(when (and (string-match (rcirc-nick process) text)
(not (string= (rcirc-nick process) sender))
(not (string= (rcirc-server-name process) sender)))
(start-process "notify" nil "notify-send" (concat "rcirc: " sender) text)))
;(require 'vc-bzr)
;(require 'dig-browser)
;(load-library "insert-license")
; Enhanced syntax highlighting
;(font-lock-add-keywords 'c++-mode '(
;; Currently support for []|&!.+=-/%*,()<>{}
;("\\(\\[\\|\\]\\|[|!\\.\\+\\=\\&]\\|-\\|\\/\\|\\%\\|\\*\\|,\\|(\\|)\\|>\\ |<\\|{\\|}\\)" 1 font-lock-operator-face ) ("\\(;\\)" 1 font-lock-end-statement ) ))
;(make-face 'font-lock-operator-face)
;(make-face 'font-lock-end-statement)
;(setq font-lock-operator-face 'font-lock-operator-face)
;(setq font-lock-end-statement 'font-lock-end-statement)
;(let ((python-mode-hs-info '(python-mode "\\s-*\\(def.*\\|class.*\\|if.*\\|else.*\\|elif.*\\|try.*\\|except.*\\|finally.*\\)\\(:\\|$\\)"
; nil nil
; python-hs-forward-sexp-func nil)))
;
; (if (not (member python-mode-hs-info hs-special-modes-alist))
; (setq hs-special-modes-alist
; (cons python-mode-hs-info hs-special-modes-alist))))
;; (defun python-hs-forward-sexp-func (count)
;; (let ((pos (point)))
;; (beginning-of-line)
;; (cond
;; ((looking-at ".*") ; returns true
;; (setq bi (current-indentation)) ; record current indentation
;; (forward-line 1) ; go to next line
;; (while (and
;; (or
;; (looking-at py-blank-or-comment-re) ; find next dedented line
;; (< bi (current-indentation)))
;; (= (forward-line 1) 0))
;; nil
;; )
;; ; now back up
;; (forward-line -1)
;; )
;; (t (goto-char pos)))))
;(add-hook 'c-mode-hook (lambda ()
; (hs-minor-mode)))
;(add-hook 'c++-mode-hook (lambda ()
; (hs-minor-mode)))
(add-hook 'java-mode-hook (lambda ()
(hs-minor-mode)))
;(add-hook 'python-mode-hook (lambda ()
; (hs-minor-mode)))
;(add-hook 'latex-mode-hook (lambda ()
; (flyspell-mode)))
;(eval-after-load "outline" '(progn (require 'outline-plus)))
;(require 'outline-plus)
;(extend-list dig-browser-history '("pohldata.dk" . "217.157.6.133"))
;(setq dig-browser-default "217.157.6.133")
(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.
'(font-lock-doc-face ((t (:foreground "DarkRed"))))
'(font-lock-string-face ((((class color) (min-colors 88) (background light)) (:foreground "cyan4"))))
'(font-lock-type-face ((((class color) (min-colors 88) (background light)) (:foreground "ForestGreen")))))
(global-set-key [(mouse-4)] 'down-slightly)
(global-set-key [(mouse-5)] 'up-slightly)
(defun up-slightly () (interactive) (scroll-up 5))
(defun down-slightly () (interactive) (scroll-down 5))
;(gnuserv-start)
(server-start)
(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.
'(browse-url-browser-function (quote browse-url-epiphany))
'(browse-url-epiphany-arguments (quote ("-n")))
'(browse-url-epiphany-startup-arguments (quote ("-n")))
'(debian-changelog-mailing-address "halfdan@halfdans.net")
'(font-lock-global-modes t)
'(fortran-tab-mode-default nil)
'(global-font-lock-mode t)
'(indent-tabs-mode nil)
'(rcirc-authinfo (quote (("irc.freenode.net" nickserv "rto" "xxx"))))
'(rcirc-startup-channels-alist (quote (("^irc.freenode.net$" "#debian" "#rcirc"))))
'(safe-local-variable-values (quote ((buffer-file-coding-system . iso-8859-1))))
'(tab-width 4)
'(tags-add-tables (quote ask-user)))
; '(vc-handled-backends (quote (RCS CVS SVN SCCS Arch MCVS bzr))))