-
Notifications
You must be signed in to change notification settings - Fork 1
/
tools.el
101 lines (88 loc) · 3.03 KB
/
tools.el
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
;; load git-emacs
(add-to-list 'load-path (concat elisp-root "/tools/git-emacs"))
(require 'git-emacs)
;; deactivates ido (which is loaded by git-emacs)
(ido-mode 0)
;; load cedet (if experiencing problems, recompile)
(add-to-list 'load-path (concat elisp-root "/tools/cedet/common"))
(load-file (concat elisp-root "/tools/cedet/common/cedet.el"))
(semantic-load-enable-excessive-code-helpers)
;; load Emacs Code Browser
(add-to-list 'load-path (concat elisp-root "/tools/ecb/"))
(load-file (concat elisp-root "/tools/ecb/ecb.el"))
(require 'ecb-autoloads)
;; load JDEE
(add-to-list 'load-path
(expand-file-name
(concat elisp-root "/tools/jde/lisp")))
(setq defer-loading-jde t)
(if defer-loading-jde
(progn
(autoload 'jde-mode "jde" "JDE mode." t)
(setq auto-mode-alist
(append
'(("\\.java\\'" . jde-mode))
auto-mode-alist)))
(require 'jde))
(defun my-jde-mode-hook ()
(setq c-basic-offset 4))
(add-hook 'jde-mode-hook 'my-jde-mode-hook)
;; load auctex/preview-latex
(load (concat elisp-root "/tools/auctex/site-lisp/auctex.el") nil t t)
(load (concat elisp-root "/tools/auctex/site-lisp/preview-latex.el") nil t t)
;; Word to Emacs
;; (requieres antiword)
(autoload 'word-to-emacs (concat elisp-root "/tools/word-to-emacs"))
(add-to-list 'auto-mode-alist '("\\.doc\\'" . word-to-emacs))
;; In-place annotations
(require 'ipa)
;; Redefined to make annotations above the line
(defun ipa-set-overlay-text (overlay text)
(if (string-match ipa-annotation-id-regexp text)
(setq text (match-string 2 text)))
(save-excursion
(beginning-of-line)
(overlay-put overlay 'before-string
(if (equal text "")
""
(propertize (concat "[" text "]\n") 'face ipa-annotation-face)))))
(defun ipa-create-overlay (pos text)
(save-excursion
(goto-char pos)
(setq pos (point-at-bol))
(let ((overlay (make-overlay pos pos nil t nil)))
(ipa-set-overlay-text overlay text)
(push (cons overlay text) ipa-annotations-in-buffer)
(ipa-sort-overlays))))
(require 'htmlize)
;; Org-mode
(add-to-list 'load-path (concat elisp-root "/tools/git-emacs"))
(require 'org-install)
;; mark-stack
(add-to-list 'load-path (concat elisp-root "/tools/"))
(require 'marks)
;; dpaste
(require 'dpaste nil)
(global-set-key (kbd "C-c p") 'dpaste-region-or-buffer)
(setq dpaste-poster "Nicolas Lara")
;; slime
(setq inferior-lisp-program "/usr/bin/sbcl")
(add-to-list 'load-path (concat elisp-root "/tools/slime/"))
(require 'slime)
(add-hook 'lisp-mode-hook (lambda () (slime-mode t)))
(add-hook 'inferior-lisp-mode-hook (lambda () (inferior-slime-mode t)))
(setq inferior-lisp-program "sbcl")
(slime-setup '(slime-fancy slime-asdf))
;; Python
(add-to-list 'load-path (concat elisp-root "/tools/emacs-for-python/"))
(require 'epy-setup)
(require 'epy-python)
(require 'epy-completion)
(require 'epy-editing)
(global-linum-mode 0)
(global-hl-line-mode 0)
(ido-mode 0)
(require 'epy-bindings)
(epy-django-snippets)
(epy-setup-checker "pyflakes %f")
(setq skeleton-pair 'nil)