-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefaults.el
145 lines (125 loc) · 4.43 KB
/
defaults.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
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
(provide 'defaults)
(setq load-path (append '("~/.emacs-lisp") load-path))
(require 'keydefs)
(require 'findgrep)
(require 'comments)
;;(require 'xl)
;;; Use DDD's c-style
(require 'cdefs)
;; (c-set-style "user")
;;; Take advantage of some nice Emacs-19 features such as :
;;; auto-load hilite and paren
(progn
(load-library "paren")
(standard-display-8bit 128 255)
(line-number-mode t))
;;; We are grown-ups now ...
(put 'eval-expression 'disabled nil)
(put 'narrow-to-page 'disabled nil)
(put 'narrow-to-region 'disabled nil)
(put 'downcase-region 'disabled nil)
(setq dired-listing-switches "-lot")
(setq ps-lpr-command "/usr/bin/lp")
(setq ps-lpr-switches '("-opostscript" "-dljmx3"))
; Keep more than on backup file ... but don't keep every file
(setq version-control t)
(setq kept-old-versions 2)
(setq kept-new-versions 2)
(setq delete-old-versions t)
;;; Insert only spaces when indenting (best for the PC)
(setq-default indent-tabs-mode nil)
(setq-default tab-width 8)
(setq indent-tabs-mode nil)
;;; Some of us are sometimes lasy ...
(setq require-final-newline t)
;;; This team uses CVS ...
(setq vc-initial-comment t)
;;; Mapped on C-c p :
(defun marque-precedente ()
(interactive)
(pop-mark)
(exchange-point-and-mark))
;;; org-mode
(setq org-todo-keywords
'((sequence "TODO" "POST" "REVIEW" "|" "DONE" "ACK" "NACK" "HOLD")))
;;; Fortran mode? When did I ever use that?
(setq fortran-continuation-char ?|)
(setq fortran-do-indent 2)
(setq fortran-if-indent 2)
(setq fortran-continuation-indent 2)
(setq fortran-comment-line-column 1)
(setq fortran-comment-indent-style ())
(setq fortran-comment-indent-char ? )
(setq fortran-comment-region "C | ")
; We might still have to work with that bloody shit ...
(autoload 'wave-mode "wave"
"Major mode for edition of WAVE .pro files" t)
(setq wave-mode-hook
(function (lambda ()
(setq wave-block-indent 2
wave-continuation-indent 4
wave-minimum-statement-indent 0
wave-newline-and-indent t
wave-surround-by-blank t))))
;;; Load modes
(setq auto-mode-alist
(append '(("\\.C$" . c++-mode)
("\\.cc$" . c++-mode)
("\\.cpp$" . c++-mode)
("\\.cp$" . c++-mode)
("\\.c$" . c++-mode)
("\\.h$" . c++-mode)
("\\.y$" . c++-mode)
("\\.tbl$" . c++-mode)
("\\.adb" . ada-mode)
("\\.ads" . ada-mode)
("\\.mm" . objc-mode)
("\\.pro$" . wave-mode)
("\\.fs$" . c-mode)
("\\.vs$" . c-mode)
("\\.ax$" . lisp-mode)
("\\.s$" . ia64-asm-mode)
("\\.S$" . ia64-asm-mode)
("\\.syntax$" . xl-mode)
("\\.bytecode$" . xl-mode)
("\\.stylesheet$" . xl-mode)
("\\.pro$" . shell-script-mode)
("\\.ddd$" . xl-mode)
("\\.dds$" . xl-mode)
("\\.ddt$" . xl-mode)
("Makefile.new" . makefile-mode))
auto-mode-alist))
;;; Add some fun
(setq colors-list '(("Black" "#C0C0DA")
("Black" "#E0E5FF")
("Black" "#D0C0EE")
("Black" "#F0EEDA")
("Black" "#E0EEC0")
("Black" "#C0DAEE")
("Black" "#C0DEDA")
("Black" "#C0DEF0")
("Black" "#B0D0F0")
("Black" "#B0DAC0")
("Black" "AntiqueWhite")
("Black" "LightSkyBlue")
("Black" "PaleGreen1")
("Black" "LightPink")
("Black" "SeaGreen1")
("Black" "LightSalmon")
("Black" "LightSeaGreen")
("Black" "LightSteelBlue")
("Black" "FloralWhite")
("Black" "BlanchedAlmond")
("Black" "LightGoldenrod")
("Black" "LightCyan")
("Black" "LavenderBlush")
("Black" "LightYellow")
("Black" "PapayaWhip")
("Black" "PeachPuff")
("Black" "White")))
(defun cycle-colors ()
(interactive)
(set-foreground-color (car (car colors-list)))
(set-background-color (car (cdr (car colors-list))))
(setq colors-list (append (cdr colors-list)
(list (car colors-list)))))