summaryrefslogtreecommitdiffstats
path: root/emacs
blob: 2b34a07bae4081ca48084aea231829082184b025 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
(load-file "/usr/share/emacs/site-lisp/cedet/cedet-devel-load.el")
(require 'cedet)
(require 'semantic/ia)

(require 'semantic/bovine/gcc)
(require 'semantic/bovine/c)
(require 'semantic/bovine/clang)
(semantic-clang-activate)

(semantic-mode)
(semantic-load-enable-code-helpers)

(global-ede-mode t)

(add-to-list 'load-path "~/.emacs.d")

(add-to-list 'load-path "/usr/share/emacs/site-lisp/auto-complete")
(require 'auto-complete-config)
(add-to-list 'ac-dictionary-directories "/usr/share/emacs/site-lisp/auto-complete/ac-dict")
(ac-config-default)
(setq ac-auto-show-menu nil)
(define-key ac-mode-map (kbd "M-TAB") 'auto-complete)

(require 'ace-jump-mode)
(define-key global-map (kbd "C-c SPC") 'ace-jump-mode)

;(load "/usr/share/Agda-2.2.8/emacs-mode/agda2.el")

(setq whitespace-style '(face trailing indentation space-after-tab space-before-tab))
(global-whitespace-mode t)
;(defun whitespace-post-command-hook() nil)
;(setq whitespace-post-command-hook (lambda () nil))

(require 'rect-mark)
(global-set-key (kbd "C-x r C-SPC") 'rm-set-mark)
(global-set-key (kbd "C-x r C-x")   'rm-exchange-point-and-mark)
(global-set-key (kbd "C-x r C-w")   'rm-kill-region)
(global-set-key (kbd "C-x r M-w")   'rm-kill-ring-save)

(setq auto-mode-alist (cons '("\.lua$" . lua-mode) auto-mode-alist))
(autoload 'lua-mode "lua-mode" "Lua editing mode." t)

;(load "sml-mode/sml-mode-startup.el")

(load "auctex.el" nil t t)
(load "preview-latex.el" nil t t)

(add-to-list 'load-path "/usr/share/emacs/site-lisp/cc-mode")
(load "cc-mode.el" nil t t)

(autoload 'flex-mode "flex-mode.el" "Flex mode." t)
(autoload 'bison-mode "bison-mode.el" "Bison mode." t)

(load "/usr/share/emacs/site-lisp/haskell-mode/haskell-mode")
(add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
(add-hook 'haskell-mode-hook 'turn-on-haskell-indentation)

;(setq erlang-root-dir "/usr/lib/erlang")
;(setq exec-path (cons "/usr/lib/erlang/bin" exec-path))
;(require 'erlang-start)

;(add-to-list 'load-path (expand-file-name "~/.emacs.d"))
;(autoload 'vala-mode "vala-mode" "Major mode for editing Vala code." t)
;(add-to-list 'auto-mode-alist '("\\.vala$" . vala-mode))
;(add-to-list 'auto-mode-alist '("\\.vapi$" . vala-mode))
;(add-to-list 'file-coding-system-alist '("\\.vala$" . utf-8))
;(add-to-list 'file-coding-system-alist '("\\.vapi$" . utf-8))

(defun c-setup ()
  (setq indent-tabs-mode t)
  (setq c-basic-offset 8)
  (setq tab-width 8)
  (setq ac-sources '(ac-source-words-in-buffer ac-source-gtags ac-source-semantic)))

;(add-hook 'vala-mode-hook 'c-setup)
(add-hook 'c-mode-hook 'c-setup)
(add-hook 'c++-mode-hook 'c-setup)
(add-hook 'java-mode-hook 'c-setup)

(autoload 'php-mode "php-mode.el" "Php mode." t)
(setq auto-mode-alist (append '(("/*.\.php[345]?$" . php-mode)) auto-mode-alist))

(require 'cmake-mode)
(setq auto-mode-alist
      (append '(("CMakeLists\\.txt\\'" . cmake-mode)
		("\\.cmake\\'" . cmake-mode))
	      auto-mode-alist))



(cond ((fboundp 'global-font-lock-mode)
       ;; Turn on font-lock in all modes that support it
       (global-font-lock-mode t)
       ;; Maximum colors
       (setq font-lock-maximum-decoration t)))

(setq auto-mode-alist (cons '("\.po\'\|\.po\." . po-mode) auto-mode-alist))
(autoload 'po-mode "po-mode" "Major mode for translators to edit PO files" t)

(setq TeX-auto-save t)
(setq TeX-parse-self t)
(setq-default TeX-master nil)
(setq TeX-newline-function 'newline-and-indent)
(setq TeX-view-program-list '(("Zathura" "zathura %o")))
(setq TeX-view-program-selection '((output-pdf "Zathura")))
(eval-after-load "tex"
  '(add-to-list 'TeX-command-list '("Make" "make" TeX-run-command nil t)))

;(require 'tramp)
;(setq tramp-default-method "scp")

(column-number-mode t)
(show-paren-mode t)

;(global-set-key "\C-cl" 'org-store-link)
;(global-set-key "\C-ca" 'org-agenda)
(global-font-lock-mode 1)

(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.
 '(TeX-PDF-mode t)
 '(ecb-options-version "2.32")
 '(org-agenda-files (quote ("~/Privat/Termine.org")))
 '(safe-local-variable-values (quote ((py-indent-offset . 4))))
 '(scroll-bar-mode nil)
 '(transient-mark-mode (quote (only . t))))

(server-start)

(desktop-save-mode 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.
 )

(ede-cpp-root-project "gmrf"
		      :name "GMRF"
		      :file "~/Devel/C/gmrf/gmrf/CMakeLists.txt"
		      :include-path '("/include"))

(ede-cpp-root-project "gmrf-proto-babel"
		      :name "GMRF/proto/babel"
		      :file "~/Devel/C/gmrf/proto-babel/CMakeLists.txt"
		      :system-include-path '("~/Devel/C/gmrf/gmrf/include"))