author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Sun, 07 Mar 2010 15:34:05 +0200 | |
changeset 325 | 9b2144595e57 |
parent 324 | a32e3536d337 |
child 327 | 547a46ad8b19 |
permissions | -rw-r--r-- |
295 | 1 |
;; -*- mode: lisp; coding: utf-8 -*- |
6 | 2 |
;; |
279
fd6164dfec82
Update copyright statement and year.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
272
diff
changeset
|
3 |
;; Written by Oleksandr Gavenko <gavenkoa@gmail.com>, 2008-2010. |
6 | 4 |
;; |
121 | 5 |
;; This file formed from parts and ideas from many sites/docs and |
110
6b6e3f8cb371
Set copyright notice.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
109
diff
changeset
|
6 |
;; placed in public domain. |
6b6e3f8cb371
Set copyright notice.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
109
diff
changeset
|
7 |
;; |
302
e93ff9360a51
Point to README from config file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
299
diff
changeset
|
8 |
;; Config file for GNU Emacs. |
83
d2eaf2ed6d1c
Added basic jabber customization.
gavenkoa@gavenko.bifit.int
parents:
82
diff
changeset
|
9 |
;; |
302
e93ff9360a51
Point to README from config file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
299
diff
changeset
|
10 |
;; For loading order see README. |
0 | 11 |
|
12 |
;; ====================================================================== |
|
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
13 |
;; debugging. |
0 | 14 |
|
175
a505ab71060a
Make comment shorter.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
174
diff
changeset
|
15 |
;; Shut off message buffer by setting nil. |
252
330b4cdfaddf
Increase log message count.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
251
diff
changeset
|
16 |
(setq message-log-max 512) |
0 | 17 |
|
18 |
;; Set the debug option to enable a backtrace when a problem occurs. |
|
19 |
(setq debug-on-error nil) ; t/nil |
|
20 |
||
21 |
;; ====================================================================== |
|
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
22 |
;; appearance. |
0 | 23 |
|
151 | 24 |
(menu-bar-mode -1) |
25 |
(tool-bar-mode -1) |
|
26 |
(tooltip-mode -1) |
|
27 |
(scroll-bar-mode 1) |
|
0 | 28 |
|
29 |
(if window-system |
|
218
1a48dde2dfa3
See what I am typing immediately (for keystroke in minibuffer).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
217
diff
changeset
|
30 |
;; For graphical environment. |
0 | 31 |
(progn |
32 |
(set-background-color "white") |
|
33 |
(set-foreground-color "black") |
|
34 |
(set-cursor-color "brown") |
|
248 | 35 |
(setq cursor-type 'box) ; box, hollow, bar, hbar |
0 | 36 |
;;(setq blink-matching-delay 0.01) |
243
739a19c76dcc
Always blink cursor.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
242
diff
changeset
|
37 |
(blink-cursor-mode 1) |
0 | 38 |
;; (set-face-font 'default "7x14") |
177
b309d63ae93a
Set fringe-mode explicitly.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
176
diff
changeset
|
39 |
(fringe-mode 'default) |
0 | 40 |
) |
218
1a48dde2dfa3
See what I am typing immediately (for keystroke in minibuffer).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
217
diff
changeset
|
41 |
;; For tty. |
0 | 42 |
(progn |
43 |
) |
|
44 |
) |
|
45 |
||
218
1a48dde2dfa3
See what I am typing immediately (for keystroke in minibuffer).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
217
diff
changeset
|
46 |
;; See what I am typing immediately (for keystroke in minibuffer). |
1a48dde2dfa3
See what I am typing immediately (for keystroke in minibuffer).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
217
diff
changeset
|
47 |
(setq echo-keystrokes 0.2) |
1a48dde2dfa3
See what I am typing immediately (for keystroke in minibuffer).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
217
diff
changeset
|
48 |
|
85 | 49 |
;; ---------------------------------------------------------------------- |
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
50 |
;; silent runing. |
85 | 51 |
|
52 |
;; (setq inhibit-splash-screen t) ; nonexist on 21.4.1 |
|
53 |
(setq inhibit-startup-message t) |
|
54 |
||
55 |
;; ====================================================================== |
|
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
56 |
;; gnu serv, server. |
85 | 57 |
|
58 |
;; (load "~/emacs/bin/gnuserv/gnuserv.el") |
|
59 |
;; (require 'gnuserv) |
|
60 |
;; (setq gnuserv-frame (selected-frame)) |
|
61 |
||
183
6454364c25cf
Suppress error (error "The directory ~/.emacs.d/server is unsafe") on windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
182
diff
changeset
|
62 |
(require 'server) |
6454364c25cf
Suppress error (error "The directory ~/.emacs.d/server is unsafe") on windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
182
diff
changeset
|
63 |
(when (and (= emacs-major-version 23) (equal window-system 'w32)) |
6454364c25cf
Suppress error (error "The directory ~/.emacs.d/server is unsafe") on windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
182
diff
changeset
|
64 |
(defun server-ensure-safe-dir (dir) "Noop" t)) ; Suppress error directory ~/.emacs.d/server is unsafe on windows. |
6454364c25cf
Suppress error (error "The directory ~/.emacs.d/server is unsafe") on windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
182
diff
changeset
|
65 |
|
85 | 66 |
(server-start) |
67 |
||
68 |
;; (desktop-load-default) |
|
69 |
;; (desktop-read) |
|
70 |
||
0 | 71 |
;; ====================================================================== |
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
72 |
;; standart/general settings. |
0 | 73 |
|
74 |
(setq kill-whole-line t) |
|
75 |
||
76 |
;; show column & line numbers in status bar |
|
77 |
(setq column-number-mode t) |
|
78 |
(setq line-number-mode t) |
|
79 |
||
102
25585e240b4a
Move customization from .emacs (custom-set-variables) to .emacs-my. Remove duplication.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
101
diff
changeset
|
80 |
(setq view-read-only t) |
25585e240b4a
Move customization from .emacs (custom-set-variables) to .emacs-my. Remove duplication.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
101
diff
changeset
|
81 |
|
132
3f6b8e1a3656
Set frame-title-format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
127
diff
changeset
|
82 |
(setq frame-title-format "Emacs - %b") |
3f6b8e1a3656
Set frame-title-format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
127
diff
changeset
|
83 |
|
171
2f2aae1d394c
Set read-quoted-char-radix.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
169
diff
changeset
|
84 |
(setq read-quoted-char-radix 16) |
2f2aae1d394c
Set read-quoted-char-radix.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
169
diff
changeset
|
85 |
|
35
691635158df5
More pretty buffer switch and naming.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
34
diff
changeset
|
86 |
;; ---------------------------------------------------------------------- |
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
87 |
;; switching, creating, selecting buffers. |
244
5db897a3f1cd
buffer-menu better then buffer-list, but ibuffer much better.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
243
diff
changeset
|
88 |
|
34 | 89 |
(iswitchb-mode 1) |
122
680d4677e3fe
Extend innore buffers by iswitch.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
121
diff
changeset
|
90 |
(setq iswitchb-buffer-ignore nil) |
680d4677e3fe
Extend innore buffers by iswitch.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
121
diff
changeset
|
91 |
(mapc (lambda (arg) (add-to-list 'iswitchb-buffer-ignore arg)) |
680d4677e3fe
Extend innore buffers by iswitch.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
121
diff
changeset
|
92 |
'("^ " |
680d4677e3fe
Extend innore buffers by iswitch.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
121
diff
changeset
|
93 |
"^\*Buffer" |
680d4677e3fe
Extend innore buffers by iswitch.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
121
diff
changeset
|
94 |
"^\*Completions\*" |
123
7c1f68e5b898
Extend innore buffers by iswitch.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
122
diff
changeset
|
95 |
"^\*tramp" |
7c1f68e5b898
Extend innore buffers by iswitch.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
122
diff
changeset
|
96 |
"^\*Dired log\*" |
7c1f68e5b898
Extend innore buffers by iswitch.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
122
diff
changeset
|
97 |
"^\*Help\*" |
122
680d4677e3fe
Extend innore buffers by iswitch.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
121
diff
changeset
|
98 |
"^\*Quail Completions\*" |
123
7c1f68e5b898
Extend innore buffers by iswitch.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
122
diff
changeset
|
99 |
"^\*Disabled Command\*" |
7c1f68e5b898
Extend innore buffers by iswitch.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
122
diff
changeset
|
100 |
"^\*vc\*" |
7c1f68e5b898
Extend innore buffers by iswitch.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
122
diff
changeset
|
101 |
)) |
34 | 102 |
|
35
691635158df5
More pretty buffer switch and naming.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
34
diff
changeset
|
103 |
(require 'uniquify) |
691635158df5
More pretty buffer switch and naming.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
34
diff
changeset
|
104 |
(setq uniquify-buffer-name-style 'post-forward) |
691635158df5
More pretty buffer switch and naming.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
34
diff
changeset
|
105 |
|
244
5db897a3f1cd
buffer-menu better then buffer-list, but ibuffer much better.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
243
diff
changeset
|
106 |
;; buffer-menu better then buffer-list, but ibuffer much better. |
5db897a3f1cd
buffer-menu better then buffer-list, but ibuffer much better.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
243
diff
changeset
|
107 |
(global-set-key "\C-x\C-b" 'ibuffer) |
35
691635158df5
More pretty buffer switch and naming.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
34
diff
changeset
|
108 |
|
0 | 109 |
;; ---------------------------------------------------------------------- |
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
110 |
;; scrolling. |
0 | 111 |
|
127 | 112 |
(setq-default |
113 |
scroll-step 1 |
|
114 |
scroll-conservatively 100 |
|
295 | 115 |
;; При перемещении точка останавливается на расстоянии i строк к границе фрейма. |
127 | 116 |
scroll-margin 2 |
117 |
scroll-preserve-screen-position t |
|
118 |
) |
|
119 |
||
120 |
;; ---------------------------------------------------------------------- |
|
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
121 |
;; searching. |
254
51b47da56551
Highlight on search and repalce.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
253
diff
changeset
|
122 |
|
217
1c42ba3ac4ba
Case insensitive search. Group search customization together.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
216
diff
changeset
|
123 |
(setq case-fold-search t) |
1c42ba3ac4ba
Case insensitive search. Group search customization together.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
216
diff
changeset
|
124 |
|
254
51b47da56551
Highlight on search and repalce.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
253
diff
changeset
|
125 |
(setq query-replace-highlight t) ; highlight during query |
51b47da56551
Highlight on search and repalce.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
253
diff
changeset
|
126 |
(setq search-highlight t) ; highlight incremental search |
51b47da56551
Highlight on search and repalce.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
253
diff
changeset
|
127 |
|
217
1c42ba3ac4ba
Case insensitive search. Group search customization together.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
216
diff
changeset
|
128 |
;; ---------------------------------------------------------------------- |
1c42ba3ac4ba
Case insensitive search. Group search customization together.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
216
diff
changeset
|
129 |
;; *Occur* |
1c42ba3ac4ba
Case insensitive search. Group search customization together.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
216
diff
changeset
|
130 |
(global-set-key [f7] 'occur) ; Key binding as in mc |
1c42ba3ac4ba
Case insensitive search. Group search customization together.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
216
diff
changeset
|
131 |
|
1c42ba3ac4ba
Case insensitive search. Group search customization together.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
216
diff
changeset
|
132 |
;; ---------------------------------------------------------------------- |
0 | 133 |
;; *Text* |
134 |
(setq default-major-mode 'text-mode) |
|
135 |
||
136 |
;; ---------------------------------------------------------------------- |
|
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
137 |
;; syntax highlighting. |
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
138 |
|
0 | 139 |
(setq font-lock-maximum-decoration t) |
140 |
(global-font-lock-mode 1 t) |
|
141 |
||
142 |
;; ---------------------------------------------------------------------- |
|
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
143 |
;; highlight selected text. |
64
54ef0d72488f
More pretty with selecting.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
63
diff
changeset
|
144 |
|
145
b1fdfc950089
More correct code for pc-select.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
144
diff
changeset
|
145 |
;; 1/-1, when the mark is active, the region is highlighted. |
b1fdfc950089
More correct code for pc-select.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
144
diff
changeset
|
146 |
(transient-mark-mode 1) |
64
54ef0d72488f
More pretty with selecting.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
63
diff
changeset
|
147 |
(delete-selection-mode 1) ; 1/-1 |
80
bfc8c3d03527
Correct code to remove warning in *Messages* when loading .emacs-my.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
79
diff
changeset
|
148 |
|
298
9fdaecd9336d
Remove duplicated comments.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
297
diff
changeset
|
149 |
;; Order of next items is important, (assignment must done before pc-selection-mode enabled). |
145
b1fdfc950089
More correct code for pc-select.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
144
diff
changeset
|
150 |
(require 'pc-select) |
298
9fdaecd9336d
Remove duplicated comments.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
297
diff
changeset
|
151 |
(setq pc-select-selection-keys-only t) ; To avoid some key bindings as F6, etc. |
9fdaecd9336d
Remove duplicated comments.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
297
diff
changeset
|
152 |
(setq pc-select-meta-moves-sexps t) |
145
b1fdfc950089
More correct code for pc-select.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
144
diff
changeset
|
153 |
(pc-selection-mode 1) |
64
54ef0d72488f
More pretty with selecting.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
63
diff
changeset
|
154 |
|
146
506d2883199f
kill/yank func also use/update CLIPBOARD selsction on X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
145
diff
changeset
|
155 |
(when (eq window-system 'x) |
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
156 |
(setq x-select-enable-clipboard t) ; for Emacs 21.2.1 and newer |
146
506d2883199f
kill/yank func also use/update CLIPBOARD selsction on X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
145
diff
changeset
|
157 |
) |
64
54ef0d72488f
More pretty with selecting.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
63
diff
changeset
|
158 |
|
54ef0d72488f
More pretty with selecting.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
63
diff
changeset
|
159 |
;; ---------------------------------------------------------------------- |
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
160 |
;; highlighting current line. |
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
161 |
|
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
162 |
(when window-system |
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
163 |
(custom-set-faces '(hl-line ((t (:inherit highlight :background "light yellow"))))) |
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
164 |
(global-hl-line-mode 1) |
0 | 165 |
) |
166 |
||
167 |
;; ---------------------------------------------------------------------- |
|
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
168 |
;; paren, braces. |
0 | 169 |
|
170 |
(show-paren-mode 1) ; Parenthesis matching via highlighting. |
|
171 |
(setq show-paren-style (quote parenthesis)) |
|
172 |
||
173 |
;; ====================================================================== |
|
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
174 |
;; keyboard, mouse. |
0 | 175 |
|
52
b0b45dae5d8c
Now C-\ switch to win type keyboard layout.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
51
diff
changeset
|
176 |
;; cyrillic-jcuken for 567 is :,. |
b0b45dae5d8c
Now C-\ switch to win type keyboard layout.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
51
diff
changeset
|
177 |
;; russian-computer for 567 is %^& |
113
78dfaf5e7f04
cyrillic-jcuken is more pretty input method!
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
112
diff
changeset
|
178 |
(setq default-input-method 'cyrillic-jcuken) |
52
b0b45dae5d8c
Now C-\ switch to win type keyboard layout.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
51
diff
changeset
|
179 |
|
0 | 180 |
;; (pc-bindings-mode) ; Myself define keybinding, see |
181 |
||
182 |
;; ---------------------------------------------------------------------- |
|
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
183 |
;; completition. |
226
14a0e2402d66
partial-completion-mode cause bug in read-file-name with Emacs v22.3.1 (but not with v23.1).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
225
diff
changeset
|
184 |
|
14a0e2402d66
partial-completion-mode cause bug in read-file-name with Emacs v22.3.1 (but not with v23.1).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
225
diff
changeset
|
185 |
;; partial-completion-mode cause bug in read-file-name with Emacs v22.3.1 (but not with v23.1). |
14a0e2402d66
partial-completion-mode cause bug in read-file-name with Emacs v22.3.1 (but not with v23.1).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
225
diff
changeset
|
186 |
;; read-file-name used in rgrep, so I disable partial-completion-mode. |
227
cc94c73ddf20
To disable mode use -1 instead nil.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
226
diff
changeset
|
187 |
(partial-completion-mode -1) ; For example, M-x p-c-m expands to M-x partial-completion-mode |
0 | 188 |
|
189 |
;; ---------------------------------------------------------------------- |
|
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
190 |
;; mouse. |
0 | 191 |
|
192 |
;; Scroll Bar gets dragged by mouse butn 1 |
|
193 |
(global-set-key [vertical-scroll-bar down-mouse-1] 'scroll-bar-drag) |
|
194 |
;; Paste at point NOT at cursor |
|
151 | 195 |
(setq mouse-yank-at-point t) |
0 | 196 |
(mouse-wheel-mode 1) |
197 |
||
198 |
;; ---------------------------------------------------------------------- |
|
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
199 |
;; key binding, short-keys. |
0 | 200 |
|
201 |
(global-set-key [home] 'beginning-of-line) |
|
202 |
(global-set-key [end] 'end-of-line) |
|
203 |
(global-set-key [C-home] 'beginning-of-buffer) |
|
204 |
(global-set-key [C-end] 'end-of-buffer) |
|
205 |
(global-set-key [C-delete] 'kill-word) |
|
206 |
(global-set-key [delete] 'delete-char) |
|
207 |
;; (global-set-key [backspace] 'backward-delete-char-untabify) ; not work properly in *info* mode |
|
208 |
||
209 |
;; setting some f[1-12] keys |
|
210 |
(global-set-key [f1] 'help) |
|
211 |
(global-set-key [f2] 'save-buffer) |
|
2
98c662ae8707
Incremental search by F3, decr by S-F3 now. Impruved grep-find search.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
1
diff
changeset
|
212 |
;; (global-set-key [xxx] 'ediff-buffers) |
0 | 213 |
(global-set-key [f4] 'ispell-buffer) |
134
a071b60e4339
Set key binding to rename buffer.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
125
diff
changeset
|
214 |
(global-set-key [S-f6] 'rename-buffer) |
0 | 215 |
(global-set-key [f8] 'kill-this-buffer) |
216 |
(global-set-key [M-f4] 'save-buffers-kill-emacs) |
|
18
91626ebef652
Added hotkey for wrap long line.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
17
diff
changeset
|
217 |
(global-set-key [f6] 'toggle-truncate-lines) |
0 | 218 |
|
219 |
;; frames, windows manipulation, switch buffers |
|
220 |
(global-set-key [?\C-x right] 'next-buffer) |
|
221 |
(global-set-key [?\C-x left] 'previous-buffer) |
|
222 |
||
187
3a0f6acd7e2b
I usually mistype "C-x C-f" to "C-x d" or "C-x C-d", correct this.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
186
diff
changeset
|
223 |
;; I usually mistype "C-x C-f" to "C-x d" or "C-x C-d", so always use find-file, |
3a0f6acd7e2b
I usually mistype "C-x C-f" to "C-x d" or "C-x C-d", correct this.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
186
diff
changeset
|
224 |
;; because when file if directory find-file load dired, if regular file open it. |
3a0f6acd7e2b
I usually mistype "C-x C-f" to "C-x d" or "C-x C-d", correct this.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
186
diff
changeset
|
225 |
(global-set-key (kbd "C-x C-f") 'find-file) |
3a0f6acd7e2b
I usually mistype "C-x C-f" to "C-x d" or "C-x C-d", correct this.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
186
diff
changeset
|
226 |
(global-set-key (kbd "C-x C-d") 'find-file) |
3a0f6acd7e2b
I usually mistype "C-x C-f" to "C-x d" or "C-x C-d", correct this.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
186
diff
changeset
|
227 |
(global-set-key (kbd "C-x d") 'find-file) |
8
c33aa66ebb2e
Added highlight for TODO, FIXME, tabs etc.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
7
diff
changeset
|
228 |
|
0 | 229 |
(global-set-key (kbd "\e\eg") 'goto-line) |
230 |
(global-set-key (kbd "\e\er") 'query-replace-regexp) |
|
231 |
||
81
0ce6eaf6f26c
Disable C-z, it ugly.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
80
diff
changeset
|
232 |
;; Disable C-z, it ugly. |
0ce6eaf6f26c
Disable C-z, it ugly.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
80
diff
changeset
|
233 |
(if window-system (global-set-key (kbd "C-z") 'nil)) |
0ce6eaf6f26c
Disable C-z, it ugly.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
80
diff
changeset
|
234 |
|
0 | 235 |
;; (global-set-key [language-change] 'ignore) |
236 |
||
237 |
;; ====================================================================== |
|
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
238 |
;; coding system, charset, locale, lang. |
80
bfc8c3d03527
Correct code to remove warning in *Messages* when loading .emacs-my.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
79
diff
changeset
|
239 |
|
162
0ac8d1f4304d
Emacs 23.1 no longer need codepage-setup.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
157
diff
changeset
|
240 |
;; Emacs 23.1 no longer need codepage-setup. |
0ac8d1f4304d
Emacs 23.1 no longer need codepage-setup.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
157
diff
changeset
|
241 |
(when (<= emacs-major-version 22) |
0ac8d1f4304d
Emacs 23.1 no longer need codepage-setup.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
157
diff
changeset
|
242 |
(codepage-setup 866) |
0ac8d1f4304d
Emacs 23.1 no longer need codepage-setup.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
157
diff
changeset
|
243 |
(codepage-setup 1251) |
0ac8d1f4304d
Emacs 23.1 no longer need codepage-setup.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
157
diff
changeset
|
244 |
) |
0 | 245 |
|
53 | 246 |
;; Comment because prefer-coding-system will be ignored. |
247 |
;; (setq-default coding-system-for-read 'cp1251-dos) |
|
248 |
;; (setq-default coding-system-for-write 'cp1251-dos) |
|
0 | 249 |
|
250 |
;; (setq locale-coding-system 'cp1251-dos) |
|
251 |
;; (set-terminal-coding-system 'cp1251) |
|
252 |
;; (set-keyboard-coding-system 'cp1251) |
|
253 |
||
254 |
(prefer-coding-system 'koi8-r-dos) |
|
255 |
(prefer-coding-system 'utf-16-le) |
|
256 |
(prefer-coding-system 'cp866-dos) |
|
4
46543c097be0
Transfer changer from .eamcs_unix, add case for w32 or other system.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
3
diff
changeset
|
257 |
|
46543c097be0
Transfer changer from .eamcs_unix, add case for w32 or other system.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
3
diff
changeset
|
258 |
(modify-coding-system-alist 'file "\\.el" 'iso-2022-7bit) |
192
8b4811c64ec4
Correct copy/paste coding in windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
191
diff
changeset
|
259 |
(cond |
106
0591d06cf752
Решил проблему copy/paste в X. Решил проблему поиска в UTF-8 буфере.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
260 |
((equal window-system 'w32) ; also (string-equal system-type "windows-nt") |
4
46543c097be0
Transfer changer from .eamcs_unix, add case for w32 or other system.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
3
diff
changeset
|
261 |
(progn |
192
8b4811c64ec4
Correct copy/paste coding in windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
191
diff
changeset
|
262 |
(set-selection-coding-system 'utf-16le-dos) |
106
0591d06cf752
Решил проблему copy/paste в X. Решил проблему поиска в UTF-8 буфере.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
263 |
(prefer-coding-system 'utf-8-unix) |
0591d06cf752
Решил проблему copy/paste в X. Решил проблему поиска в UTF-8 буфере.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
264 |
(prefer-coding-system 'cp1251-dos) |
0591d06cf752
Решил проблему copy/paste в X. Решил проблему поиска в UTF-8 буфере.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
265 |
)) |
0591d06cf752
Решил проблему copy/paste в X. Решил проблему поиска в UTF-8 буфере.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
266 |
((equal window-system 'x) |
0591d06cf752
Решил проблему copy/paste в X. Решил проблему поиска в UTF-8 буфере.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
267 |
(progn |
4
46543c097be0
Transfer changer from .eamcs_unix, add case for w32 or other system.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
3
diff
changeset
|
268 |
(prefer-coding-system 'cp1251-dos) |
46543c097be0
Transfer changer from .eamcs_unix, add case for w32 or other system.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
3
diff
changeset
|
269 |
(prefer-coding-system 'utf-8-unix) |
259
b6c514e81d2c
ctext-with-extensions is alias for ctext-with-extensions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
256
diff
changeset
|
270 |
(setq selection-coding-system 'compound-text-with-extensions) |
106
0591d06cf752
Решил проблему copy/paste в X. Решил проблему поиска в UTF-8 буфере.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
271 |
(setq x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING)) |
4
46543c097be0
Transfer changer from .eamcs_unix, add case for w32 or other system.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
3
diff
changeset
|
272 |
(modify-coding-system-alist 'process ".*" 'utf-8-unix) |
106
0591d06cf752
Решил проблему copy/paste в X. Решил проблему поиска в UTF-8 буфере.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
273 |
)) |
0591d06cf752
Решил проблему copy/paste в X. Решил проблему поиска в UTF-8 буфере.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
274 |
(t |
0591d06cf752
Решил проблему copy/paste в X. Решил проблему поиска в UTF-8 буфере.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
275 |
(progn |
0591d06cf752
Решил проблему copy/paste в X. Решил проблему поиска в UTF-8 буфере.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
276 |
;; (set-selection-coding-system 'utf-8-unix) |
0591d06cf752
Решил проблему copy/paste в X. Решил проблему поиска в UTF-8 буфере.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
277 |
(prefer-coding-system 'cp1251-dos) |
0591d06cf752
Решил проблему copy/paste в X. Решил проблему поиска в UTF-8 буфере.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
278 |
(prefer-coding-system 'utf-8-unix) |
0591d06cf752
Решил проблему copy/paste в X. Решил проблему поиска в UTF-8 буфере.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
279 |
(modify-coding-system-alist 'process ".*" 'utf-8-unix) |
0591d06cf752
Решил проблему copy/paste в X. Решил проблему поиска в UTF-8 буфере.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
280 |
)) |
4
46543c097be0
Transfer changer from .eamcs_unix, add case for w32 or other system.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
3
diff
changeset
|
281 |
) |
0 | 282 |
|
283 |
;; XXXXXXXXXXXXXXXXXXXXXXXX |
|
284 |
||
285 |
;; To open from command line file, which names has extended opcode |
|
286 |
;; (set-file-name-coding-system 'cp1251) |
|
287 |
||
52
b0b45dae5d8c
Now C-\ switch to win type keyboard layout.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
51
diff
changeset
|
288 |
;; (set-language-environment "Russian") ; XXX not used as set default coding system to koi8-r. |
0 | 289 |
|
290 |
;; ====================================================================== |
|
291 |
;; |
|
292 |
;; NON-STANDARD VARIABLES |
|
293 |
||
294 |
;; ====================================================================== |
|
295 |
;; |
|
296 |
;; STANDARD VARIABLES |
|
297 |
||
298 |
(if (boundp 'confirm-kill-emacs) |
|
299 |
(setq confirm-kill-emacs 'yes-or-no-p)) |
|
300 |
||
301 |
;; Try to speed things up, especially in VM. |
|
302 |
(setq gc-cons-threshold 2000000) |
|
303 |
||
304 |
;; Don't beep in my headphones! |
|
84 | 305 |
(setq ring-bell-function '(lambda () "Empty ring-bell-function." nil)) |
306 |
(setq visible-bell t) ; With default ring-bell-function in text terminal |
|
307 |
; revert screen if press [end] or [home] |
|
0 | 308 |
|
309 |
;; Prompt before evaluating local bits of lisp. This stops people |
|
310 |
;; putting things at the end of files which delete all your files! |
|
311 |
(setq enable-local-variables t |
|
312 |
enable-local-eval 1) |
|
313 |
||
314 |
;; ====================================================================== |
|
315 |
;; STANDARD LIBRARIES |
|
316 |
||
240
77b01720a256
Enable image if supported.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
239
diff
changeset
|
317 |
;; ---------------------------------------------------------------------- |
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
318 |
;; dired. |
241
78cbd4c692ee
Added dired settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
240
diff
changeset
|
319 |
|
78cbd4c692ee
Added dired settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
240
diff
changeset
|
320 |
(setq dired-dwim-target t) |
78cbd4c692ee
Added dired settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
240
diff
changeset
|
321 |
;; dangerous |
78cbd4c692ee
Added dired settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
240
diff
changeset
|
322 |
;; (setq |
78cbd4c692ee
Added dired settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
240
diff
changeset
|
323 |
;; dired-recursive-copies 'top |
78cbd4c692ee
Added dired settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
240
diff
changeset
|
324 |
;; dired-recursive-deletes 'top) |
78cbd4c692ee
Added dired settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
240
diff
changeset
|
325 |
|
78cbd4c692ee
Added dired settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
240
diff
changeset
|
326 |
;; ---------------------------------------------------------------------- |
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
327 |
;; compression, archive. |
240
77b01720a256
Enable image if supported.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
239
diff
changeset
|
328 |
|
0 | 329 |
(require 'jka-compr) ; Automatic decompression, hooks for tar-mode. |
330 |
(if (fboundp 'auto-compression-mode) |
|
331 |
(auto-compression-mode 1)) |
|
332 |
||
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
333 |
(modify-coding-system-alist 'file "\\.\\(war\\|ear\\|sar\\|egg\\)\\'" 'no-conversion) |
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
334 |
|
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
335 |
(add-to-list 'auto-mode-alist '("\\.\\(war\\|ear\\|sar\\|egg\\)\\'" . archive-mode)) |
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
336 |
|
0 | 337 |
;; ---------------------------------------------------------------------- |
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
338 |
;; image. |
240
77b01720a256
Enable image if supported.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
239
diff
changeset
|
339 |
|
77b01720a256
Enable image if supported.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
239
diff
changeset
|
340 |
(when (fboundp 'auto-image-file-mode) |
77b01720a256
Enable image if supported.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
239
diff
changeset
|
341 |
(auto-image-file-mode 1)) |
77b01720a256
Enable image if supported.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
239
diff
changeset
|
342 |
|
77b01720a256
Enable image if supported.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
239
diff
changeset
|
343 |
;; ---------------------------------------------------------------------- |
0 | 344 |
;; *Recentf* |
109
75b4bf140e73
Prevent TRAMP to login on remote host when loading.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
108
diff
changeset
|
345 |
|
0 | 346 |
(require 'recentf) |
109
75b4bf140e73
Prevent TRAMP to login on remote host when loading.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
108
diff
changeset
|
347 |
;; Prevent TRAMP to login on remote host when loading. |
75b4bf140e73
Prevent TRAMP to login on remote host when loading.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
108
diff
changeset
|
348 |
;; Its take time and ask passwords! |
75b4bf140e73
Prevent TRAMP to login on remote host when loading.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
108
diff
changeset
|
349 |
(setq recentf-auto-cleanup 'never) |
0 | 350 |
(recentf-mode t) |
351 |
(setq recentf-max-saved-items 200) |
|
352 |
(global-set-key (kbd "\e\eq") 'recentf-open-files) |
|
353 |
||
354 |
;; ---------------------------------------------------------------------- |
|
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
355 |
;; revert buffer. |
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
356 |
|
0 | 357 |
(global-set-key [f5] 'revert-buffer) |
358 |
(setq revert-without-query (quote (".*"))) |
|
359 |
(setq auto-revert-interval 2) |
|
360 |
||
361 |
;; ====================================================================== |
|
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
362 |
;; convenient. |
0 | 363 |
|
230
b34c94fa13d9
Added func to calculate region length.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
229
diff
changeset
|
364 |
(defun reglen() |
b34c94fa13d9
Added func to calculate region length.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
229
diff
changeset
|
365 |
"Show region length." |
b34c94fa13d9
Added func to calculate region length.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
229
diff
changeset
|
366 |
(interactive) |
b34c94fa13d9
Added func to calculate region length.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
229
diff
changeset
|
367 |
(message "%s" (- (region-end) (region-beginning)))) |
b34c94fa13d9
Added func to calculate region length.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
229
diff
changeset
|
368 |
|
0 | 369 |
;; ---------------------------------------------------------------------- |
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
370 |
;; minibuffer. |
153
a03216c9fa8c
Delete dust. Correct 'completion-ignored-extensions' list.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
371 |
|
0 | 372 |
(require 'icomplete) ; Interactive completion in minibuffer. |
153
a03216c9fa8c
Delete dust. Correct 'completion-ignored-extensions' list.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
373 |
(icomplete-mode 1) |
0 | 374 |
|
228
f55559c1ce8e
Do not redefine completion-ignored-extensions, instead append new values.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
227
diff
changeset
|
375 |
(mapc (lambda (ext) (add-to-list 'completion-ignored-extensions ext)) |
f55559c1ce8e
Do not redefine completion-ignored-extensions, instead append new values.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
227
diff
changeset
|
376 |
'( |
f55559c1ce8e
Do not redefine completion-ignored-extensions, instead append new values.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
227
diff
changeset
|
377 |
".class" "~" ".aux" |
f55559c1ce8e
Do not redefine completion-ignored-extensions, instead append new values.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
227
diff
changeset
|
378 |
".o" ".obj" ".map" ".lib" ".lo" ".la" ".a" ".bin" ".exe" |
f55559c1ce8e
Do not redefine completion-ignored-extensions, instead append new values.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
227
diff
changeset
|
379 |
;; Place dir at end to appear at the start of completion-ignored-extensions. |
f55559c1ce8e
Do not redefine completion-ignored-extensions, instead append new values.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
227
diff
changeset
|
380 |
"CVS/" ".hg/" ".svn/" ".git/" ".bzr/" |
f55559c1ce8e
Do not redefine completion-ignored-extensions, instead append new values.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
227
diff
changeset
|
381 |
) ) |
0 | 382 |
|
383 |
;; ---------------------------------------------------------------------- |
|
384 |
;; *grep* |
|
385 |
(setq grep-command "find . -name '*' -exec grep -nH '' {} ;" |
|
223
64c9bc1e5847
Added .git for exclude from grep find.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
222
diff
changeset
|
386 |
grep-find-command "find . '(' -name .svn -o -name CVS -o -name .hg -o -name _darcs -o -name .git ')' -prune -o -type f -name '*' -print0 | xargs -0 -e grep -nH " |
5
ddf0660702ec
Correct work grep-find for grep then do not understand --color.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
4
diff
changeset
|
387 |
grep-highlight-matches nil ; do not set t because some grep do not has --color options |
0 | 388 |
grep-use-null-device t) |
389 |
||
390 |
;; ---------------------------------------------------------------------- |
|
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
391 |
;; music. |
0 | 392 |
(setq gnus-audio-au-player "winamp.exe" |
393 |
gnus-audio-directory "D:\\music" |
|
394 |
gnus-audio-wav-player "winamp.exe") |
|
395 |
||
97
fe4102cad849
Open egg files as archive.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
92
diff
changeset
|
396 |
;; ---------------------------------------------------------------------- |
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
397 |
;; browser. |
98
5223817dad90
Use mozilla browser. Not tested for Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
97
diff
changeset
|
398 |
|
138
90fda97adcb1
Setup browse-url func for linux and windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
120
diff
changeset
|
399 |
(cond |
90fda97adcb1
Setup browse-url func for linux and windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
120
diff
changeset
|
400 |
((equal window-system 'w32) |
90fda97adcb1
Setup browse-url func for linux and windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
120
diff
changeset
|
401 |
(setq browse-url-browser-function 'browse-url-default-windows-browser)) |
90fda97adcb1
Setup browse-url func for linux and windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
120
diff
changeset
|
402 |
(t |
90fda97adcb1
Setup browse-url func for linux and windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
120
diff
changeset
|
403 |
(setq browse-url-browser-function 'browse-url-mozilla))) |
98
5223817dad90
Use mozilla browser. Not tested for Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
97
diff
changeset
|
404 |
|
0 | 405 |
;; ---------------------------------------------------------------------- |
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
406 |
;; time. |
116 | 407 |
|
120
5b02710b7ffc
display-time-format " %H:%M " sometimes buggy.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
119
diff
changeset
|
408 |
;; Also useful such format: |
5b02710b7ffc
display-time-format " %H:%M " sometimes buggy.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
119
diff
changeset
|
409 |
;; (setq display-time-format " %H:%M %d-%m-%y ") |
125
8d96347feb02
Dont show load average.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
124
diff
changeset
|
410 |
(setq display-time-24hr-format t) |
8d96347feb02
Dont show load average.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
124
diff
changeset
|
411 |
(setq display-time-default-load-average nil) |
246 | 412 |
(display-time) ; display-time-mode |
0 | 413 |
|
414 |
;; ---------------------------------------------------------------------- |
|
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
415 |
;; calendar. |
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
416 |
|
0 | 417 |
;; (setq mark-holidays-in-calendar t) |
418 |
;; (setq all-christian-calendar-holidays t) |
|
419 |
;; (setq calendar-date-display-form (quote ((format "%04s-%02d-%02d" year (string-to-int month) (string-to-int day))))) |
|
420 |
;; (setq calendar-time-display-form (quote (24-hours ":" minutes (if time-zone " (") time-zone (if time-zone ")")))) |
|
49
71cec5d9c60f
Set week start with Monday.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
48
diff
changeset
|
421 |
(setq calendar-week-start-day 1) |
71cec5d9c60f
Set week start with Monday.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
48
diff
changeset
|
422 |
(setq european-calendar-style t) |
0 | 423 |
|
424 |
;; ====================================================================== |
|
425 |
;; |
|
426 |
;; STANDARD HOOKS |
|
427 |
||
428 |
(add-hook 'write-file-hooks 'time-stamp) |
|
429 |
||
430 |
;; ====================================================================== |
|
7
8eae4300e86f
Перебил сочетание клавиш C-x C-d для вызова dired, вместо dir-list.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
6
diff
changeset
|
431 |
;; *auto-fill* |
0 | 432 |
|
102
25585e240b4a
Move customization from .emacs (custom-set-variables) to .emacs-my. Remove duplication.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
101
diff
changeset
|
433 |
(setq-default fill-column 78) |
25585e240b4a
Move customization from .emacs (custom-set-variables) to .emacs-my. Remove duplication.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
101
diff
changeset
|
434 |
|
148
7df64d2c9f3d
Remove unused key binding. Added more docs.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
147
diff
changeset
|
435 |
;; By default used American convention - sentence and with two spaces. Change |
7df64d2c9f3d
Remove unused key binding. Added more docs.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
147
diff
changeset
|
436 |
;; it to one space. Has affect on filling and M-a, M-e commands. |
102
25585e240b4a
Move customization from .emacs (custom-set-variables) to .emacs-my. Remove duplication.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
101
diff
changeset
|
437 |
(setq sentence-end-double-space nil) |
25585e240b4a
Move customization from .emacs (custom-set-variables) to .emacs-my. Remove duplication.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
101
diff
changeset
|
438 |
|
0 | 439 |
;; Turn on auto-fill mode |
440 |
(add-hook 'html-mode-hook 'turn-on-auto-fill) |
|
102
25585e240b4a
Move customization from .emacs (custom-set-variables) to .emacs-my. Remove duplication.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
101
diff
changeset
|
441 |
(add-hook 'text-mode-hook 'turn-on-auto-fill) |
0 | 442 |
|
443 |
;; ---------------------------------------------------------------------- |
|
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
444 |
;; unknown. |
0 | 445 |
|
233
dbef8d59a7c1
Remove old unknow desire function.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
232
diff
changeset
|
446 |
;; browse-url mailcrypt gnus message sendmail bbdb pilot bibtex eiffel-mode emacs-w3m |
dbef8d59a7c1
Remove old unknow desire function.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
232
diff
changeset
|
447 |
;; eudc filladapt hugs-mode mpg123 php-mode ps-print |
dbef8d59a7c1
Remove old unknow desire function.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
232
diff
changeset
|
448 |
;; chord-mode - edit guitar music |
dbef8d59a7c1
Remove old unknow desire function.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
232
diff
changeset
|
449 |
;; discography - variant of BibTeX mode for discographies |
0 | 450 |
|
451 |
;; ====================================================================== |
|
452 |
;; unNOVICEd commands... |
|
453 |
;; |
|
154 | 454 |
;; The following commands are usually disabled by default. Enable them... |
0 | 455 |
|
456 |
(put 'eval-expression 'disabled nil) |
|
457 |
(put 'downcase-region 'disabled nil) |
|
458 |
(put 'upcase-region 'disabled nil) |
|
459 |
(put 'narrow-to-page 'disabled nil) |
|
460 |
(put 'narrow-to-region 'disabled nil) |
|
256 | 461 |
(put 'scroll-left 'disabled nil) |
0 | 462 |
|
463 |
;; ====================================================================== |
|
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
464 |
;; TEX. |
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
465 |
|
0 | 466 |
(setq tex-run-command "initex") |
467 |
||
468 |
;; ====================================================================== |
|
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
469 |
;; AUC TeX. |
0 | 470 |
|
471 |
;(add-hook 'LaTeX-mode-hook 'LaTeX-install-toolbar) |
|
472 |
;; (setq TeX-parse-self t) ; Enable parse on load. |
|
473 |
;; (setq TeX-auto-save t) ; Enable parse on save. |
|
474 |
;; (setq-default TeX-master nil) ; Query for master file. Finally, if you often use \include or \input, you should make AUCTEX aware of the multi-file document structure |
|
475 |
||
476 |
;(setq TeX-PDF-mode t) |
|
477 |
;(setq TeX-interactive-mode t) |
|
478 |
;(setq TeX-source-specials-mode 1) |
|
479 |
||
480 |
;;; some more menu entries in the command list: |
|
481 |
;;; see tex-mik.el from package auctex: %v is defined in tex-mik.el |
|
482 |
;;; other variables are defined in tex.el from auctex |
|
483 |
;;; the meaning of some auctex-varibles: |
|
484 |
;symbols defined in tex.el and tex-mik.el: |
|
485 |
;%b name slave tex-file %t name master tex-file |
|
486 |
;%d dvi-file %f ps-file |
|
487 |
;%l "latex --src-specials" |
|
488 |
;%n line number %p printcommand %q "lpq" |
|
489 |
;%r (TeX-style-check TeX-print-style) |
|
490 |
;%s master-file-name without extention |
|
491 |
;%v yap command view line |
|
492 |
;(eval-after-load "tex" |
|
493 |
; '(progn |
|
494 |
; (add-to-list 'TeX-command-list |
|
9 | 495 |
; (list "->PS landscape for pdf" |
496 |
; "dvips %d -N0 -Ppdf -G0 -T 297mm,210mm -o %f " |
|
497 |
; 'TeX-run-command nil t)) |
|
0 | 498 |
; (add-to-list 'TeX-command-list |
9 | 499 |
; (list "All Texify run-viewer" |
500 |
; "texify --tex-opt=--src --run-viewer --clean %s.tex" |
|
501 |
; 'TeX-run-command nil t)))) |
|
0 | 502 |
|
503 |
;; ====================================================================== |
|
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
504 |
;; Reftex activation (Reftex is included with Emacs 21.1). |
0 | 505 |
|
506 |
;; (autoload 'reftex-mode "reftex" "RefTeX Minor Mode" t) |
|
507 |
;; (autoload 'turn-on-reftex "reftex" "RefTeX Minor Mode" nil) |
|
508 |
;; (autoload 'reftex-citation "reftex-cite" "Make citation" nil) |
|
509 |
;; (autoload 'reftex-index-phrase-mode "reftex-index" "Phrase mode" t) |
|
510 |
;; (add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; with AUCTeX LaTeX mode |
|
511 |
;; (add-hook 'latex-mode-hook 'turn-on-reftex) ; with Emacs latex mode |
|
512 |
||
513 |
;; ====================================================================== |
|
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
514 |
;; PreviewLatex. |
0 | 515 |
|
516 |
;(load "preview-latex.el" nil t t) |
|
517 |
||
518 |
;(add-hook 'LaTeX-mode-hook #'LaTeX-preview-setup) |
|
519 |
;(autoload 'LaTeX-preview-setup "preview") |
|
520 |
||
521 |
;; ====================================================================== |
|
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
522 |
;; Info. |
0 | 523 |
|
323
7a7dc2befa99
Because of Debian policy documentation covered by FDL license with invariant sections not allowed in packet
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
322
diff
changeset
|
524 |
;; Because of Debian policy documentation covered by FDL license with invariant sections not allowed in packet |
324 | 525 |
;; repository tree. So it must be installed manually. My usual configuration is install user local software |
323
7a7dc2befa99
Because of Debian policy documentation covered by FDL license with invariant sections not allowed in packet
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
322
diff
changeset
|
526 |
;; into ~/usr DISTDIR. |
7a7dc2befa99
Because of Debian policy documentation covered by FDL license with invariant sections not allowed in packet
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
322
diff
changeset
|
527 |
(unless (getenv "INFOPATH") |
7a7dc2befa99
Because of Debian policy documentation covered by FDL license with invariant sections not allowed in packet
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
322
diff
changeset
|
528 |
(setenv "INFOPATH" "~/usr/share/info:")) |
7a7dc2befa99
Because of Debian policy documentation covered by FDL license with invariant sections not allowed in packet
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
322
diff
changeset
|
529 |
|
0 | 530 |
;; ====================================================================== |
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
531 |
;; man, woman. |
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
532 |
|
156
55aed5f25591
Added customisation for woman.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
143
diff
changeset
|
533 |
(setq woman-use-own-frame nil) |
55aed5f25591
Added customisation for woman.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
143
diff
changeset
|
534 |
(setq woman-fill-frame t) |
55aed5f25591
Added customisation for woman.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
143
diff
changeset
|
535 |
|
55aed5f25591
Added customisation for woman.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
143
diff
changeset
|
536 |
;; ====================================================================== |
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
537 |
;; shell, sh, bash. |
0 | 538 |
|
202
a89804893475
Remove duplicated string.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
200
diff
changeset
|
539 |
;; Setup Emacs to run bash as its primary shell. |
0 | 540 |
;; (setq binary-process-input t) |
541 |
;; (setq shell-file-name "bash") |
|
542 |
;; (setq shell-command-switch "-c") |
|
543 |
;; (setenv "SHELL" shell-file-name) |
|
544 |
||
207 | 545 |
(when (eq window-system 'w32) ; may require Cygwin or MSYS |
229
0a42b3480404
Use bash as primary shell.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
228
diff
changeset
|
546 |
(setenv "ESHELL" "bash") |
0a42b3480404
Use bash as primary shell.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
228
diff
changeset
|
547 |
;; (setq explicit-shell-file-name "bash") |
0a42b3480404
Use bash as primary shell.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
228
diff
changeset
|
548 |
;; (setq shell-file-name "bash") |
211
a07b53a7b415
Don't cd to home dir by C-x shell (removed "--login" switch from args).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
208
diff
changeset
|
549 |
(setq explicit-bash-args '("-i")) |
a07b53a7b415
Don't cd to home dir by C-x shell (removed "--login" switch from args).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
208
diff
changeset
|
550 |
(setq explicit-sh-args '("-i")) |
237
39054eb39d27
Added workaround to allow find-dired worked in Windows when interacrive shell
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
215
diff
changeset
|
551 |
;; Here is workaround: when explicit-shell-file-name is "bash" and shell-file-name is "cmdproxy.exe" |
39054eb39d27
Added workaround to allow find-dired worked in Windows when interacrive shell
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
215
diff
changeset
|
552 |
;; find-dired incorrect quote args (in shell-quote-argument (w32-shell-name) return "bash", but |
39054eb39d27
Added workaround to allow find-dired worked in Windows when interacrive shell
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
215
diff
changeset
|
553 |
;; shell-command used shell-file-name which value "cmdproxy.exe"). So I put additional space in pattern to |
39054eb39d27
Added workaround to allow find-dired worked in Windows when interacrive shell
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
215
diff
changeset
|
554 |
;; prevent quoting. |
39054eb39d27
Added workaround to allow find-dired worked in Windows when interacrive shell
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
215
diff
changeset
|
555 |
(setq find-ls-option '("-exec ls -ld {} ;" . "-ld")) |
211
a07b53a7b415
Don't cd to home dir by C-x shell (removed "--login" switch from args).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
208
diff
changeset
|
556 |
) |
1
30e99e01ddc4
add auto-mode-alist for bat-files and load mercurial
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
0
diff
changeset
|
557 |
|
0 | 558 |
;; ====================================================================== |
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
559 |
;; spell, ispall, aspell. |
0 | 560 |
|
105
52a334c6c908
As spell programm use ispell.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
104
diff
changeset
|
561 |
(setq ispell-program-name "ispell") |
0 | 562 |
;(setq ispell-dictionary "russianw"); default dictionary |
563 |
;(setq ispell-local-dictionary "russianw"); default dictionary |
|
564 |
;(add-hook 'text-mode-hook 'flyspell-mode) |
|
565 |
;(setq flyspell-default-dictionary "russianw") |
|
566 |
;(setq flyspell-delay '1) |
|
567 |
;; (setq ispell-local-dictionary-alist |
|
9 | 568 |
;; '((nil ; default (english.aff) |
0 | 569 |
;; "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B") nil iso-8859-1) |
9 | 570 |
;; ("UK-xlg" ; english large version |
0 | 571 |
;; "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B" "-d" "UK-xlg") nil iso-8859-1) |
9 | 572 |
;; ("US-xlg" ; american large version |
0 | 573 |
;; "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B" "-d" "US-xlg") nil iso-8859-1) |
574 |
;; ) |
|
575 |
;; ) |
|
576 |
||
577 |
;; ====================================================================== |
|
67
33caed66cee4
Set align for org-mode tags.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
66
diff
changeset
|
578 |
;; GTD, PIM, organize, todo mode. |
48
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
579 |
|
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
580 |
;; ---------------------------------------------------------------------- |
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
581 |
;; org-mode. |
79
f80cd58e09cb
Use buildin and installed version of org-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
78
diff
changeset
|
582 |
|
108
1559bb79bdd1
Enable org mode for >= emacs22.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
107
diff
changeset
|
583 |
(if (>= emacs-major-version 22) |
1559bb79bdd1
Enable org mode for >= emacs22.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
107
diff
changeset
|
584 |
(progn |
1559bb79bdd1
Enable org mode for >= emacs22.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
107
diff
changeset
|
585 |
(require 'org) |
1559bb79bdd1
Enable org mode for >= emacs22.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
107
diff
changeset
|
586 |
)) |
1559bb79bdd1
Enable org mode for >= emacs22.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
107
diff
changeset
|
587 |
|
295 | 588 |
;; XXX org-todo-keywords '((sequence "TODO" "START" "|" "DONE")) for org-version 4.67c |
589 |
;; XXX (setq org-todo-keywords '("TODO" "START" "DONE")) for org-version 6.05b |
|
79
f80cd58e09cb
Use buildin and installed version of org-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
78
diff
changeset
|
590 |
(if (or (featurep 'org) (featurep 'org-install)) |
48
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
591 |
(progn |
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
592 |
(add-to-list 'auto-mode-alist '("\\.org$" . org-mode)) |
66
661801050393
Store all org-mode file in .gtd dirs.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
65
diff
changeset
|
593 |
(setq org-directory (expand-file-name "~/.gtd")) |
661801050393
Store all org-mode file in .gtd dirs.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
65
diff
changeset
|
594 |
(setq org-default-notes-file (expand-file-name "~/.gtd/notes")) |
74
55deb80345ab
Some enhancement for org-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
73
diff
changeset
|
595 |
(setq org-agenda-ndays 14 |
55deb80345ab
Some enhancement for org-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
73
diff
changeset
|
596 |
org-deadline-warning-days 7 |
48
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
597 |
org-agenda-show-all-dates t |
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
598 |
org-agenda-skip-deadline-if-done t |
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
599 |
org-agenda-skip-scheduled-if-done t |
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
600 |
org-agenda-start-on-weekday nil |
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
601 |
org-reverse-note-order t |
74
55deb80345ab
Some enhancement for org-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
73
diff
changeset
|
602 |
org-hide-leading-stars t |
67
33caed66cee4
Set align for org-mode tags.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
66
diff
changeset
|
603 |
org-tags-column 64 |
33caed66cee4
Set align for org-mode tags.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
66
diff
changeset
|
604 |
) |
69
754d413dcff2
Aded global key binding for GTD.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
68
diff
changeset
|
605 |
(define-key global-map "\C-ca" 'org-agenda) |
66
661801050393
Store all org-mode file in .gtd dirs.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
65
diff
changeset
|
606 |
(setq org-agenda-files '("~/.gtd/todo.org")) )) |
48
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
607 |
|
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
608 |
;; ---------------------------------------------------------------------- |
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
609 |
;; remember-mode. |
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
610 |
|
68 | 611 |
(if (featurep 'remember) |
612 |
(progn |
|
613 |
(setq remember-annotation-functions '(org-remember-annotation)) |
|
614 |
(setq remember-handler-functions '(org-remember-handler)) |
|
615 |
(add-hook 'remember-mode-hook 'org-remember-apply-template) |
|
69
754d413dcff2
Aded global key binding for GTD.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
68
diff
changeset
|
616 |
(define-key global-map "\C-cr" 'org-remember) |
68 | 617 |
(setq org-remember-templates |
76
3b9b47be4951
With one item emacs do not prompt choose template.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
75
diff
changeset
|
618 |
;; With one item emacs do not prompt choose template. |
70
e0962e157772
Correct path to GTD files.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
69
diff
changeset
|
619 |
'((?t "* TODO %?" "~/.gtd/todo.org") |
76
3b9b47be4951
With one item emacs do not prompt choose template.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
75
diff
changeset
|
620 |
;; (?j "* %^{topic}\n %T\n" "~/.gtd/journal.org") |
72
03586585c558
Move customization to right place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
70
diff
changeset
|
621 |
)) |
03586585c558
Move customization to right place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
70
diff
changeset
|
622 |
(setq |
03586585c558
Move customization to right place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
70
diff
changeset
|
623 |
org-remember-store-without-prompt t |
03586585c558
Move customization to right place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
70
diff
changeset
|
624 |
) )) |
68 | 625 |
|
242
f40b0846b225
Set indicate-empty-lines.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
241
diff
changeset
|
626 |
;; ====================================================================== |
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
627 |
;; whitespaces. |
242
f40b0846b225
Set indicate-empty-lines.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
241
diff
changeset
|
628 |
|
f40b0846b225
Set indicate-empty-lines.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
241
diff
changeset
|
629 |
(setq-default show-trailing-whitespace t) |
f40b0846b225
Set indicate-empty-lines.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
241
diff
changeset
|
630 |
(setq-default indicate-empty-lines t) |
251
99a4fc940294
Disallow creation of new lines when you press the "arrow-down key" at end of the buffer.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
250
diff
changeset
|
631 |
(setq next-line-add-newlines nil) |
242
f40b0846b225
Set indicate-empty-lines.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
241
diff
changeset
|
632 |
|
255 | 633 |
;; See also 'mode-require-final-newline'. |
634 |
(add-hook 'text-mode-hook (lambda () (setq require-final-newline nil))) |
|
635 |
||
68 | 636 |
;; ---------------------------------------------------------------------- |
48
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
637 |
;; TODO, XXX, FIXME highlight. |
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
638 |
;; Show blanks and FIXME |
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
639 |
;; http://www.emacswiki.org/cgi-bin/wiki/EightyColumnRule |
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
640 |
|
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
641 |
(defface my-tab-face |
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
642 |
'((t :background "gray")) |
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
643 |
"Face for showing TABs." |
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
644 |
:group 'basic-faces) |
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
645 |
|
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
646 |
(defface my-conflict-face |
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
647 |
'((t :background "pink" :foreground "red" :weight bold)) |
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
648 |
"Font for showing conflicts." |
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
649 |
:group 'basic-faces) |
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
650 |
|
144
41a4cd881b9e
Added makfile-mode to list for highlighting TABs.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
143
diff
changeset
|
651 |
(defvar my-devel-mode-list |
41a4cd881b9e
Added makfile-mode to list for highlighting TABs.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
143
diff
changeset
|
652 |
'(sh-mode script-mode java-mode c-mode outline-mode text-mode |
41a4cd881b9e
Added makfile-mode to list for highlighting TABs.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
143
diff
changeset
|
653 |
lisp-mode makefile-mode makefile-gmake-mode python-mode) |
41a4cd881b9e
Added makfile-mode to list for highlighting TABs.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
143
diff
changeset
|
654 |
"List of development modes." ) |
41a4cd881b9e
Added makfile-mode to list for highlighting TABs.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
143
diff
changeset
|
655 |
|
48
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
656 |
(add-hook 'font-lock-mode-hook (function (lambda () |
232
ea69943781db
Simplify expression.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
231
diff
changeset
|
657 |
(when (member major-mode my-devel-mode-list) |
48
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
658 |
(font-lock-add-keywords nil |
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
659 |
'( |
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
660 |
("\t+" 0 'my-tab-face t) |
322
b1bd2648b826
'my-todo-face' deleted. Standard 'font-lock-warning-face' used instead.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
303
diff
changeset
|
661 |
("\\<\\(FIXME:?\\|XXX:?\\|TODO:?\\)\\>" 1 'font-lock-warning-face t) |
48
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
662 |
("\\(=\\{7,\\}\\|<\\{7,\\}\\|>\\{7,\\}\\)" 1 'my-conflict-face t) |
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
663 |
)))))) |
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
664 |
|
284
bf5829d9bbf7
Another way to register TODO highlighting.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
280
diff
changeset
|
665 |
;; (dolist (mode '(c-mode |
bf5829d9bbf7
Another way to register TODO highlighting.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
280
diff
changeset
|
666 |
;; java-mode |
bf5829d9bbf7
Another way to register TODO highlighting.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
280
diff
changeset
|
667 |
;; cperl-mode |
bf5829d9bbf7
Another way to register TODO highlighting.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
280
diff
changeset
|
668 |
;; html-mode-hook |
bf5829d9bbf7
Another way to register TODO highlighting.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
280
diff
changeset
|
669 |
;; css-mode-hook |
bf5829d9bbf7
Another way to register TODO highlighting.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
280
diff
changeset
|
670 |
;; emacs-lisp-mode)) |
bf5829d9bbf7
Another way to register TODO highlighting.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
280
diff
changeset
|
671 |
;; (font-lock-add-keywords mode |
bf5829d9bbf7
Another way to register TODO highlighting.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
280
diff
changeset
|
672 |
;; '(("\\(XXX\\|FIXME\\|TODO\\)" |
bf5829d9bbf7
Another way to register TODO highlighting.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
280
diff
changeset
|
673 |
;; 1 font-lock-warning-face prepend)))) |
bf5829d9bbf7
Another way to register TODO highlighting.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
280
diff
changeset
|
674 |
|
48
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
675 |
;; ====================================================================== |
83
d2eaf2ed6d1c
Added basic jabber customization.
gavenkoa@gavenko.bifit.int
parents:
82
diff
changeset
|
676 |
;; communication |
d2eaf2ed6d1c
Added basic jabber customization.
gavenkoa@gavenko.bifit.int
parents:
82
diff
changeset
|
677 |
|
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
678 |
;; ---------------------------------------------------------------------- |
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
679 |
;; jabber. |
83
d2eaf2ed6d1c
Added basic jabber customization.
gavenkoa@gavenko.bifit.int
parents:
82
diff
changeset
|
680 |
|
d2eaf2ed6d1c
Added basic jabber customization.
gavenkoa@gavenko.bifit.int
parents:
82
diff
changeset
|
681 |
(when (featurep 'jabber) |
215 | 682 |
(setq |
683 |
jabber-history-enabled t |
|
684 |
jabber-use-global-history nil |
|
685 |
jabber-backlog-number 15 |
|
686 |
jabber-backlog-days 30 |
|
687 |
jabber-alert-presence-message-function (lambda (who oldstatus newstatus statustext) nil) |
|
688 |
) |
|
83
d2eaf2ed6d1c
Added basic jabber customization.
gavenkoa@gavenko.bifit.int
parents:
82
diff
changeset
|
689 |
) |
d2eaf2ed6d1c
Added basic jabber customization.
gavenkoa@gavenko.bifit.int
parents:
82
diff
changeset
|
690 |
|
214
f4234e15d891
Fix prompt format (prompt and text stay on two line, not one).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
211
diff
changeset
|
691 |
(setq my-chat-prompt "[%t] %n>\n") |
f4234e15d891
Fix prompt format (prompt and text stay on two line, not one).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
211
diff
changeset
|
692 |
(when (featurep 'jabber) |
f4234e15d891
Fix prompt format (prompt and text stay on two line, not one).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
211
diff
changeset
|
693 |
(setq |
f4234e15d891
Fix prompt format (prompt and text stay on two line, not one).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
211
diff
changeset
|
694 |
jabber-chat-foreign-prompt-format my-chat-prompt |
f4234e15d891
Fix prompt format (prompt and text stay on two line, not one).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
211
diff
changeset
|
695 |
jabber-chat-local-prompt-format my-chat-prompt |
f4234e15d891
Fix prompt format (prompt and text stay on two line, not one).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
211
diff
changeset
|
696 |
jabber-groupchat-prompt-format my-chat-prompt |
f4234e15d891
Fix prompt format (prompt and text stay on two line, not one).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
211
diff
changeset
|
697 |
jabber-muc-private-foreign-prompt-format "[%t] %g/%n>\n" |
f4234e15d891
Fix prompt format (prompt and text stay on two line, not one).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
211
diff
changeset
|
698 |
) |
f4234e15d891
Fix prompt format (prompt and text stay on two line, not one).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
211
diff
changeset
|
699 |
) |
f4234e15d891
Fix prompt format (prompt and text stay on two line, not one).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
211
diff
changeset
|
700 |
|
182
8a8bf4f3e7c2
Correctly set fsm var.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
181
diff
changeset
|
701 |
;; fsm used in emacs jabber |
8a8bf4f3e7c2
Correctly set fsm var.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
181
diff
changeset
|
702 |
(when (featurep 'fsm) |
8a8bf4f3e7c2
Correctly set fsm var.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
181
diff
changeset
|
703 |
(setq fsm-debug nil) ; Disable *fsm-debug* buffer. |
8a8bf4f3e7c2
Correctly set fsm var.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
181
diff
changeset
|
704 |
) |
83
d2eaf2ed6d1c
Added basic jabber customization.
gavenkoa@gavenko.bifit.int
parents:
82
diff
changeset
|
705 |
|
142
adfc0c678483
Basic customisation for rcirc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
141
diff
changeset
|
706 |
;; ---------------------------------------------------------------------- |
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
707 |
;; rcirc. |
142
adfc0c678483
Basic customisation for rcirc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
141
diff
changeset
|
708 |
|
adfc0c678483
Basic customisation for rcirc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
141
diff
changeset
|
709 |
;; Turn on logging everything to a special buffer, for debugging. |
adfc0c678483
Basic customisation for rcirc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
141
diff
changeset
|
710 |
;; (setq rcirc-debug-flag t) |
adfc0c678483
Basic customisation for rcirc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
141
diff
changeset
|
711 |
|
adfc0c678483
Basic customisation for rcirc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
141
diff
changeset
|
712 |
(add-hook 'rcirc-mode-hook (lambda () (rcirc-track-minor-mode 1))) |
adfc0c678483
Basic customisation for rcirc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
141
diff
changeset
|
713 |
(setq rcirc-time-format "%H:%M ") |
adfc0c678483
Basic customisation for rcirc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
141
diff
changeset
|
714 |
(defun rcirc-handler-301 (process cmd sender args) |
adfc0c678483
Basic customisation for rcirc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
141
diff
changeset
|
715 |
"/away message handler.") |
adfc0c678483
Basic customisation for rcirc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
141
diff
changeset
|
716 |
|
239
408ebfd38be3
Set default erc encoding to utf-8 because on Windows I have default coding - cp1251.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
238
diff
changeset
|
717 |
;; ---------------------------------------------------------------------- |
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
718 |
;; erc. |
239
408ebfd38be3
Set default erc encoding to utf-8 because on Windows I have default coding - cp1251.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
238
diff
changeset
|
719 |
|
408ebfd38be3
Set default erc encoding to utf-8 because on Windows I have default coding - cp1251.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
238
diff
changeset
|
720 |
(setq erc-server-coding-system 'utf-8) |
408ebfd38be3
Set default erc encoding to utf-8 because on Windows I have default coding - cp1251.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
238
diff
changeset
|
721 |
|
83
d2eaf2ed6d1c
Added basic jabber customization.
gavenkoa@gavenko.bifit.int
parents:
82
diff
changeset
|
722 |
;; ====================================================================== |
0 | 723 |
;; VCS, version control, cvs, svn. |
724 |
||
30
762d326dca54
Now .emacs only contain emacs custom settings and load my lisp code from separate file.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
29
diff
changeset
|
725 |
(if (equal window-system 'w32) |
762d326dca54
Now .emacs only contain emacs custom settings and load my lisp code from separate file.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
29
diff
changeset
|
726 |
(progn |
762d326dca54
Now .emacs only contain emacs custom settings and load my lisp code from separate file.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
29
diff
changeset
|
727 |
(modify-coding-system-alist 'process "cvs" '(cp1251-dos . cp1251-dos)) |
762d326dca54
Now .emacs only contain emacs custom settings and load my lisp code from separate file.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
29
diff
changeset
|
728 |
(modify-coding-system-alist 'process "svn" '(cp866-dos . cp1251-dos)) |
762d326dca54
Now .emacs only contain emacs custom settings and load my lisp code from separate file.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
29
diff
changeset
|
729 |
)) |
0 | 730 |
|
731 |
;; (setq-default vc-svn-register-switches "--encoding cp1251") |
|
732 |
(setq-default vc-svn-register-switches nil) |
|
733 |
||
19
a8e7a6e94341
Теперь белый фон для annotated.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
18
diff
changeset
|
734 |
(if window-system |
163
f9b21d24bbf4
Change color map for vc (C-x v g).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
162
diff
changeset
|
735 |
(progn |
325
9b2144595e57
Set value to vc-annotate-* by 'setq', with 'custom-set-variables' in always
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
324
diff
changeset
|
736 |
(setq |
9b2144595e57
Set value to vc-annotate-* by 'setq', with 'custom-set-variables' in always
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
324
diff
changeset
|
737 |
vc-annotate-very-old-color "#0b5b20" |
9b2144595e57
Set value to vc-annotate-* by 'setq', with 'custom-set-variables' in always
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
324
diff
changeset
|
738 |
vc-annotate-background "white" |
9b2144595e57
Set value to vc-annotate-* by 'setq', with 'custom-set-variables' in always
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
324
diff
changeset
|
739 |
vc-annotate-color-map |
9b2144595e57
Set value to vc-annotate-* by 'setq', with 'custom-set-variables' in always
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
324
diff
changeset
|
740 |
'( |
9b2144595e57
Set value to vc-annotate-* by 'setq', with 'custom-set-variables' in always
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
324
diff
changeset
|
741 |
(20 . "#EE0000") |
9b2144595e57
Set value to vc-annotate-* by 'setq', with 'custom-set-variables' in always
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
324
diff
changeset
|
742 |
(40 . "#E0800D") |
9b2144595e57
Set value to vc-annotate-* by 'setq', with 'custom-set-variables' in always
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
324
diff
changeset
|
743 |
(60 . "#D3001A") |
9b2144595e57
Set value to vc-annotate-* by 'setq', with 'custom-set-variables' in always
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
324
diff
changeset
|
744 |
(80 . "#C68027") |
9b2144595e57
Set value to vc-annotate-* by 'setq', with 'custom-set-variables' in always
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
324
diff
changeset
|
745 |
(100 . "#B90034") |
9b2144595e57
Set value to vc-annotate-* by 'setq', with 'custom-set-variables' in always
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
324
diff
changeset
|
746 |
(120 . "#AB8042") |
9b2144595e57
Set value to vc-annotate-* by 'setq', with 'custom-set-variables' in always
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
324
diff
changeset
|
747 |
(140 . "#9E004F") |
9b2144595e57
Set value to vc-annotate-* by 'setq', with 'custom-set-variables' in always
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
324
diff
changeset
|
748 |
(160 . "#91805C") |
9b2144595e57
Set value to vc-annotate-* by 'setq', with 'custom-set-variables' in always
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
324
diff
changeset
|
749 |
(180 . "#840069") |
9b2144595e57
Set value to vc-annotate-* by 'setq', with 'custom-set-variables' in always
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
324
diff
changeset
|
750 |
(200 . "#778077") |
9b2144595e57
Set value to vc-annotate-* by 'setq', with 'custom-set-variables' in always
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
324
diff
changeset
|
751 |
(220 . "#690084") |
9b2144595e57
Set value to vc-annotate-* by 'setq', with 'custom-set-variables' in always
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
324
diff
changeset
|
752 |
(240 . "#5C8091") |
9b2144595e57
Set value to vc-annotate-* by 'setq', with 'custom-set-variables' in always
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
324
diff
changeset
|
753 |
(260 . "#4F009E") |
9b2144595e57
Set value to vc-annotate-* by 'setq', with 'custom-set-variables' in always
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
324
diff
changeset
|
754 |
(280 . "#4280AB") |
9b2144595e57
Set value to vc-annotate-* by 'setq', with 'custom-set-variables' in always
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
324
diff
changeset
|
755 |
(300 . "#3400B9") |
9b2144595e57
Set value to vc-annotate-* by 'setq', with 'custom-set-variables' in always
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
324
diff
changeset
|
756 |
(320 . "#2780C6") |
9b2144595e57
Set value to vc-annotate-* by 'setq', with 'custom-set-variables' in always
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
324
diff
changeset
|
757 |
(340 . "#1A00D3") |
9b2144595e57
Set value to vc-annotate-* by 'setq', with 'custom-set-variables' in always
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
324
diff
changeset
|
758 |
(360 . "#0D80E0"))) |
163
f9b21d24bbf4
Change color map for vc (C-x v g).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
162
diff
changeset
|
759 |
) |
19
a8e7a6e94341
Теперь белый фон для annotated.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
18
diff
changeset
|
760 |
) |
a8e7a6e94341
Теперь белый фон для annotated.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
18
diff
changeset
|
761 |
|
91 | 762 |
;; ---------------------------------------------------------------------- |
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
763 |
;; psvn. |
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
764 |
|
197
2abcea5b91db
Added settings for psvn.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
192
diff
changeset
|
765 |
(setq svn-status-verbose t) |
2abcea5b91db
Added settings for psvn.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
192
diff
changeset
|
766 |
(setq svn-status-hide-unmodified t) |
2abcea5b91db
Added settings for psvn.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
192
diff
changeset
|
767 |
|
2abcea5b91db
Added settings for psvn.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
192
diff
changeset
|
768 |
;; ---------------------------------------------------------------------- |
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
769 |
;; DVC. |
91 | 770 |
|
771 |
(when (featurep 'dvc-emacs) |
|
772 |
(setq dvc-tips-enabled nil) |
|
773 |
) |
|
774 |
||
0 | 775 |
;; ====================================================================== |
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
776 |
;; devel, prog, programming. |
0 | 777 |
|
778 |
(add-to-list 'auto-mode-alist '("\\.cu$" . c-mode)) |
|
779 |
||
172
fcea80b465b9
Comment customisation.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
167
diff
changeset
|
780 |
(setq-default comment-style (quote indent)) |
fcea80b465b9
Comment customisation.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
167
diff
changeset
|
781 |
(setq-default comment-column 44) |
180
75ce786c1148
set comment-fill-column to 100.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
179
diff
changeset
|
782 |
(setq-default comment-fill-column 100) |
54 | 783 |
|
201
8531f8af6528
Allow long line coment in c/lisp code.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
200
diff
changeset
|
784 |
(mapc (lambda (mode) |
8531f8af6528
Allow long line coment in c/lisp code.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
200
diff
changeset
|
785 |
(add-hook mode |
8531f8af6528
Allow long line coment in c/lisp code.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
200
diff
changeset
|
786 |
(lambda () |
8531f8af6528
Allow long line coment in c/lisp code.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
200
diff
changeset
|
787 |
(setq fill-column 110) ) |
8531f8af6528
Allow long line coment in c/lisp code.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
200
diff
changeset
|
788 |
)) |
8531f8af6528
Allow long line coment in c/lisp code.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
200
diff
changeset
|
789 |
'(c-mode-hook lisp-mode-hook)) |
8531f8af6528
Allow long line coment in c/lisp code.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
200
diff
changeset
|
790 |
|
0 | 791 |
;; ---------------------------------------------------------------------- |
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
792 |
;; diff, patch. |
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
793 |
|
0 | 794 |
(setq diff-switches "-u") |
795 |
||
796 |
;; ---------------------------------------------------------------------- |
|
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
797 |
;; indenting. |
0 | 798 |
|
799 |
(setq standard-indent 4) |
|
800 |
(setq c-basic-offset 4) |
|
22
8ca8997d9f1d
Определил размер отступа для sh-mode.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
21
diff
changeset
|
801 |
(setq sh-basic-offset 2) |
0 | 802 |
(setq sgml-basic-offset 4) |
803 |
||
804 |
;; TAB (tab settings) |
|
805 |
(setq-default tab-width 4) |
|
253
7cb6ff8a9a75
Translate comment to English.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
252
diff
changeset
|
806 |
(setq-default indent-tabs-mode nil) ; spaces instead of tabs by default |
0 | 807 |
(setq tab-always-indent t) |
808 |
(setq c-tab-always-indent t) |
|
188
e36736f245fd
Start tab-stop-list with zero.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
162
diff
changeset
|
809 |
(let ( (line-width 400) i ) |
e36736f245fd
Start tab-stop-list with zero.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
162
diff
changeset
|
810 |
(setq i (* (ceiling line-width 4) 4)) |
73
73e42aa11b3c
Correct initial asigned with nil.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
72
diff
changeset
|
811 |
(setq tab-stop-list nil) |
188
e36736f245fd
Start tab-stop-list with zero.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
162
diff
changeset
|
812 |
(while (>= i 0) |
e36736f245fd
Start tab-stop-list with zero.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
162
diff
changeset
|
813 |
(setq tab-stop-list (cons i tab-stop-list)) |
e36736f245fd
Start tab-stop-list with zero.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
162
diff
changeset
|
814 |
(setq i (- i 4)))) |
0 | 815 |
|
816 |
;; ---------------------------------------------------------------------- |
|
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
817 |
;; diff. |
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
818 |
|
0 | 819 |
(setq ediff-diff-options "") |
820 |
||
821 |
;; ---------------------------------------------------------------------- |
|
822 |
;; *Compile* |
|
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
823 |
|
0 | 824 |
(setq compile-auto-highlight t |
825 |
compile-command "make ") |
|
826 |
;; compilation window shall scroll down if not 0 |
|
827 |
(setq compilation-scroll-output 1) |
|
828 |
||
28
b05bcec107fd
Correct coding (aotu determine CR/LF).
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
27
diff
changeset
|
829 |
;; My funny error messages. |
295 | 830 |
;; XXX нужно реализовать через hook. |
20
fde58d93c047
Добавил подсветку для output-файлов cl в compile-mode.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
19
diff
changeset
|
831 |
(require 'compile) |
38
90354c640342
Prevent error on debian from non-exist `compilation-error-regexp-alist-alist'.
sasha@rocky
parents:
36
diff
changeset
|
832 |
(add-to-list 'compilation-error-regexp-alist '("^\\( +\\[csc\\] \\|\\)\\(.*\\)(\\([0-9]*\\),\\([0-9]*\\)):" 2 3 4)) |
90354c640342
Prevent error on debian from non-exist `compilation-error-regexp-alist-alist'.
sasha@rocky
parents:
36
diff
changeset
|
833 |
(add-to-list 'compilation-error-regexp-alist '("^ *\\(.*\\)(\\([0-9]*\\)) +:" 1 2)) |
185
9c2934c3d8ca
Parsing KEIL compiler error.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
183
diff
changeset
|
834 |
(add-to-list 'compilation-error-regexp-alist '("^\"?\\([^\"]*\\)\"?,\\([0-9]*\\) .*\\[.*\\]: " 1 2)) ; KEIL compiler |
38
90354c640342
Prevent error on debian from non-exist `compilation-error-regexp-alist-alist'.
sasha@rocky
parents:
36
diff
changeset
|
835 |
;; (add-to-list 'compilation-mode-font-lock-keywords '("\\(/[Oo][Uu][Tt]:[^ ]+\\)" . 1)) |
90354c640342
Prevent error on debian from non-exist `compilation-error-regexp-alist-alist'.
sasha@rocky
parents:
36
diff
changeset
|
836 |
;; (add-to-list 'compilation-mode-font-lock-keywords '("[ ]\\(/F[oe][^ ]+\\)" . 1)) |
0 | 837 |
|
838 |
;; ---------------------------------------------------------------------- |
|
303 | 839 |
;; windows inf files for driver installing |
840 |
||
288
5009c3f4afef
Windows inf files for installing drivers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
285
diff
changeset
|
841 |
(add-to-list 'auto-mode-alist '("\\.inf\\'" . conf-mode)) |
5009c3f4afef
Windows inf files for installing drivers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
285
diff
changeset
|
842 |
|
5009c3f4afef
Windows inf files for installing drivers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
285
diff
changeset
|
843 |
;; ---------------------------------------------------------------------- |
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
844 |
;; makefile, make. |
196
154d8ebf534b
Added matches for makefile-gmake-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
192
diff
changeset
|
845 |
|
154d8ebf534b
Added matches for makefile-gmake-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
192
diff
changeset
|
846 |
(add-to-list 'auto-mode-alist '("\\(Makefile\\|Makefile\\..+\\)\\'" . makefile-gmake-mode)) |
154d8ebf534b
Added matches for makefile-gmake-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
192
diff
changeset
|
847 |
|
154d8ebf534b
Added matches for makefile-gmake-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
192
diff
changeset
|
848 |
;; ---------------------------------------------------------------------- |
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
849 |
;; asm, assembler. |
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
850 |
|
36
4261883ccdb6
Use C-style comment in asm files.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
35
diff
changeset
|
851 |
;; (setq-default asm-comment-char 59) |
4261883ccdb6
Use C-style comment in asm files.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
35
diff
changeset
|
852 |
(add-hook 'asm-mode-hook '(lambda () (setq comment-start "/*") (setq comment-end "*/")) t) |
0 | 853 |
|
186
8c74e1ac4da1
Added association for IAR asm file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
854 |
(add-to-list 'auto-mode-alist '("\\.\\([sS]79\\|[sS]\\)\\'" . asm-mode)) |
8c74e1ac4da1
Added association for IAR asm file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
855 |
|
176
69d65b8a0a25
Added example for unset-key.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
175
diff
changeset
|
856 |
;; (add-hook 'asm-mode-hook '(lambda () (local-unset-key ":"))) |
69d65b8a0a25
Added example for unset-key.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
175
diff
changeset
|
857 |
;; (add-hook 'asm-mode-hook '(lambda () (local-set-key ":" ":"))) |
69d65b8a0a25
Added example for unset-key.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
175
diff
changeset
|
858 |
|
0 | 859 |
;; ---------------------------------------------------------------------- |
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
860 |
;; linker. |
272
f7fba93f4028
Enable file association for myself defined modes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
266
diff
changeset
|
861 |
|
f7fba93f4028
Enable file association for myself defined modes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
266
diff
changeset
|
862 |
(when (fboundp 'iar-linker-config-mode) |
f7fba93f4028
Enable file association for myself defined modes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
266
diff
changeset
|
863 |
(add-to-list 'auto-mode-alist '("\\.icf\\'" . iar-linker-config-mode)) |
f7fba93f4028
Enable file association for myself defined modes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
266
diff
changeset
|
864 |
) |
f7fba93f4028
Enable file association for myself defined modes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
266
diff
changeset
|
865 |
(when (fboundp 'iar4-linker-config-mode) |
f7fba93f4028
Enable file association for myself defined modes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
266
diff
changeset
|
866 |
(add-to-list 'auto-mode-alist '("\\.xcl\\'" . iar4-linker-config-mode)) |
f7fba93f4028
Enable file association for myself defined modes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
266
diff
changeset
|
867 |
) |
f7fba93f4028
Enable file association for myself defined modes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
266
diff
changeset
|
868 |
|
f7fba93f4028
Enable file association for myself defined modes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
266
diff
changeset
|
869 |
;; ---------------------------------------------------------------------- |
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
870 |
;; lisp. |
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
871 |
|
0 | 872 |
(setq list-command-history-max 256) |
873 |
||
874 |
;; ---------------------------------------------------------------------- |
|
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
875 |
;; C, c-mode, C++, c++-mode. |
173
04b974b118c2
cc-mode customisations.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
172
diff
changeset
|
876 |
|
0 | 877 |
(setq c-echo-syntactic-information-p t) |
173
04b974b118c2
cc-mode customisations.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
172
diff
changeset
|
878 |
(add-hook 'c-mode-common-hook |
04b974b118c2
cc-mode customisations.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
172
diff
changeset
|
879 |
(lambda () |
04b974b118c2
cc-mode customisations.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
172
diff
changeset
|
880 |
;; Automatically inserte newlines after special characters such as brace, comma, semi-colon, and colon. |
04b974b118c2
cc-mode customisations.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
172
diff
changeset
|
881 |
(c-toggle-auto-newline -1) |
04b974b118c2
cc-mode customisations.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
172
diff
changeset
|
882 |
;; Delete all preceding whitespace by DEL. |
04b974b118c2
cc-mode customisations.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
172
diff
changeset
|
883 |
(c-toggle-hungry-state -1) |
04b974b118c2
cc-mode customisations.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
172
diff
changeset
|
884 |
)) |
0 | 885 |
|
886 |
(defconst my-c-style |
|
129
23d028bad418
More regular indent.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
128
diff
changeset
|
887 |
'((c-tab-always-indent . t) |
0 | 888 |
(c-comment-only-line-offset . 4) |
129
23d028bad418
More regular indent.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
128
diff
changeset
|
889 |
(c-hanging-braces-alist |
131
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
890 |
. ( |
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
891 |
(brace-list-open) |
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
892 |
(substatement-open after) |
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
893 |
)) |
129
23d028bad418
More regular indent.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
128
diff
changeset
|
894 |
(c-hanging-colons-alist |
131
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
895 |
. ( |
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
896 |
(access-label after) |
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
897 |
(case-label after) |
129
23d028bad418
More regular indent.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
128
diff
changeset
|
898 |
(inher-intro) |
23d028bad418
More regular indent.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
128
diff
changeset
|
899 |
(label after) |
131
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
900 |
(member-init-intro before) |
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
901 |
)) |
129
23d028bad418
More regular indent.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
128
diff
changeset
|
902 |
(c-cleanup-list |
131
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
903 |
. ( |
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
904 |
defun-close-semi |
129
23d028bad418
More regular indent.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
128
diff
changeset
|
905 |
empty-defun-braces |
131
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
906 |
scope-operator |
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
907 |
)) |
129
23d028bad418
More regular indent.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
128
diff
changeset
|
908 |
(c-offsets-alist |
131
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
909 |
. ( |
129
23d028bad418
More regular indent.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
128
diff
changeset
|
910 |
(arglist-close . c-lineup-arglist) |
23d028bad418
More regular indent.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
128
diff
changeset
|
911 |
(arglist-cont-nonempty . ++) |
131
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
912 |
(arglist-intro . ++) |
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
913 |
(block-open . 0) |
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
914 |
(case-label . 0) |
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
915 |
(comment-intro . 0) |
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
916 |
(func-decl-cont . ++) |
129
23d028bad418
More regular indent.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
128
diff
changeset
|
917 |
(inexpr-class . 0) |
131
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
918 |
(inline-open . 0) |
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
919 |
(knr-argdecl-intro . -) |
129
23d028bad418
More regular indent.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
128
diff
changeset
|
920 |
(label . 0) |
131
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
921 |
(statement-block-intro . +) |
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
922 |
(statement-cont . ++) |
129
23d028bad418
More regular indent.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
128
diff
changeset
|
923 |
(substatement-open . 0) |
131
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
924 |
)) |
0 | 925 |
(c-echo-syntactic-information-p . t)) |
926 |
"My C Programming Style") |
|
927 |
||
128
5a3df58678d2
Switch from c-initialization-hook to c-mode-common-hook because otherwise
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
127
diff
changeset
|
928 |
(add-hook 'c-mode-common-hook |
5a3df58678d2
Switch from c-initialization-hook to c-mode-common-hook because otherwise
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
127
diff
changeset
|
929 |
(lambda () (c-add-style "my" my-c-style t))) |
179
77fdd4bce6c8
c++-mode and objc-mode use "my" style.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
178
diff
changeset
|
930 |
(setq c-default-style '((java-mode . "my") (c-mode . "my") (csharp-mode . "my") (c++-mode . "my") (objc-mode . "my") (other . "my"))) |
0 | 931 |
|
932 |
;; ---------------------------------------------------------------------- |
|
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
933 |
;; bat file, batch. |
204
4545865a64c3
Move bat file mode code.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
203
diff
changeset
|
934 |
|
272
f7fba93f4028
Enable file association for myself defined modes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
266
diff
changeset
|
935 |
(when (fboundp 'bat-file-mode) |
f7fba93f4028
Enable file association for myself defined modes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
266
diff
changeset
|
936 |
(add-to-list 'auto-mode-alist '("\\.[bB][aA][tT]\\'" . bat-file-mode)) |
f7fba93f4028
Enable file association for myself defined modes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
266
diff
changeset
|
937 |
(add-to-list 'auto-mode-alist '("\\.[cC][mM][dD]\\'" . bat-file-mode)) |
f7fba93f4028
Enable file association for myself defined modes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
266
diff
changeset
|
938 |
) |
f7fba93f4028
Enable file association for myself defined modes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
266
diff
changeset
|
939 |
|
f7fba93f4028
Enable file association for myself defined modes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
266
diff
changeset
|
940 |
;; ---------------------------------------------------------------------- |
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
941 |
;; nsis-mode. |
272
f7fba93f4028
Enable file association for myself defined modes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
266
diff
changeset
|
942 |
|
f7fba93f4028
Enable file association for myself defined modes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
266
diff
changeset
|
943 |
(when (fboundp 'nsis-mode) |
f7fba93f4028
Enable file association for myself defined modes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
266
diff
changeset
|
944 |
(add-to-list 'auto-mode-alist '("\\.\\(nsi\\|nsh\\)\\'" . nsis-mode)) |
f7fba93f4028
Enable file association for myself defined modes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
266
diff
changeset
|
945 |
) |
204
4545865a64c3
Move bat file mode code.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
203
diff
changeset
|
946 |
|
4545865a64c3
Move bat file mode code.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
203
diff
changeset
|
947 |
;; ---------------------------------------------------------------------- |
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
948 |
;; *csharp*, c-sharp. |
204
4545865a64c3
Move bat file mode code.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
203
diff
changeset
|
949 |
|
0 | 950 |
(autoload 'csharp-mode "csharp-mode" "Major mode for editing C# code." t) |
951 |
(add-to-list 'auto-mode-alist '("\\.cs$" . csharp-mode)) |
|
952 |
||
953 |
;; ---------------------------------------------------------------------- |
|
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
954 |
;; java. |
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
955 |
|
0 | 956 |
;; Update the Emacs load-path to include the path to |
957 |
;; the JDE and its require packages. This code assumes |
|
958 |
;; that you have installed the packages in the emacs/site |
|
959 |
;; subdirectory of your home directory. |
|
960 |
;; (add-to-list 'load-path (expand-file-name "~/emacs/site/semantic")) |
|
961 |
;; (add-to-list 'load-path (expand-file-name "~/emacs/site/speedbar")) |
|
962 |
;; (add-to-list 'load-path (expand-file-name "~/emacs/site/elib-1.0")) |
|
963 |
;; (add-to-list 'load-path (expand-file-name "~/emacs/site/eieio")) |
|
964 |
;; (add-to-list 'load-path (expand-file-name "~/emacs/site/jde-2.3.5.1/lisp")) |
|
965 |
||
966 |
;; Load CEDET |
|
967 |
;; (load-file "~/emacs/site/common/cedet.el") |
|
968 |
;; Enabling SEMANTIC minor modes. See semantic/INSTALL for more ideas. |
|
969 |
;; (semantic-load-enable-code-helpers) |
|
970 |
||
971 |
;; If you want Emacs to defer loading the JDE until you open a |
|
972 |
;; Java file, edit the following line |
|
973 |
;; (setq defer-loading-jde nil) |
|
974 |
;; to read: |
|
975 |
;; |
|
976 |
;; (setq defer-loading-jde t) |
|
977 |
;; |
|
978 |
||
979 |
;; (if defer-loading-jde |
|
980 |
;; (progn |
|
981 |
;; (autoload 'jde-mode "jde" "JDE mode." t) |
|
982 |
;; (add-to-list 'auto-mode-alist '("\\.java\\'" . jde-mode)) |
|
983 |
;; (require 'jde))) |
|
984 |
||
985 |
||
986 |
;; Sets the basic indentation for Java source files |
|
987 |
;; to two spaces. |
|
988 |
;; (defun my-jde-mode-hook () |
|
989 |
;; (setq c-basic-offset 2)) |
|
990 |
||
991 |
;; (add-hook 'jde-mode-hook 'my-jde-mode-hook) |
|
992 |
||
993 |
;; (require 'jde) |
|
994 |
||
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
995 |
;; ---------------------------------------------------------------------- |
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
996 |
;; ECB. |
0 | 997 |
|
102
25585e240b4a
Move customization from .emacs (custom-set-variables) to .emacs-my. Remove duplication.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
101
diff
changeset
|
998 |
(setq ecb-tip-of-the-day nil) |
0 | 999 |
;; (add-to-list 'load-path "~/emacs/site/ecb-2.32") |
1000 |
;; (require 'ecb) |
|
1001 |
||
102
25585e240b4a
Move customization from .emacs (custom-set-variables) to .emacs-my. Remove duplication.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
101
diff
changeset
|
1002 |
;; (global-set-key (kbd "\e\eE") 'ecb-activate) |
0 | 1003 |
|
104
e921a5d906ca
Use highlighting on sgml modes!
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
1004 |
;; ---------------------------------------------------------------------- |
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
1005 |
;; html. |
104
e921a5d906ca
Use highlighting on sgml modes!
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
1006 |
|
e921a5d906ca
Use highlighting on sgml modes!
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
1007 |
;; ---------------------------------------------------------------------- |
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
1008 |
;; xml. |
104
e921a5d906ca
Use highlighting on sgml modes!
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
1009 |
|
e921a5d906ca
Use highlighting on sgml modes!
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
1010 |
;; ---------------------------------------------------------------------- |
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
1011 |
;; psgml. |
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
1012 |
|
245 | 1013 |
(setq sgml-set-face t) ; for highlighting in sgml |
104
e921a5d906ca
Use highlighting on sgml modes!
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
1014 |
|
0 | 1015 |
;; ====================================================================== |
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
1016 |
;; printing. |
0 | 1017 |
|
1018 |
;; Use Notepad to print plain text files to the default Windows printer |
|
1019 |
;(setq lpr-command "notepad") |
|
1020 |
;(setq lpr-headers-switches '("/p")) ; \ mis-use these |
|
1021 |
;(setq lpr-switches nil) ; / two variables |
|
9 | 1022 |
;(setq printer-name nil) ; notepad takes the default |
0 | 1023 |
;(setq lpr-printer-switch "/P") ;; run notepad as batch printer |
1024 |
;; |
|
295 | 1025 |
|
1026 |
;; ---------------------------------------------------------------------- |
|
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
1027 |
;; printing to file. |
295 | 1028 |
|
0 | 1029 |
;(setq printer-name "~/myprint.txt") |
1030 |
;(setq ps-printer-name nil) |
|
1031 |
;(setq ps-print-header nil) |
|
1032 |
;;; some more menu entries in the command list: |
|
1033 |
;;; see tex-mik.el from package auctex: %v is defined in tex-mik.el |
|
1034 |
;;; other variables are defined in tex.el from auctex |
|
1035 |
;;; the meaning of some auctex-varibles: |
|
1036 |
;symbols defined in tex.el and tex-mik.el: |
|
1037 |
;%b name slave tex-file %t name master tex-file |
|
1038 |
;%d dvi-file %f ps-file |
|
1039 |
;%l "latex --src-specials" |
|
1040 |
;%n line number %p printcommand %q "lpq" |
|
1041 |
;%r (TeX-style-check TeX-print-style) |
|
1042 |
;%s master-file-name without extention |
|
1043 |
;%v yap command view line |
|
1044 |
;(eval-after-load "tex" |
|
1045 |
; '(progn |
|
1046 |
; (add-to-list 'TeX-command-list |
|
9 | 1047 |
; (list "->PS landscape for pdf" |
1048 |
; "dvips %d -N0 -Ppdf -G0 -T 297mm,210mm -o %f " |
|
1049 |
; 'TeX-run-command nil t)) |
|
0 | 1050 |
; (add-to-list 'TeX-command-list |
9 | 1051 |
; (list "All Texify run-viewer" |
1052 |
; "texify --tex-opt=--src --run-viewer --clean %s.tex" |
|
1053 |
; 'TeX-run-command nil t)))) |
|
0 | 1054 |
|
102
25585e240b4a
Move customization from .emacs (custom-set-variables) to .emacs-my. Remove duplication.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
101
diff
changeset
|
1055 |
;; ---------------------------------------------------------------- |
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
1056 |
;; SQL. |
102
25585e240b4a
Move customization from .emacs (custom-set-variables) to .emacs-my. Remove duplication.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
101
diff
changeset
|
1057 |
|
25585e240b4a
Move customization from .emacs (custom-set-variables) to .emacs-my. Remove duplication.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
101
diff
changeset
|
1058 |
(setq sql-password "") |
0 | 1059 |
|
1060 |
;; ====================================================================== |
|
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
1061 |
;; backuping. |
0 | 1062 |
|
75
cd964a1d58b9
Use backup for files.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
74
diff
changeset
|
1063 |
(setq |
147 | 1064 |
backup-by-copying t ; don't clobber symlinks |
75
cd964a1d58b9
Use backup for files.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
74
diff
changeset
|
1065 |
backup-directory-alist '(("." . "~/.backup")) ; don't litter my fs tree |
82
1a705650ca56
Delete excess backup versions silently, else it prompt to delete ~/.recentf.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
81
diff
changeset
|
1066 |
delete-old-versions t ; delete excess backup versions silently |
75
cd964a1d58b9
Use backup for files.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
74
diff
changeset
|
1067 |
kept-old-versions 1 ; store first original version |
cd964a1d58b9
Use backup for files.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
74
diff
changeset
|
1068 |
kept-new-versions 3 ; store last 3 version |
cd964a1d58b9
Use backup for files.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
74
diff
changeset
|
1069 |
version-control t) ; use versioned backups |
0 | 1070 |
|
150 | 1071 |
;; ====================================================================== |
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
1072 |
;; auto save. |
150 | 1073 |
|
1074 |
(setq auto-save-default t) |
|
1075 |
;; If nil autosave to different than original to buffer file. |
|
1076 |
(setq auto-save-visited-file-name nil) |
|
1077 |
;; Note: if you kill unsaved file auto save file not deleted. |
|
1078 |
(setq delete-auto-save-files t) |
|
0 | 1079 |
|
1080 |
;; ====================================================================== |
|
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
1081 |
;; user info. |
17
4f97bf9a25d5
Удалил строки, содержащие абсолютные пути в windows.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
16
diff
changeset
|
1082 |
|
0 | 1083 |
(cd "~/") |
51 | 1084 |
(setq user-full-name "Oleksandr Gavenko") |
1085 |
(setq user-mail-address "gavenkoa@gmail.com") |
|
1086 |
(setenv "ORGANIZATION" (concat user-full-name " <" user-mail-address ">")) |
|
0 | 1087 |
|
250
ef1c7269280f
Show different messages on statup.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
249
diff
changeset
|
1088 |
(add-hook 'emacs-startup-hook |
ef1c7269280f
Show different messages on statup.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
249
diff
changeset
|
1089 |
(lambda () |
ef1c7269280f
Show different messages on statup.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
249
diff
changeset
|
1090 |
(let ( (mgs-list '("Welcome to emacs, the thermonuclear editor." |
ef1c7269280f
Show different messages on statup.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
249
diff
changeset
|
1091 |
"You enter to Out Space. Emacs on." |
ef1c7269280f
Show different messages on statup.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
249
diff
changeset
|
1092 |
"Nice day for Emacsing!")) ) |
ef1c7269280f
Show different messages on statup.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
249
diff
changeset
|
1093 |
(message (nth (random (length mgs-list)) mgs-list))))) |
0 | 1094 |
|
266
d8034fa9f83e
Move 'resize-frame.el' to '.emacs-my'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
256
diff
changeset
|
1095 |
;; Size of emacs area and its position. |
d8034fa9f83e
Move 'resize-frame.el' to '.emacs-my'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
256
diff
changeset
|
1096 |
(when window-system |
d8034fa9f83e
Move 'resize-frame.el' to '.emacs-my'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
256
diff
changeset
|
1097 |
(run-at-time (format "%d sec" 1) nil '(lambda () (set-frame-position (selected-frame) 1 1))) |
285
9883ac39abc3
As screen size automatically not detected, determine dimention from user assigned vars.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
284
diff
changeset
|
1098 |
(when (boundp 'my-frame-width) |
9883ac39abc3
As screen size automatically not detected, determine dimention from user assigned vars.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
284
diff
changeset
|
1099 |
(run-at-time (format "%d sec" 2) nil '(lambda () (set-frame-width (selected-frame) my-frame-width t))) ) |
9883ac39abc3
As screen size automatically not detected, determine dimention from user assigned vars.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
284
diff
changeset
|
1100 |
(when (boundp 'my-frame-height) |
9883ac39abc3
As screen size automatically not detected, determine dimention from user assigned vars.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
284
diff
changeset
|
1101 |
(run-at-time (format "%d sec" 3) nil '(lambda () (set-frame-height (selected-frame) my-frame-height t))) ) |
266
d8034fa9f83e
Move 'resize-frame.el' to '.emacs-my'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
256
diff
changeset
|
1102 |
) |
d8034fa9f83e
Move 'resize-frame.el' to '.emacs-my'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
256
diff
changeset
|
1103 |
|
0 | 1104 |
;; End loading... |