author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Mon, 29 Jun 2009 18:57:20 +0300 | |
changeset 153 | a03216c9fa8c |
parent 152 | 907336e50d23 |
child 154 | 9c4f8d401e12 |
permissions | -rw-r--r-- |
0 | 1 |
;; -*- mode: lisp; coding: cp1251 -*- |
6 | 2 |
;; |
42
04fd7747bc49
Update copyright notice.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
40
diff
changeset
|
3 |
;; Copyright (C) 2008 by Oleksandr Gavenko <gavenkoa@gmail.com> |
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 |
;; |
83
d2eaf2ed6d1c
Added basic jabber customization.
gavenkoa@gavenko.bifit.int
parents:
82
diff
changeset
|
8 |
;; .emacs file for GNU Emacs. |
d2eaf2ed6d1c
Added basic jabber customization.
gavenkoa@gavenko.bifit.int
parents:
82
diff
changeset
|
9 |
;; |
111
fcea9d3b79e1
Rename -my{-pre/-post} to {-pre/-post}.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
109
diff
changeset
|
10 |
;; ~/.emacs load this file after ~/.emacs-pre, but before ~/.emacs-post. |
0 | 11 |
|
12 |
;; ====================================================================== |
|
7
8eae4300e86f
Перебил сочетание клавиш C-x C-d для вызова dired, вместо dir-list.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
6
diff
changeset
|
13 |
;; Debugging. |
0 | 14 |
|
15 |
;; Shut off message buffer by setting nil. Note - if you need to debug emacs, |
|
16 |
;; comment these out so you can see what's going on. |
|
17 |
(setq message-log-max 100) |
|
18 |
||
19 |
;;(add-hook 'after-init-hook |
|
9 | 20 |
;; '(lambda () (setq debug-on-error t))) |
0 | 21 |
;;(debug-on-entry 'command-line-1) |
22 |
||
23 |
;; Set the debug option to enable a backtrace when a problem occurs. |
|
24 |
(setq debug-on-error nil) ; t/nil |
|
25 |
||
26 |
;; ====================================================================== |
|
7
8eae4300e86f
Перебил сочетание клавиш C-x C-d для вызова dired, вместо dir-list.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
6
diff
changeset
|
27 |
;; . |
8eae4300e86f
Перебил сочетание клавиш C-x C-d для вызова dired, вместо dir-list.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
6
diff
changeset
|
28 |
;; View. |
0 | 29 |
|
151 | 30 |
(menu-bar-mode -1) |
31 |
(tool-bar-mode -1) |
|
32 |
(tooltip-mode -1) |
|
33 |
(scroll-bar-mode 1) |
|
0 | 34 |
|
35 |
(if window-system |
|
36 |
;; X-window Win |
|
37 |
(progn |
|
38 |
;; size of emacs area and position |
|
39 | 39 |
(set-frame-height (selected-frame) 60) |
40 |
(set-frame-width (selected-frame) 120) |
|
99
58f057f9f533
Do not set frame position.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
98
diff
changeset
|
41 |
;; (set-frame-position (selected-frame) 10 25) |
0 | 42 |
|
43 |
;; |
|
44 |
(set-background-color "white") |
|
45 |
(set-foreground-color "black") |
|
46 |
;; |
|
47 |
(set-cursor-color "brown") |
|
48 |
;;(setq blink-matching-delay 0.01) |
|
49 |
;; ! |
|
50 |
;; (blink-cursor-mode nil) |
|
51 |
;; (set-face-font 'default "7x14") |
|
52 |
) |
|
53 |
;; tty |
|
54 |
(progn |
|
55 |
) |
|
56 |
) |
|
57 |
||
85 | 58 |
;; ---------------------------------------------------------------------- |
59 |
;; Silent runing. |
|
60 |
||
61 |
;; (setq inhibit-splash-screen t) ; nonexist on 21.4.1 |
|
62 |
(setq inhibit-startup-message t) |
|
63 |
||
64 |
;; ====================================================================== |
|
65 |
;; GNU Serv. |
|
66 |
||
67 |
;; (load "~/emacs/bin/gnuserv/gnuserv.el") |
|
68 |
;; (require 'gnuserv) |
|
69 |
;; (setq gnuserv-frame (selected-frame)) |
|
70 |
||
71 |
(server-start) |
|
72 |
||
73 |
;; (desktop-load-default) |
|
74 |
;; (desktop-read) |
|
75 |
||
0 | 76 |
;; ====================================================================== |
7
8eae4300e86f
Перебил сочетание клавиш C-x C-d для вызова dired, вместо dir-list.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
6
diff
changeset
|
77 |
;; Standart settings |
0 | 78 |
|
79 |
(setq kill-whole-line t) |
|
80 |
||
81 |
;; show column & line numbers in status bar |
|
82 |
(setq column-number-mode t) |
|
83 |
(setq line-number-mode t) |
|
84 |
||
102
25585e240b4a
Move customization from .emacs (custom-set-variables) to .emacs-my. Remove duplication.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
101
diff
changeset
|
85 |
(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
|
86 |
|
132
3f6b8e1a3656
Set frame-title-format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
127
diff
changeset
|
87 |
(setq frame-title-format "Emacs - %b") |
3f6b8e1a3656
Set frame-title-format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
127
diff
changeset
|
88 |
|
35
691635158df5
More pretty buffer switch and naming.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
34
diff
changeset
|
89 |
;; ---------------------------------------------------------------------- |
691635158df5
More pretty buffer switch and naming.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
34
diff
changeset
|
90 |
;; Switching, creating, selecting buffers. |
34 | 91 |
(iswitchb-mode 1) |
122
680d4677e3fe
Extend innore buffers by iswitch.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
121
diff
changeset
|
92 |
(setq iswitchb-buffer-ignore nil) |
680d4677e3fe
Extend innore buffers by iswitch.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
121
diff
changeset
|
93 |
(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
|
94 |
'("^ " |
680d4677e3fe
Extend innore buffers by iswitch.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
121
diff
changeset
|
95 |
"^\*Buffer" |
680d4677e3fe
Extend innore buffers by iswitch.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
121
diff
changeset
|
96 |
"^\*Completions\*" |
123
7c1f68e5b898
Extend innore buffers by iswitch.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
122
diff
changeset
|
97 |
"^\*tramp" |
7c1f68e5b898
Extend innore buffers by iswitch.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
122
diff
changeset
|
98 |
"^\*Dired log\*" |
7c1f68e5b898
Extend innore buffers by iswitch.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
122
diff
changeset
|
99 |
"^\*Help\*" |
122
680d4677e3fe
Extend innore buffers by iswitch.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
121
diff
changeset
|
100 |
"^\*Quail Completions\*" |
123
7c1f68e5b898
Extend innore buffers by iswitch.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
122
diff
changeset
|
101 |
"^\*Disabled Command\*" |
7c1f68e5b898
Extend innore buffers by iswitch.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
122
diff
changeset
|
102 |
"^\*vc\*" |
7c1f68e5b898
Extend innore buffers by iswitch.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
122
diff
changeset
|
103 |
)) |
34 | 104 |
|
35
691635158df5
More pretty buffer switch and naming.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
34
diff
changeset
|
105 |
(require 'uniquify) |
691635158df5
More pretty buffer switch and naming.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
34
diff
changeset
|
106 |
(setq uniquify-buffer-name-style 'post-forward) |
691635158df5
More pretty buffer switch and naming.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
34
diff
changeset
|
107 |
|
691635158df5
More pretty buffer switch and naming.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
34
diff
changeset
|
108 |
(global-set-key "\C-x\C-b" 'buffer-menu) |
691635158df5
More pretty buffer switch and naming.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
34
diff
changeset
|
109 |
|
0 | 110 |
;; ---------------------------------------------------------------------- |
7
8eae4300e86f
Перебил сочетание клавиш C-x C-d для вызова dired, вместо dir-list.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
6
diff
changeset
|
111 |
;; Scrolling |
0 | 112 |
|
127 | 113 |
(setq-default |
114 |
;; The number of lines to try scrolling a window by when point moves out. |
|
115 |
scroll-step 1 |
|
116 |
scroll-conservatively 100 |
|
117 |
;; i , |
|
118 |
scroll-margin 2 |
|
119 |
scroll-preserve-screen-position t |
|
120 |
) |
|
121 |
||
122 |
;; ---------------------------------------------------------------------- |
|
123 |
;; fringe-mode |
|
0 | 124 |
|
125 |
;; ---------------------------------------------------------------------- |
|
126 |
;; *Text* |
|
127 |
(setq default-major-mode 'text-mode) |
|
128 |
||
129 |
;; ---------------------------------------------------------------------- |
|
64
54ef0d72488f
More pretty with selecting.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
63
diff
changeset
|
130 |
;; syntax highlighting |
0 | 131 |
(setq font-lock-maximum-decoration t) |
132 |
(global-font-lock-mode 1 t) |
|
133 |
||
134 |
;; ---------------------------------------------------------------------- |
|
65
fe5b010623cd
More pretty with selecting.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
64
diff
changeset
|
135 |
;; highlight selected text |
64
54ef0d72488f
More pretty with selecting.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
63
diff
changeset
|
136 |
|
145
b1fdfc950089
More correct code for pc-select.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
144
diff
changeset
|
137 |
;; 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
|
138 |
(transient-mark-mode 1) |
64
54ef0d72488f
More pretty with selecting.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
63
diff
changeset
|
139 |
(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
|
140 |
|
64
54ef0d72488f
More pretty with selecting.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
63
diff
changeset
|
141 |
;; Order of next item is important. |
145
b1fdfc950089
More correct code for pc-select.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
144
diff
changeset
|
142 |
(require 'pc-select) |
b1fdfc950089
More correct code for pc-select.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
144
diff
changeset
|
143 |
;; To avoid some key bindings as F6, etc. Must set before 'pc-selection-mode' invoke. |
b1fdfc950089
More correct code for pc-select.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
144
diff
changeset
|
144 |
(setq pc-select-selection-keys-only t) |
b1fdfc950089
More correct code for pc-select.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
144
diff
changeset
|
145 |
(pc-selection-mode 1) |
64
54ef0d72488f
More pretty with selecting.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
63
diff
changeset
|
146 |
|
146
506d2883199f
kill/yank func also use/update CLIPBOARD selsction on X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
145
diff
changeset
|
147 |
(when (eq window-system 'x) |
506d2883199f
kill/yank func also use/update CLIPBOARD selsction on X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
145
diff
changeset
|
148 |
(setq x-select-enable-clipboard t) ; from Emacs 21.2.1 and newer |
506d2883199f
kill/yank func also use/update CLIPBOARD selsction on X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
145
diff
changeset
|
149 |
) |
506d2883199f
kill/yank func also use/update CLIPBOARD selsction on X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
145
diff
changeset
|
150 |
|
64
54ef0d72488f
More pretty with selecting.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
63
diff
changeset
|
151 |
;; ---------------------------------------------------------------------- |
102
25585e240b4a
Move customization from .emacs (custom-set-variables) to .emacs-my. Remove duplication.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
101
diff
changeset
|
152 |
;; line |
1
30e99e01ddc4
add auto-mode-alist for bat-files and load mercurial
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
0
diff
changeset
|
153 |
(if window-system |
0 | 154 |
(progn |
155 |
(global-hl-line-mode t) |
|
156 |
(custom-set-faces '(hl-line ((t (:inherit highlight :background "light yellow"))))) |
|
157 |
) |
|
158 |
) |
|
159 |
||
160 |
;; ---------------------------------------------------------------------- |
|
102
25585e240b4a
Move customization from .emacs (custom-set-variables) to .emacs-my. Remove duplication.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
101
diff
changeset
|
161 |
;; paren, brace |
0 | 162 |
|
163 |
(show-paren-mode 1) ; Parenthesis matching via highlighting. |
|
164 |
;; (setq show-paren-style 'expression) ; |
|
165 |
(setq show-paren-style (quote parenthesis)) |
|
166 |
||
167 |
;; ====================================================================== |
|
64
54ef0d72488f
More pretty with selecting.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
63
diff
changeset
|
168 |
;; Keyboard, mouse. |
0 | 169 |
|
52
b0b45dae5d8c
Now C-\ switch to win type keyboard layout.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
51
diff
changeset
|
170 |
;; cyrillic-jcuken for 567 is :,. |
b0b45dae5d8c
Now C-\ switch to win type keyboard layout.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
51
diff
changeset
|
171 |
;; russian-computer for 567 is %^& |
113
78dfaf5e7f04
cyrillic-jcuken is more pretty input method!
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
112
diff
changeset
|
172 |
(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
|
173 |
|
0 | 174 |
;; (pc-bindings-mode) ; Myself define keybinding, see |
175 |
||
176 |
;; ---------------------------------------------------------------------- |
|
177 |
;; Completition |
|
178 |
(partial-completion-mode t) ; For example, M-x p-c-m expands to M-x partial-completion-mode |
|
179 |
||
180 |
;; ---------------------------------------------------------------------- |
|
181 |
;; Mouse |
|
182 |
||
183 |
;; Scroll Bar gets dragged by mouse butn 1 |
|
184 |
(global-set-key [vertical-scroll-bar down-mouse-1] 'scroll-bar-drag) |
|
185 |
;; Paste at point NOT at cursor |
|
151 | 186 |
(setq mouse-yank-at-point t) |
0 | 187 |
(mouse-wheel-mode 1) |
188 |
||
189 |
;; ---------------------------------------------------------------------- |
|
190 |
;; Key Binding (Short-keys). |
|
191 |
||
192 |
(global-set-key [home] 'beginning-of-line) |
|
193 |
(global-set-key [end] 'end-of-line) |
|
194 |
(global-set-key [C-home] 'beginning-of-buffer) |
|
195 |
(global-set-key [C-end] 'end-of-buffer) |
|
196 |
(global-set-key [C-delete] 'kill-word) |
|
197 |
(global-set-key [delete] 'delete-char) |
|
198 |
;; (global-set-key [backspace] 'backward-delete-char-untabify) ; not work properly in *info* mode |
|
199 |
||
200 |
;; setting some f[1-12] keys |
|
201 |
(global-set-key [f1] 'help) |
|
202 |
(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
|
203 |
;; (global-set-key [xxx] 'ediff-buffers) |
0 | 204 |
(global-set-key [f4] 'ispell-buffer) |
134
a071b60e4339
Set key binding to rename buffer.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
125
diff
changeset
|
205 |
(global-set-key [S-f6] 'rename-buffer) |
0 | 206 |
(global-set-key [f8] 'kill-this-buffer) |
207 |
(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
|
208 |
(global-set-key [f6] 'toggle-truncate-lines) |
0 | 209 |
|
210 |
;; *Occur* |
|
115
859e177e9ab8
Remove f3 keybinding as has C-s <ret>. f7 set to occur.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
114
diff
changeset
|
211 |
(global-set-key [f7] 'occur) ; Key binding as in mc |
0 | 212 |
|
213 |
;; frames, windows manipulation, switch buffers |
|
214 |
(global-set-key [?\C-x right] 'next-buffer) |
|
215 |
(global-set-key [?\C-x left] 'previous-buffer) |
|
216 |
||
8
c33aa66ebb2e
Added highlight for TODO, FIXME, tabs etc.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
7
diff
changeset
|
217 |
(global-set-key (kbd "C-x C-d") 'dired) |
c33aa66ebb2e
Added highlight for TODO, FIXME, tabs etc.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
7
diff
changeset
|
218 |
|
0 | 219 |
(global-set-key (kbd "\e\eg") 'goto-line) |
220 |
(global-set-key (kbd "\e\er") 'query-replace-regexp) |
|
221 |
||
81
0ce6eaf6f26c
Disable C-z, it ugly.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
80
diff
changeset
|
222 |
;; Disable C-z, it ugly. |
0ce6eaf6f26c
Disable C-z, it ugly.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
80
diff
changeset
|
223 |
(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
|
224 |
|
0 | 225 |
;; (global-set-key [language-change] 'ignore) |
226 |
||
227 |
;; ====================================================================== |
|
7
8eae4300e86f
Перебил сочетание клавиш C-x C-d для вызова dired, вместо dir-list.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
6
diff
changeset
|
228 |
;; 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
|
229 |
|
0 | 230 |
; . |
231 |
(codepage-setup 866) |
|
232 |
(codepage-setup 1251) |
|
233 |
||
53 | 234 |
;; Comment because prefer-coding-system will be ignored. |
235 |
;; (setq-default coding-system-for-read 'cp1251-dos) |
|
236 |
;; (setq-default coding-system-for-write 'cp1251-dos) |
|
0 | 237 |
|
238 |
;; (setq locale-coding-system 'cp1251-dos) |
|
239 |
;; (set-terminal-coding-system 'cp1251) |
|
240 |
;; (set-keyboard-coding-system 'cp1251) |
|
241 |
||
242 |
(prefer-coding-system 'koi8-r-dos) |
|
243 |
(prefer-coding-system 'utf-16-le) |
|
244 |
(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
|
245 |
|
46543c097be0
Transfer changer from .eamcs_unix, add case for w32 or other system.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
3
diff
changeset
|
246 |
(modify-coding-system-alist 'file "\\.el" 'iso-2022-7bit) |
106
0591d06cf752
Решил проблему copy/paste в X. Решил проблему поиска в UTF-8 буфере.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
247 |
(cond |
0591d06cf752
Решил проблему copy/paste в X. Решил проблему поиска в UTF-8 буфере.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
248 |
((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
|
249 |
(progn |
106
0591d06cf752
Решил проблему copy/paste в X. Решил проблему поиска в UTF-8 буфере.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
250 |
(set-selection-coding-system 'cp1251) |
0591d06cf752
Решил проблему copy/paste в X. Решил проблему поиска в UTF-8 буфере.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
251 |
(prefer-coding-system 'utf-8-unix) |
0591d06cf752
Решил проблему copy/paste в X. Решил проблему поиска в UTF-8 буфере.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
252 |
(prefer-coding-system 'cp1251-dos) |
0591d06cf752
Решил проблему copy/paste в X. Решил проблему поиска в UTF-8 буфере.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
253 |
)) |
0591d06cf752
Решил проблему copy/paste в X. Решил проблему поиска в UTF-8 буфере.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
254 |
((equal window-system 'x) |
0591d06cf752
Решил проблему copy/paste в X. Решил проблему поиска в UTF-8 буфере.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
255 |
(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
|
256 |
(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
|
257 |
(prefer-coding-system 'utf-8-unix) |
106
0591d06cf752
Решил проблему copy/paste в X. Решил проблему поиска в UTF-8 буфере.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
258 |
(setq selection-coding-system 'ctext-with-extensions) |
0591d06cf752
Решил проблему copy/paste в X. Решил проблему поиска в UTF-8 буфере.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
259 |
(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
|
260 |
(modify-coding-system-alist 'process ".*" 'utf-8-unix) |
106
0591d06cf752
Решил проблему copy/paste в X. Решил проблему поиска в UTF-8 буфере.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
261 |
)) |
0591d06cf752
Решил проблему copy/paste в X. Решил проблему поиска в UTF-8 буфере.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
262 |
(t |
0591d06cf752
Решил проблему copy/paste в X. Решил проблему поиска в UTF-8 буфере.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
263 |
(progn |
0591d06cf752
Решил проблему copy/paste в X. Решил проблему поиска в UTF-8 буфере.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
264 |
;; (set-selection-coding-system 'utf-8-unix) |
0591d06cf752
Решил проблему copy/paste в X. Решил проблему поиска в UTF-8 буфере.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
265 |
(prefer-coding-system 'cp1251-dos) |
0591d06cf752
Решил проблему copy/paste в X. Решил проблему поиска в UTF-8 буфере.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
266 |
(prefer-coding-system 'utf-8-unix) |
0591d06cf752
Решил проблему copy/paste в X. Решил проблему поиска в UTF-8 буфере.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
267 |
(modify-coding-system-alist 'process ".*" 'utf-8-unix) |
0591d06cf752
Решил проблему copy/paste в X. Решил проблему поиска в UTF-8 буфере.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
268 |
)) |
4
46543c097be0
Transfer changer from .eamcs_unix, add case for w32 or other system.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
3
diff
changeset
|
269 |
) |
0 | 270 |
|
271 |
;; XXXXXXXXXXXXXXXXXXXXXXXX |
|
272 |
||
273 |
;; To open from command line file, which names has extended opcode |
|
274 |
;; (set-file-name-coding-system 'cp1251) |
|
275 |
||
52
b0b45dae5d8c
Now C-\ switch to win type keyboard layout.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
51
diff
changeset
|
276 |
;; (set-language-environment "Russian") ; XXX not used as set default coding system to koi8-r. |
0 | 277 |
|
278 |
;; ====================================================================== |
|
279 |
;; |
|
280 |
;; NON-STANDARD VARIABLES |
|
281 |
||
282 |
;; ====================================================================== |
|
283 |
;; |
|
284 |
;; STANDARD VARIABLES |
|
285 |
||
286 |
(if (boundp 'confirm-kill-emacs) |
|
287 |
(setq confirm-kill-emacs 'yes-or-no-p)) |
|
288 |
||
289 |
;; Try to speed things up, especially in VM. |
|
290 |
(setq gc-cons-threshold 2000000) |
|
291 |
||
292 |
;; Don't beep in my headphones! |
|
84 | 293 |
(setq ring-bell-function '(lambda () "Empty ring-bell-function." nil)) |
294 |
(setq visible-bell t) ; With default ring-bell-function in text terminal |
|
295 |
; revert screen if press [end] or [home] |
|
0 | 296 |
|
297 |
;; Prompt before evaluating local bits of lisp. This stops people |
|
298 |
;; putting things at the end of files which delete all your files! |
|
299 |
(setq enable-local-variables t |
|
300 |
enable-local-eval 1) |
|
301 |
||
302 |
;; ====================================================================== |
|
303 |
;; |
|
304 |
;; STANDARD LIBRARIES |
|
305 |
||
306 |
(require 'jka-compr) ; Automatic decompression, hooks for tar-mode. |
|
307 |
(if (fboundp 'auto-compression-mode) |
|
308 |
(auto-compression-mode 1)) |
|
309 |
||
310 |
;; ---------------------------------------------------------------------- |
|
311 |
;; *Recentf* |
|
109
75b4bf140e73
Prevent TRAMP to login on remote host when loading.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
108
diff
changeset
|
312 |
|
0 | 313 |
(require 'recentf) |
109
75b4bf140e73
Prevent TRAMP to login on remote host when loading.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
108
diff
changeset
|
314 |
;; 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
|
315 |
;; 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
|
316 |
(setq recentf-auto-cleanup 'never) |
0 | 317 |
(recentf-mode t) |
318 |
(setq recentf-max-saved-items 200) |
|
319 |
(global-set-key (kbd "\e\eq") 'recentf-open-files) |
|
320 |
||
321 |
;; ---------------------------------------------------------------------- |
|
322 |
;; revert |
|
323 |
(global-set-key [f5] 'revert-buffer) |
|
324 |
(setq revert-without-query (quote (".*"))) |
|
325 |
(setq auto-revert-interval 2) |
|
326 |
||
327 |
;; ====================================================================== |
|
7
8eae4300e86f
Перебил сочетание клавиш C-x C-d для вызова dired, вместо dir-list.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
6
diff
changeset
|
328 |
;; Convenient |
0 | 329 |
|
330 |
;; ---------------------------------------------------------------------- |
|
331 |
;; Completion |
|
153
a03216c9fa8c
Delete dust. Correct 'completion-ignored-extensions' list.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
332 |
|
0 | 333 |
(require 'icomplete) ; Interactive completion in minibuffer. |
153
a03216c9fa8c
Delete dust. Correct 'completion-ignored-extensions' list.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
334 |
(icomplete-mode 1) |
0 | 335 |
|
153
a03216c9fa8c
Delete dust. Correct 'completion-ignored-extensions' list.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
336 |
(setq completion-ignored-extensions |
a03216c9fa8c
Delete dust. Correct 'completion-ignored-extensions' list.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
337 |
'("CVS/" ".hg/" ".svn/" ".git/" ".bzr/" |
a03216c9fa8c
Delete dust. Correct 'completion-ignored-extensions' list.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
338 |
".o" "~" ".bin" ".bak" ".obj" ".map" ".a" ".ln" ".blg" ".bbl" ".elc" |
a03216c9fa8c
Delete dust. Correct 'completion-ignored-extensions' list.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
339 |
".lof" ".glo" ".idx" ".lot" ".fmt" ".tfm" ".class" ".fas" ".lib" ".x86f" ".sparcf" |
a03216c9fa8c
Delete dust. Correct 'completion-ignored-extensions' list.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
340 |
".lo" ".la" ".toc" ".log" ".aux" ".cp" ".fn" ".ky" ".pg" ".tp" ".vr" ".cps" |
a03216c9fa8c
Delete dust. Correct 'completion-ignored-extensions' list.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
341 |
".fns" ".kys" ".pgs" ".tps" ".vrs")) |
0 | 342 |
|
343 |
;; ---------------------------------------------------------------------- |
|
344 |
;; *grep* |
|
345 |
(setq grep-command "find . -name '*' -exec grep -nH '' {} ;" |
|
88 | 346 |
grep-find-command "find . '(' -name .svn -o -name CVS -o -name .hg -o -name _darcs ')' -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
|
347 |
grep-highlight-matches nil ; do not set t because some grep do not has --color options |
0 | 348 |
grep-tree-command "find <D> <X> -type f <F> -print0 | xargs -0 -e grep <C> -nH <R>" |
349 |
grep-use-null-device t) |
|
350 |
(setq blink-matching-paren-on-screen t) |
|
351 |
||
352 |
;; ---------------------------------------------------------------------- |
|
353 |
;; Music |
|
354 |
(setq gnus-audio-au-player "winamp.exe" |
|
355 |
gnus-audio-directory "D:\\music" |
|
356 |
gnus-audio-wav-player "winamp.exe") |
|
357 |
||
97
fe4102cad849
Open egg files as archive.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
92
diff
changeset
|
358 |
;; ---------------------------------------------------------------------- |
fe4102cad849
Open egg files as archive.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
92
diff
changeset
|
359 |
;; archive |
fe4102cad849
Open egg files as archive.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
92
diff
changeset
|
360 |
|
fe4102cad849
Open egg files as archive.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
92
diff
changeset
|
361 |
(modify-coding-system-alist 'file "\\.\\(war\\|ear\\|sar\\|egg\\)\\'" 'no-conversion) |
fe4102cad849
Open egg files as archive.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
92
diff
changeset
|
362 |
|
fe4102cad849
Open egg files as archive.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
92
diff
changeset
|
363 |
(add-to-list 'auto-mode-alist '("\\.\\(war\\|ear\\|sar\\|egg\\)\\'" . archive-mode)) |
0 | 364 |
|
98
5223817dad90
Use mozilla browser. Not tested for Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
97
diff
changeset
|
365 |
;; ---------------------------------------------------------------------- |
5223817dad90
Use mozilla browser. Not tested for Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
97
diff
changeset
|
366 |
;; browser |
5223817dad90
Use mozilla browser. Not tested for Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
97
diff
changeset
|
367 |
|
138
90fda97adcb1
Setup browse-url func for linux and windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
120
diff
changeset
|
368 |
(cond |
90fda97adcb1
Setup browse-url func for linux and windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
120
diff
changeset
|
369 |
((equal window-system 'w32) |
90fda97adcb1
Setup browse-url func for linux and windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
120
diff
changeset
|
370 |
(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
|
371 |
(t |
90fda97adcb1
Setup browse-url func for linux and windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
120
diff
changeset
|
372 |
(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
|
373 |
|
0 | 374 |
;; ====================================================================== |
7
8eae4300e86f
Перебил сочетание клавиш C-x C-d для вызова dired, вместо dir-list.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
6
diff
changeset
|
375 |
;; TIME SETTING |
0 | 376 |
|
377 |
;; ---------------------------------------------------------------------- |
|
378 |
;; Time |
|
116 | 379 |
|
120
5b02710b7ffc
display-time-format " %H:%M " sometimes buggy.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
119
diff
changeset
|
380 |
;; Also useful such format: |
5b02710b7ffc
display-time-format " %H:%M " sometimes buggy.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
119
diff
changeset
|
381 |
;; (setq display-time-format " %H:%M %d-%m-%y ") |
125
8d96347feb02
Dont show load average.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
124
diff
changeset
|
382 |
(setq display-time-24hr-format t) |
8d96347feb02
Dont show load average.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
124
diff
changeset
|
383 |
(setq display-time-default-load-average nil) |
116 | 384 |
(display-time) |
0 | 385 |
|
386 |
;; ---------------------------------------------------------------------- |
|
387 |
;; Calendar |
|
388 |
;; (setq mark-holidays-in-calendar t) |
|
389 |
;; (setq all-christian-calendar-holidays t) |
|
390 |
;; (setq calendar-date-display-form (quote ((format "%04s-%02d-%02d" year (string-to-int month) (string-to-int day))))) |
|
391 |
;; (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
|
392 |
(setq calendar-week-start-day 1) |
71cec5d9c60f
Set week start with Monday.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
48
diff
changeset
|
393 |
(setq european-calendar-style t) |
0 | 394 |
|
395 |
;; ====================================================================== |
|
396 |
;; |
|
397 |
;; STANDARD HOOKS |
|
398 |
||
399 |
(add-hook 'write-file-hooks 'time-stamp) |
|
400 |
||
401 |
;; ====================================================================== |
|
7
8eae4300e86f
Перебил сочетание клавиш C-x C-d для вызова dired, вместо dir-list.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
6
diff
changeset
|
402 |
;; *auto-fill* |
0 | 403 |
|
148
7df64d2c9f3d
Remove unused key binding. Added more docs.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
147
diff
changeset
|
404 |
;; To enable/disable auto-fill mode type ESC M-f. |
7df64d2c9f3d
Remove unused key binding. Added more docs.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
147
diff
changeset
|
405 |
|
102
25585e240b4a
Move customization from .emacs (custom-set-variables) to .emacs-my. Remove duplication.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
101
diff
changeset
|
406 |
(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
|
407 |
|
148
7df64d2c9f3d
Remove unused key binding. Added more docs.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
147
diff
changeset
|
408 |
;; 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
|
409 |
;; 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
|
410 |
(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
|
411 |
|
0 | 412 |
;; Turn on auto-fill mode |
413 |
(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
|
414 |
(add-hook 'text-mode-hook 'turn-on-auto-fill) |
0 | 415 |
|
416 |
;; ---------------------------------------------------------------------- |
|
417 |
;; DESIRE |
|
418 |
||
419 |
;; (require 'desire) |
|
420 |
||
421 |
;; (add-to-list 'desire-load-path |
|
9 | 422 |
;; (expand-file-name "~/share/emacs/desire")) |
0 | 423 |
;; (add-to-list 'auto-mode-alist |
9 | 424 |
;; (cons (concat (regexp-quote desire-extension) "\\'") |
425 |
;; 'emacs-lisp-mode)) |
|
0 | 426 |
|
427 |
;; ---------------------------------------------------------------------- |
|
428 |
||
429 |
;; Pilot support |
|
430 |
;; (desire 'pilot) |
|
431 |
||
432 |
;; ---------------------------------------------------------------------- |
|
433 |
||
434 |
;; BBDB - Must be loaded before most other things, since other things |
|
435 |
;; may perform special configuration if BBDB is present. |
|
436 |
;; |
|
437 |
;; (desire 'bbdb "bbdb") |
|
438 |
||
439 |
;; ---------------------------------------------------------------------- |
|
440 |
||
441 |
;; These provide options for the various message handling packages. |
|
442 |
;; (desire 'browse-url) |
|
443 |
;; (desire 'mailcrypt) |
|
444 |
||
445 |
;; Message handing packages. |
|
446 |
;; (desire 'gnus) |
|
447 |
;; (desire 'message) |
|
448 |
;; (desire 'sendmail) |
|
449 |
||
450 |
;; ---------------------------------------------------------------------- |
|
451 |
||
452 |
;; Miscellaneous |
|
453 |
||
454 |
;; (desire 'abbrev) |
|
455 |
;; (desire 'bibtex) |
|
456 |
;; (desire 'calc) |
|
457 |
;; (desire 'cc-mode) |
|
458 |
;; (desire 'ediff) |
|
459 |
;; (desire 'eiffel-mode) |
|
460 |
;; (desire 'emacs-w3m) |
|
461 |
;; (desire 'eudc) |
|
462 |
;; (desire 'filladapt) |
|
463 |
;;;; (desire 'hugs-mode) |
|
464 |
;; (desire 'haskell-mode) |
|
465 |
;; (desire 'latex) |
|
466 |
;; (desire 'lispdir) |
|
467 |
;; (desire 'mpg123) |
|
468 |
;; (desire 'php-mode) |
|
469 |
;; (desire 'ps-print) |
|
470 |
;; (desire 'sh-script) |
|
471 |
;; (desire 'shell) |
|
472 |
;; (desire 'tex) |
|
473 |
;; (desire 'w3) |
|
474 |
||
475 |
;; ====================================================================== |
|
476 |
;; |
|
477 |
;; PERSONAL |
|
478 |
||
479 |
;; (require 'chord-mode) ; edit guitar music. |
|
480 |
;; (require 'discography) ; variant of BibTeX mode for discographies. |
|
481 |
||
482 |
;; ====================================================================== |
|
483 |
;; |
|
484 |
;; unNOVICEd commands... |
|
485 |
;; |
|
486 |
;; The following commands are usually disabled by default. Enable |
|
487 |
;; them... |
|
488 |
||
489 |
(put 'eval-expression 'disabled nil) |
|
490 |
(put 'downcase-region 'disabled nil) |
|
491 |
(put 'upcase-region 'disabled nil) |
|
492 |
(put 'narrow-to-page 'disabled nil) |
|
493 |
(put 'narrow-to-region 'disabled nil) |
|
494 |
||
495 |
;; ====================================================================== |
|
7
8eae4300e86f
Перебил сочетание клавиш C-x C-d для вызова dired, вместо dir-list.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
6
diff
changeset
|
496 |
;; TEX |
0 | 497 |
(setq tex-run-command "initex") |
498 |
||
499 |
||
500 |
;; ====================================================================== |
|
7
8eae4300e86f
Перебил сочетание клавиш C-x C-d для вызова dired, вместо dir-list.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
6
diff
changeset
|
501 |
;; AUC TeX |
0 | 502 |
|
503 |
;(add-hook 'LaTeX-mode-hook 'LaTeX-install-toolbar) |
|
504 |
;; (setq TeX-parse-self t) ; Enable parse on load. |
|
505 |
;; (setq TeX-auto-save t) ; Enable parse on save. |
|
506 |
;; (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 |
|
507 |
||
508 |
;(setq TeX-PDF-mode t) |
|
509 |
;(setq TeX-interactive-mode t) |
|
510 |
;(setq TeX-source-specials-mode 1) |
|
511 |
||
512 |
;; |
|
513 |
;;; some more menu entries in the command list: |
|
514 |
;;; see tex-mik.el from package auctex: %v is defined in tex-mik.el |
|
515 |
;;; other variables are defined in tex.el from auctex |
|
516 |
;;; the meaning of some auctex-varibles: |
|
517 |
;symbols defined in tex.el and tex-mik.el: |
|
518 |
;%b name slave tex-file %t name master tex-file |
|
519 |
;%d dvi-file %f ps-file |
|
520 |
;%l "latex --src-specials" |
|
521 |
;%n line number %p printcommand %q "lpq" |
|
522 |
;%r (TeX-style-check TeX-print-style) |
|
523 |
;%s master-file-name without extention |
|
524 |
;%v yap command view line |
|
525 |
;(eval-after-load "tex" |
|
526 |
; '(progn |
|
527 |
; (add-to-list 'TeX-command-list |
|
9 | 528 |
; (list "->PS landscape for pdf" |
529 |
; "dvips %d -N0 -Ppdf -G0 -T 297mm,210mm -o %f " |
|
530 |
; 'TeX-run-command nil t)) |
|
0 | 531 |
; (add-to-list 'TeX-command-list |
9 | 532 |
; (list "All Texify run-viewer" |
533 |
; "texify --tex-opt=--src --run-viewer --clean %s.tex" |
|
534 |
; 'TeX-run-command nil t)))) |
|
0 | 535 |
|
536 |
||
537 |
;; ====================================================================== |
|
538 |
;; |
|
539 |
;; Reftex activation (Reftex is included with Emacs 21.1) |
|
540 |
||
541 |
;; (autoload 'reftex-mode "reftex" "RefTeX Minor Mode" t) |
|
542 |
;; (autoload 'turn-on-reftex "reftex" "RefTeX Minor Mode" nil) |
|
543 |
;; (autoload 'reftex-citation "reftex-cite" "Make citation" nil) |
|
544 |
;; (autoload 'reftex-index-phrase-mode "reftex-index" "Phrase mode" t) |
|
545 |
;; (add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; with AUCTeX LaTeX mode |
|
546 |
;; (add-hook 'latex-mode-hook 'turn-on-reftex) ; with Emacs latex mode |
|
547 |
||
548 |
;; ====================================================================== |
|
549 |
;; |
|
550 |
;; PreviewLatex |
|
551 |
||
552 |
;(load "preview-latex.el" nil t t) |
|
553 |
||
554 |
;(add-hook 'LaTeX-mode-hook #'LaTeX-preview-setup) |
|
555 |
;(autoload 'LaTeX-preview-setup "preview") |
|
556 |
||
557 |
||
558 |
;; ====================================================================== |
|
559 |
;; |
|
560 |
;; Info |
|
561 |
||
562 |
(require 'info) |
|
25
e67fed7ec1f2
Определил путь к info-файлам для Windows.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
24
diff
changeset
|
563 |
(if (equal window-system 'w32) |
e67fed7ec1f2
Определил путь к info-файлам для Windows.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
24
diff
changeset
|
564 |
(progn |
141
c88281ec188e
Temporary comment Info-directory-list assignment for Windows. Need more
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
140
diff
changeset
|
565 |
;; TODO Write which func to find runemacs.exe dir. |
c88281ec188e
Temporary comment Info-directory-list assignment for Windows. Need more
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
140
diff
changeset
|
566 |
;; (setq Info-directory-list (list (expand-file-name "~/../bin/emacs/info"))) |
c88281ec188e
Temporary comment Info-directory-list assignment for Windows. Need more
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
140
diff
changeset
|
567 |
;; (add-to-list 'Info-directory-list (expand-file-name "~/../bin/MinGW/info") t) ; t - append to the end |
25
e67fed7ec1f2
Определил путь к info-файлам для Windows.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
24
diff
changeset
|
568 |
)) |
0 | 569 |
|
570 |
;; ====================================================================== |
|
571 |
;; |
|
572 |
;; SHELL |
|
573 |
||
574 |
;; If you plan to use the bash shell, add the following lines to your .emacs file: |
|
575 |
;; (setq binary-process-input t) |
|
576 |
;; (setq w32-quote-process-args ?\") |
|
577 |
;; (setq shell-file-name "bash") ;; or sh if you rename your bash executable to sh. |
|
578 |
;; (setenv "SHELL" shell-file-name) |
|
579 |
;; (setq explicit-shell-file-name shell-file-name) |
|
580 |
;; (setq explicit-sh-args '("-login" "-i")) |
|
581 |
||
582 |
;; Include the following only if you want to run |
|
583 |
;; bash as your shell. |
|
584 |
||
585 |
;; Setup Emacs to run bash as its primary shell. |
|
586 |
;; (setq shell-file-name "bash") |
|
587 |
;; (setq shell-command-switch "-c") |
|
588 |
;; (setq explicit-shell-file-name shell-file-name) |
|
589 |
;; (setenv "SHELL" shell-file-name) |
|
590 |
;; (setq explicit-sh-args '("-login" "-i")) |
|
591 |
;; (if (boundp 'w32-quote-process-args) |
|
592 |
;; (setq w32-quote-process-args ?\")) ;; Include only for MS Windows. |
|
593 |
||
594 |
;; (setq sh-shell-file "D:\\home\\cygwin\\bin\\sh.exe") |
|
595 |
;; (setq sh-shell-arg (quote ((bash) (csh . "-f") (pdksh) (ksh88) (rc . "-p") (wksh) (zsh . "-f") (sh . "-i")))) |
|
596 |
(setq explicit-bash-args (quote ("-login" "-i"))) |
|
1
30e99e01ddc4
add auto-mode-alist for bat-files and load mercurial
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
0
diff
changeset
|
597 |
|
117
e8fec75adcd6
Set .bat file association if bat-mode provided.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
116
diff
changeset
|
598 |
(when (provide 'bat-mode) |
e8fec75adcd6
Set .bat file association if bat-mode provided.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
116
diff
changeset
|
599 |
(progn |
e8fec75adcd6
Set .bat file association if bat-mode provided.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
116
diff
changeset
|
600 |
(add-to-list 'auto-mode-alist '("\\.[bB][aA][tT]$" . bat-mode)) |
e8fec75adcd6
Set .bat file association if bat-mode provided.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
116
diff
changeset
|
601 |
;; For DOS init files |
118
27add777f357
Correct bat-mode auto-mode-alist.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
117
diff
changeset
|
602 |
(when (equal window-system 'w32) |
27add777f357
Correct bat-mode auto-mode-alist.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
117
diff
changeset
|
603 |
(add-to-list 'auto-mode-alist '("CONFIG\\." . bat-mode)) |
119 | 604 |
(add-to-list 'auto-mode-alist '("AUTOEXEC\\." . bat-mode))))) |
0 | 605 |
|
606 |
;; ====================================================================== |
|
607 |
;; |
|
608 |
;; Spell |
|
609 |
||
105
52a334c6c908
As spell programm use ispell.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
104
diff
changeset
|
610 |
(setq ispell-program-name "ispell") |
0 | 611 |
;(setq ispell-dictionary "russianw"); default dictionary |
612 |
;(setq ispell-local-dictionary "russianw"); default dictionary |
|
613 |
;(add-hook 'text-mode-hook 'flyspell-mode) |
|
614 |
;(setq flyspell-default-dictionary "russianw") |
|
615 |
;(setq flyspell-delay '1) |
|
616 |
;; (setq ispell-local-dictionary-alist |
|
9 | 617 |
;; '((nil ; default (english.aff) |
0 | 618 |
;; "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B") nil iso-8859-1) |
9 | 619 |
;; ("UK-xlg" ; english large version |
0 | 620 |
;; "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B" "-d" "UK-xlg") nil iso-8859-1) |
9 | 621 |
;; ("US-xlg" ; american large version |
0 | 622 |
;; "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B" "-d" "US-xlg") nil iso-8859-1) |
623 |
;; ) |
|
624 |
;; ) |
|
625 |
||
626 |
;; ====================================================================== |
|
67
33caed66cee4
Set align for org-mode tags.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
66
diff
changeset
|
627 |
;; 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
|
628 |
|
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
629 |
;; ---------------------------------------------------------------------- |
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
630 |
;; org-mode |
79
f80cd58e09cb
Use buildin and installed version of org-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
78
diff
changeset
|
631 |
|
108
1559bb79bdd1
Enable org mode for >= emacs22.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
107
diff
changeset
|
632 |
(if (>= emacs-major-version 22) |
1559bb79bdd1
Enable org mode for >= emacs22.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
107
diff
changeset
|
633 |
(progn |
1559bb79bdd1
Enable org mode for >= emacs22.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
107
diff
changeset
|
634 |
(require 'org) |
1559bb79bdd1
Enable org mode for >= emacs22.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
107
diff
changeset
|
635 |
)) |
1559bb79bdd1
Enable org mode for >= emacs22.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
107
diff
changeset
|
636 |
|
57
635e1a8a3ed9
Remove org-todo-keywords because of format incompatibility between versions.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
56
diff
changeset
|
637 |
;; XXX org-todo-keywords '((sequence "TODO" "START" "|" "DONE")) org-version 4.67c |
60
eb8bd05481a8
Размышления о том как устанавливается org-todo-keywords.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
59
diff
changeset
|
638 |
;; XXX (setq org-todo-keywords '("TODO" "START" "DONE")) org-version 6.05b |
79
f80cd58e09cb
Use buildin and installed version of org-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
78
diff
changeset
|
639 |
(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
|
640 |
(progn |
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
641 |
(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
|
642 |
(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
|
643 |
(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
|
644 |
(setq org-agenda-ndays 14 |
55deb80345ab
Some enhancement for org-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
73
diff
changeset
|
645 |
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
|
646 |
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
|
647 |
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
|
648 |
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
|
649 |
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
|
650 |
org-reverse-note-order t |
74
55deb80345ab
Some enhancement for org-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
73
diff
changeset
|
651 |
org-hide-leading-stars t |
67
33caed66cee4
Set align for org-mode tags.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
66
diff
changeset
|
652 |
org-tags-column 64 |
33caed66cee4
Set align for org-mode tags.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
66
diff
changeset
|
653 |
) |
69
754d413dcff2
Aded global key binding for GTD.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
68
diff
changeset
|
654 |
(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
|
655 |
(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
|
656 |
|
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
657 |
;; ---------------------------------------------------------------------- |
68 | 658 |
;; remember-mode |
659 |
(if (featurep 'remember) |
|
660 |
(progn |
|
661 |
(setq remember-annotation-functions '(org-remember-annotation)) |
|
662 |
(setq remember-handler-functions '(org-remember-handler)) |
|
663 |
(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
|
664 |
(define-key global-map "\C-cr" 'org-remember) |
68 | 665 |
(setq org-remember-templates |
76
3b9b47be4951
With one item emacs do not prompt choose template.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
75
diff
changeset
|
666 |
;; 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
|
667 |
'((?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
|
668 |
;; (?j "* %^{topic}\n %T\n" "~/.gtd/journal.org") |
72
03586585c558
Move customization to right place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
70
diff
changeset
|
669 |
)) |
03586585c558
Move customization to right place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
70
diff
changeset
|
670 |
(setq |
03586585c558
Move customization to right place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
70
diff
changeset
|
671 |
org-remember-store-without-prompt t |
03586585c558
Move customization to right place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
70
diff
changeset
|
672 |
) )) |
68 | 673 |
|
674 |
;; ---------------------------------------------------------------------- |
|
48
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
675 |
;; TODO, XXX, FIXME highlight. |
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
676 |
;; Show blanks and FIXME |
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
677 |
;; 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
|
678 |
|
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
679 |
(defface my-tab-face |
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
680 |
'((t :background "gray")) |
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
681 |
"Face for showing TABs." |
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
682 |
:group 'basic-faces) |
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
683 |
|
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
684 |
(defface my-todo-face |
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
685 |
'((t :foreground "red" :weight bold)) |
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
686 |
"Font for showing TODO words." |
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
687 |
:group 'basic-faces) |
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
688 |
|
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
689 |
(defface my-conflict-face |
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
690 |
'((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
|
691 |
"Font for showing conflicts." |
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
692 |
:group 'basic-faces) |
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
693 |
|
144
41a4cd881b9e
Added makfile-mode to list for highlighting TABs.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
143
diff
changeset
|
694 |
(defvar my-devel-mode-list |
41a4cd881b9e
Added makfile-mode to list for highlighting TABs.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
143
diff
changeset
|
695 |
'(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
|
696 |
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
|
697 |
"List of development modes." ) |
41a4cd881b9e
Added makfile-mode to list for highlighting TABs.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
143
diff
changeset
|
698 |
|
48
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
699 |
(add-hook 'font-lock-mode-hook (function (lambda () |
137
d86c2e8f0e36
Highlight TODO and FIXME only in desired modes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
136
diff
changeset
|
700 |
(when (or |
144
41a4cd881b9e
Added makfile-mode to list for highlighting TABs.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
143
diff
changeset
|
701 |
(member major-mode my-devel-mode-list) |
137
d86c2e8f0e36
Highlight TODO and FIXME only in desired modes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
136
diff
changeset
|
702 |
) |
48
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
703 |
(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
|
704 |
'( |
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
705 |
("\t+" 0 'my-tab-face t) |
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
706 |
("\\<\\(FIXME:?\\|XXX:?\\|TODO:?\\)\\>" 1 'my-todo-face t) |
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
707 |
("\\(=\\{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
|
708 |
)))))) |
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
709 |
|
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
710 |
;; ====================================================================== |
83
d2eaf2ed6d1c
Added basic jabber customization.
gavenkoa@gavenko.bifit.int
parents:
82
diff
changeset
|
711 |
;; communication |
d2eaf2ed6d1c
Added basic jabber customization.
gavenkoa@gavenko.bifit.int
parents:
82
diff
changeset
|
712 |
|
d2eaf2ed6d1c
Added basic jabber customization.
gavenkoa@gavenko.bifit.int
parents:
82
diff
changeset
|
713 |
;; ---------------------------------------------------------------------- |
d2eaf2ed6d1c
Added basic jabber customization.
gavenkoa@gavenko.bifit.int
parents:
82
diff
changeset
|
714 |
;; jabber |
d2eaf2ed6d1c
Added basic jabber customization.
gavenkoa@gavenko.bifit.int
parents:
82
diff
changeset
|
715 |
(when (featurep 'jabber) |
d2eaf2ed6d1c
Added basic jabber customization.
gavenkoa@gavenko.bifit.int
parents:
82
diff
changeset
|
716 |
(setq jabber-history-enabled t |
d2eaf2ed6d1c
Added basic jabber customization.
gavenkoa@gavenko.bifit.int
parents:
82
diff
changeset
|
717 |
jabber-use-global-history nil |
100
32ebaed8d92e
View more logs in jabber.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
99
diff
changeset
|
718 |
jabber-backlog-number 15 |
83
d2eaf2ed6d1c
Added basic jabber customization.
gavenkoa@gavenko.bifit.int
parents:
82
diff
changeset
|
719 |
jabber-backlog-days 30 |
124
9ae30ccad707
Dont splash by message "Some one go Away" by jabber.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
123
diff
changeset
|
720 |
jabber-alert-presence-message-function (lambda (who oldstatus newstatus statustext) nil) |
83
d2eaf2ed6d1c
Added basic jabber customization.
gavenkoa@gavenko.bifit.int
parents:
82
diff
changeset
|
721 |
) |
d2eaf2ed6d1c
Added basic jabber customization.
gavenkoa@gavenko.bifit.int
parents:
82
diff
changeset
|
722 |
) |
d2eaf2ed6d1c
Added basic jabber customization.
gavenkoa@gavenko.bifit.int
parents:
82
diff
changeset
|
723 |
|
d2eaf2ed6d1c
Added basic jabber customization.
gavenkoa@gavenko.bifit.int
parents:
82
diff
changeset
|
724 |
|
142
adfc0c678483
Basic customisation for rcirc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
141
diff
changeset
|
725 |
;; ---------------------------------------------------------------------- |
adfc0c678483
Basic customisation for rcirc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
141
diff
changeset
|
726 |
;; rcirc |
adfc0c678483
Basic customisation for rcirc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
141
diff
changeset
|
727 |
|
adfc0c678483
Basic customisation for rcirc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
141
diff
changeset
|
728 |
;; Turn on logging everything to a special buffer, for debugging. |
adfc0c678483
Basic customisation for rcirc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
141
diff
changeset
|
729 |
;; (setq rcirc-debug-flag t) |
adfc0c678483
Basic customisation for rcirc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
141
diff
changeset
|
730 |
|
adfc0c678483
Basic customisation for rcirc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
141
diff
changeset
|
731 |
(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
|
732 |
(setq rcirc-time-format "%H:%M ") |
adfc0c678483
Basic customisation for rcirc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
141
diff
changeset
|
733 |
(defun rcirc-handler-301 (process cmd sender args) |
adfc0c678483
Basic customisation for rcirc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
141
diff
changeset
|
734 |
"/away message handler.") |
adfc0c678483
Basic customisation for rcirc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
141
diff
changeset
|
735 |
|
83
d2eaf2ed6d1c
Added basic jabber customization.
gavenkoa@gavenko.bifit.int
parents:
82
diff
changeset
|
736 |
;; ====================================================================== |
0 | 737 |
;; VCS, version control, cvs, svn. |
738 |
||
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
|
739 |
(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
|
740 |
(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
|
741 |
(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
|
742 |
(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
|
743 |
)) |
0 | 744 |
|
745 |
;; (setq-default vc-svn-register-switches "--encoding cp1251") |
|
746 |
(setq-default vc-svn-register-switches nil) |
|
747 |
||
11
1fea5e1edb38
Load vc-svn if ~/.el/svn dir exist.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
10
diff
changeset
|
748 |
(setq my-svn-dir (concat my-el-dir "/svn")) |
1fea5e1edb38
Load vc-svn if ~/.el/svn dir exist.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
10
diff
changeset
|
749 |
(if (file-exists-p my-svn-dir) |
1fea5e1edb38
Load vc-svn if ~/.el/svn dir exist.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
10
diff
changeset
|
750 |
(progn |
1fea5e1edb38
Load vc-svn if ~/.el/svn dir exist.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
10
diff
changeset
|
751 |
(add-to-list 'load-path my-svn-dir) |
1fea5e1edb38
Load vc-svn if ~/.el/svn dir exist.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
10
diff
changeset
|
752 |
(require 'vc-svn) |
1fea5e1edb38
Load vc-svn if ~/.el/svn dir exist.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
10
diff
changeset
|
753 |
) |
1fea5e1edb38
Load vc-svn if ~/.el/svn dir exist.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
10
diff
changeset
|
754 |
) |
1fea5e1edb38
Load vc-svn if ~/.el/svn dir exist.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
10
diff
changeset
|
755 |
|
1fea5e1edb38
Load vc-svn if ~/.el/svn dir exist.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
10
diff
changeset
|
756 |
(if (file-exists-p (concat my-el-dir "/mercurial.el")) |
10
1c6aae52de4b
Change path to addon el.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
9
diff
changeset
|
757 |
(require 'mercurial) |
1c6aae52de4b
Change path to addon el.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
9
diff
changeset
|
758 |
) |
1
30e99e01ddc4
add auto-mode-alist for bat-files and load mercurial
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
0
diff
changeset
|
759 |
|
19
a8e7a6e94341
Теперь белый фон для annotated.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
18
diff
changeset
|
760 |
(if window-system |
a8e7a6e94341
Теперь белый фон для annotated.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
18
diff
changeset
|
761 |
(setq-default vc-annotate-background "white") |
a8e7a6e94341
Теперь белый фон для annotated.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
18
diff
changeset
|
762 |
) |
a8e7a6e94341
Теперь белый фон для annotated.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
18
diff
changeset
|
763 |
|
91 | 764 |
;; ---------------------------------------------------------------------- |
765 |
;; DVC |
|
766 |
||
767 |
(when (featurep 'dvc-emacs) |
|
768 |
(setq dvc-tips-enabled nil) |
|
769 |
) |
|
770 |
||
0 | 771 |
;; ====================================================================== |
7
8eae4300e86f
Перебил сочетание клавиш C-x C-d для вызова dired, вместо dir-list.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
6
diff
changeset
|
772 |
;; Devel, prog |
0 | 773 |
|
774 |
(add-to-list 'auto-mode-alist '("\\.cu$" . c-mode)) |
|
775 |
||
54 | 776 |
(setq comment-style (quote indent)) |
777 |
||
0 | 778 |
(setq-default show-trailing-whitespace t) |
779 |
||
780 |
;; ---------------------------------------------------------------------- |
|
7
8eae4300e86f
Перебил сочетание клавиш C-x C-d для вызова dired, вместо dir-list.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
6
diff
changeset
|
781 |
;; Diff, patch |
0 | 782 |
(setq diff-switches "-u") |
783 |
||
784 |
;; ---------------------------------------------------------------------- |
|
785 |
;; Indent |
|
786 |
||
787 |
(setq standard-indent 4) |
|
788 |
(setq c-basic-offset 4) |
|
22
8ca8997d9f1d
Определил размер отступа для sh-mode.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
21
diff
changeset
|
789 |
(setq sh-basic-offset 2) |
0 | 790 |
(setq sgml-basic-offset 4) |
791 |
||
792 |
;; TAB (tab settings) |
|
793 |
(setq-default tab-width 4) |
|
794 |
(setq-default indent-tabs-mode nil) ; t - \t |
|
795 |
(setq tab-always-indent t) |
|
796 |
(setq c-tab-always-indent t) |
|
63
35e8c02c513f
Avoid loop, which cause bug (void function).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
62
diff
changeset
|
797 |
(let ( (line-width 400) ) |
35e8c02c513f
Avoid loop, which cause bug (void function).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
62
diff
changeset
|
798 |
(setq i (+ (/ line-width 4) 1)) |
73
73e42aa11b3c
Correct initial asigned with nil.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
72
diff
changeset
|
799 |
(setq tab-stop-list nil) |
63
35e8c02c513f
Avoid loop, which cause bug (void function).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
62
diff
changeset
|
800 |
(while (> (setq i (- i 1)) 0) |
35e8c02c513f
Avoid loop, which cause bug (void function).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
62
diff
changeset
|
801 |
(setq tab-stop-list (cons (* i 4) tab-stop-list)))) |
0 | 802 |
|
803 |
;; ---------------------------------------------------------------------- |
|
804 |
;; Diff. |
|
805 |
(setq ediff-diff-options "") |
|
806 |
||
807 |
;; ---------------------------------------------------------------------- |
|
808 |
;; *Compile* |
|
809 |
(setq compile-auto-highlight t |
|
810 |
compile-command "make ") |
|
811 |
;; compilation window shall scroll down if not 0 |
|
812 |
(setq compilation-scroll-output 1) |
|
813 |
||
28
b05bcec107fd
Correct coding (aotu determine CR/LF).
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
27
diff
changeset
|
814 |
;; My funny error messages. |
20
fde58d93c047
Добавил подсветку для output-файлов cl в compile-mode.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
19
diff
changeset
|
815 |
;; XXX hook. |
fde58d93c047
Добавил подсветку для output-файлов cl в compile-mode.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
19
diff
changeset
|
816 |
(require 'compile) |
38
90354c640342
Prevent error on debian from non-exist `compilation-error-regexp-alist-alist'.
sasha@rocky
parents:
36
diff
changeset
|
817 |
(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
|
818 |
(add-to-list 'compilation-error-regexp-alist '("^ *\\(.*\\)(\\([0-9]*\\)) +:" 1 2)) |
90354c640342
Prevent error on debian from non-exist `compilation-error-regexp-alist-alist'.
sasha@rocky
parents:
36
diff
changeset
|
819 |
;; (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
|
820 |
;; (add-to-list 'compilation-mode-font-lock-keywords '("[ ]\\(/F[oe][^ ]+\\)" . 1)) |
0 | 821 |
|
822 |
;; ---------------------------------------------------------------------- |
|
823 |
;; asm |
|
36
4261883ccdb6
Use C-style comment in asm files.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
35
diff
changeset
|
824 |
;; (setq-default asm-comment-char 59) |
4261883ccdb6
Use C-style comment in asm files.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
35
diff
changeset
|
825 |
(add-hook 'asm-mode-hook '(lambda () (setq comment-start "/*") (setq comment-end "*/")) t) |
0 | 826 |
|
827 |
;; ---------------------------------------------------------------------- |
|
828 |
;; LISP |
|
829 |
(setq list-command-history-max 256) |
|
830 |
||
831 |
;; ---------------------------------------------------------------------- |
|
832 |
;; C, c-lang |
|
833 |
(setq c-echo-syntactic-information-p t) |
|
834 |
||
835 |
(defconst my-c-style |
|
129
23d028bad418
More regular indent.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
128
diff
changeset
|
836 |
'((c-tab-always-indent . t) |
0 | 837 |
(c-comment-only-line-offset . 4) |
129
23d028bad418
More regular indent.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
128
diff
changeset
|
838 |
(c-hanging-braces-alist |
131
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
839 |
. ( |
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
840 |
(brace-list-open) |
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
841 |
(substatement-open after) |
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
842 |
)) |
129
23d028bad418
More regular indent.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
128
diff
changeset
|
843 |
(c-hanging-colons-alist |
131
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
844 |
. ( |
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
845 |
(access-label after) |
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
846 |
(case-label after) |
129
23d028bad418
More regular indent.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
128
diff
changeset
|
847 |
(inher-intro) |
23d028bad418
More regular indent.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
128
diff
changeset
|
848 |
(label after) |
131
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
849 |
(member-init-intro before) |
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
850 |
)) |
129
23d028bad418
More regular indent.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
128
diff
changeset
|
851 |
(c-cleanup-list |
131
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
852 |
. ( |
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
853 |
defun-close-semi |
129
23d028bad418
More regular indent.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
128
diff
changeset
|
854 |
empty-defun-braces |
131
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
855 |
scope-operator |
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
856 |
)) |
129
23d028bad418
More regular indent.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
128
diff
changeset
|
857 |
(c-offsets-alist |
131
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
858 |
. ( |
129
23d028bad418
More regular indent.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
128
diff
changeset
|
859 |
(arglist-close . c-lineup-arglist) |
23d028bad418
More regular indent.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
128
diff
changeset
|
860 |
(arglist-cont-nonempty . ++) |
131
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
861 |
(arglist-intro . ++) |
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
862 |
(block-open . 0) |
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
863 |
(case-label . 0) |
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
864 |
(comment-intro . 0) |
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
865 |
(func-decl-cont . ++) |
129
23d028bad418
More regular indent.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
128
diff
changeset
|
866 |
(inexpr-class . 0) |
131
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
867 |
(inline-open . 0) |
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
868 |
(knr-argdecl-intro . -) |
129
23d028bad418
More regular indent.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
128
diff
changeset
|
869 |
(label . 0) |
131
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
870 |
(statement-block-intro . +) |
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
871 |
(statement-cont . ++) |
129
23d028bad418
More regular indent.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
128
diff
changeset
|
872 |
(substatement-open . 0) |
131
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
873 |
)) |
0 | 874 |
(c-echo-syntactic-information-p . t)) |
875 |
"My C Programming Style") |
|
876 |
||
877 |
;; (objc-mode . "my-mode") (c++-mode . "cc-mode") |
|
128
5a3df58678d2
Switch from c-initialization-hook to c-mode-common-hook because otherwise
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
127
diff
changeset
|
878 |
(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
|
879 |
(lambda () (c-add-style "my" my-c-style t))) |
0 | 880 |
(setq c-default-style '((java-mode . "my") (c-mode . "my") (csharp-mode . "my") (other . "my"))) |
881 |
||
882 |
;; Customizations for all modes in CC Mode. |
|
883 |
;; (defun my-c-mode-common-hook () |
|
884 |
;; ;; add my personal style and set it for the current buffer |
|
885 |
;; (c-add-style "PERSONAL" my-c-style t) |
|
886 |
;; ;; other customizations |
|
887 |
;; ;; we like auto-newline and hungry-delete |
|
888 |
;; (c-toggle-auto-hungry-state 1) |
|
889 |
;; ;; key bindings for all supported languages. We can put these in |
|
890 |
;; ;; c-mode-base-map because c-mode-map, c++-mode-map, objc-mode-map, |
|
891 |
;; ;; java-mode-map, idl-mode-map, and pike-mode-map inherit from it. |
|
892 |
;; (define-key c-mode-base-map "\C-m" 'c-context-line-break)) |
|
893 |
||
894 |
;; (add-hook 'c-mode-common-hook 'my-c-mode-common-hook) |
|
895 |
||
896 |
;; ---------------------------------------------------------------------- |
|
23 | 897 |
;; *csharp*, c-sharp |
898 |
;; |
|
0 | 899 |
(autoload 'csharp-mode "csharp-mode" "Major mode for editing C# code." t) |
900 |
(add-to-list 'auto-mode-alist '("\\.cs$" . csharp-mode)) |
|
901 |
||
902 |
;; ---------------------------------------------------------------------- |
|
903 |
;; *Java* |
|
904 |
;; Update the Emacs load-path to include the path to |
|
905 |
;; the JDE and its require packages. This code assumes |
|
906 |
;; that you have installed the packages in the emacs/site |
|
907 |
;; subdirectory of your home directory. |
|
908 |
;; (add-to-list 'load-path (expand-file-name "~/emacs/site/semantic")) |
|
909 |
;; (add-to-list 'load-path (expand-file-name "~/emacs/site/speedbar")) |
|
910 |
;; (add-to-list 'load-path (expand-file-name "~/emacs/site/elib-1.0")) |
|
911 |
;; (add-to-list 'load-path (expand-file-name "~/emacs/site/eieio")) |
|
912 |
;; (add-to-list 'load-path (expand-file-name "~/emacs/site/jde-2.3.5.1/lisp")) |
|
913 |
||
914 |
;; Load CEDET |
|
915 |
;; (load-file "~/emacs/site/common/cedet.el") |
|
916 |
;; Enabling SEMANTIC minor modes. See semantic/INSTALL for more ideas. |
|
917 |
;; (semantic-load-enable-code-helpers) |
|
918 |
||
919 |
;; If you want Emacs to defer loading the JDE until you open a |
|
920 |
;; Java file, edit the following line |
|
921 |
;; (setq defer-loading-jde nil) |
|
922 |
;; to read: |
|
923 |
;; |
|
924 |
;; (setq defer-loading-jde t) |
|
925 |
;; |
|
926 |
||
927 |
;; (if defer-loading-jde |
|
928 |
;; (progn |
|
929 |
;; (autoload 'jde-mode "jde" "JDE mode." t) |
|
930 |
;; (add-to-list 'auto-mode-alist '("\\.java\\'" . jde-mode)) |
|
931 |
;; (require 'jde))) |
|
932 |
||
933 |
||
934 |
;; Sets the basic indentation for Java source files |
|
935 |
;; to two spaces. |
|
936 |
;; (defun my-jde-mode-hook () |
|
937 |
;; (setq c-basic-offset 2)) |
|
938 |
||
939 |
;; (add-hook 'jde-mode-hook 'my-jde-mode-hook) |
|
940 |
||
941 |
;; (require 'jde) |
|
942 |
||
943 |
;; ******************** |
|
944 |
;; ECB |
|
945 |
;; ******************* |
|
946 |
||
102
25585e240b4a
Move customization from .emacs (custom-set-variables) to .emacs-my. Remove duplication.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
101
diff
changeset
|
947 |
(setq ecb-tip-of-the-day nil) |
0 | 948 |
;; (add-to-list 'load-path "~/emacs/site/ecb-2.32") |
949 |
;; (require 'ecb) |
|
950 |
||
102
25585e240b4a
Move customization from .emacs (custom-set-variables) to .emacs-my. Remove duplication.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
101
diff
changeset
|
951 |
;; (global-set-key (kbd "\e\eE") 'ecb-activate) |
0 | 952 |
|
104
e921a5d906ca
Use highlighting on sgml modes!
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
953 |
;; ---------------------------------------------------------------------- |
e921a5d906ca
Use highlighting on sgml modes!
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
954 |
;; html |
e921a5d906ca
Use highlighting on sgml modes!
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
955 |
|
e921a5d906ca
Use highlighting on sgml modes!
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
956 |
;; ---------------------------------------------------------------------- |
e921a5d906ca
Use highlighting on sgml modes!
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
957 |
;; xml |
e921a5d906ca
Use highlighting on sgml modes!
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
958 |
|
e921a5d906ca
Use highlighting on sgml modes!
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
959 |
;; ---------------------------------------------------------------------- |
e921a5d906ca
Use highlighting on sgml modes!
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
960 |
;; psgml |
e921a5d906ca
Use highlighting on sgml modes!
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
961 |
(setq sgml-set-face t) ; for highlighting in sgml |
e921a5d906ca
Use highlighting on sgml modes!
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
962 |
|
0 | 963 |
;; ====================================================================== |
7
8eae4300e86f
Перебил сочетание клавиш C-x C-d для вызова dired, вместо dir-list.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
6
diff
changeset
|
964 |
;; Printing |
0 | 965 |
|
966 |
;; Use Notepad to print plain text files to the default Windows printer |
|
967 |
;(setq lpr-command "notepad") |
|
968 |
;(setq lpr-headers-switches '("/p")) ; \ mis-use these |
|
969 |
;(setq lpr-switches nil) ; / two variables |
|
9 | 970 |
;(setq printer-name nil) ; notepad takes the default |
0 | 971 |
;(setq lpr-printer-switch "/P") ;; run notepad as batch printer |
972 |
;; |
|
973 |
;; |
|
974 |
;(setq printer-name "~/myprint.txt") |
|
975 |
;(setq ps-printer-name nil) |
|
976 |
;(setq ps-print-header nil) |
|
977 |
;; |
|
978 |
;;; some more menu entries in the command list: |
|
979 |
;;; see tex-mik.el from package auctex: %v is defined in tex-mik.el |
|
980 |
;;; other variables are defined in tex.el from auctex |
|
981 |
;;; the meaning of some auctex-varibles: |
|
982 |
;symbols defined in tex.el and tex-mik.el: |
|
983 |
;%b name slave tex-file %t name master tex-file |
|
984 |
;%d dvi-file %f ps-file |
|
985 |
;%l "latex --src-specials" |
|
986 |
;%n line number %p printcommand %q "lpq" |
|
987 |
;%r (TeX-style-check TeX-print-style) |
|
988 |
;%s master-file-name without extention |
|
989 |
;%v yap command view line |
|
990 |
;(eval-after-load "tex" |
|
991 |
; '(progn |
|
992 |
; (add-to-list 'TeX-command-list |
|
9 | 993 |
; (list "->PS landscape for pdf" |
994 |
; "dvips %d -N0 -Ppdf -G0 -T 297mm,210mm -o %f " |
|
995 |
; 'TeX-run-command nil t)) |
|
0 | 996 |
; (add-to-list 'TeX-command-list |
9 | 997 |
; (list "All Texify run-viewer" |
998 |
; "texify --tex-opt=--src --run-viewer --clean %s.tex" |
|
999 |
; 'TeX-run-command nil t)))) |
|
0 | 1000 |
|
102
25585e240b4a
Move customization from .emacs (custom-set-variables) to .emacs-my. Remove duplication.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
101
diff
changeset
|
1001 |
;; ---------------------------------------------------------------- |
25585e240b4a
Move customization from .emacs (custom-set-variables) to .emacs-my. Remove duplication.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
101
diff
changeset
|
1002 |
;; SQL |
25585e240b4a
Move customization from .emacs (custom-set-variables) to .emacs-my. Remove duplication.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
101
diff
changeset
|
1003 |
|
25585e240b4a
Move customization from .emacs (custom-set-variables) to .emacs-my. Remove duplication.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
101
diff
changeset
|
1004 |
;; (desire 'sql-mode) |
25585e240b4a
Move customization from .emacs (custom-set-variables) to .emacs-my. Remove duplication.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
101
diff
changeset
|
1005 |
(setq sql-password "") |
0 | 1006 |
|
1007 |
;; ====================================================================== |
|
1008 |
;; |
|
1009 |
;; CUA - Windows |
|
1010 |
;; Ctr-c,v,x,d windows CUA |
|
1011 |
||
1012 |
;; 21.3 |
|
1013 |
||
1014 |
;(require 'cua) |
|
1015 |
;(CUA-mode t) |
|
1016 |
;; CUA |
|
1017 |
;(setq CUA-mode-normal-cursor-color "black") |
|
1018 |
;(setq CUA-mode-overwrite-cursor-color "red") |
|
1019 |
;(setq CUA-mode-read-only-cursor-color "green") |
|
1020 |
;(CUA-keypad-mode 'numeric t); . - |
|
1021 |
;(CUA-keypad-mode 'prefix t); . - (-2) |
|
1022 |
||
1023 |
;; 21.3.50 |
|
1024 |
||
1025 |
;(require 'cua-base) |
|
1026 |
;(cua-mode t) |
|
1027 |
;; CUA |
|
1028 |
;(setq cua-normal-cursor-color "black") |
|
1029 |
;(setq cua-overwrite-cursor-color "red") |
|
1030 |
;(setq cua-read-only-cursor-color "green") |
|
1031 |
||
1032 |
;; ====================================================================== |
|
7
8eae4300e86f
Перебил сочетание клавиш C-x C-d для вызова dired, вместо dir-list.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
6
diff
changeset
|
1033 |
;; Backup |
0 | 1034 |
|
75
cd964a1d58b9
Use backup for files.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
74
diff
changeset
|
1035 |
(setq |
147 | 1036 |
backup-by-copying t ; don't clobber symlinks |
75
cd964a1d58b9
Use backup for files.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
74
diff
changeset
|
1037 |
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
|
1038 |
delete-old-versions t ; delete excess backup versions silently |
75
cd964a1d58b9
Use backup for files.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
74
diff
changeset
|
1039 |
kept-old-versions 1 ; store first original version |
cd964a1d58b9
Use backup for files.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
74
diff
changeset
|
1040 |
kept-new-versions 3 ; store last 3 version |
cd964a1d58b9
Use backup for files.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
74
diff
changeset
|
1041 |
version-control t) ; use versioned backups |
0 | 1042 |
|
150 | 1043 |
;; ====================================================================== |
1044 |
;; auto save |
|
1045 |
||
1046 |
(setq auto-save-default t) |
|
1047 |
;; If nil autosave to different than original to buffer file. |
|
1048 |
(setq auto-save-visited-file-name nil) |
|
1049 |
;; Note: if you kill unsaved file auto save file not deleted. |
|
1050 |
(setq delete-auto-save-files t) |
|
0 | 1051 |
|
1052 |
;; ====================================================================== |
|
40 | 1053 |
;; Setup user info. |
17
4f97bf9a25d5
Удалил строки, содержащие абсолютные пути в windows.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
16
diff
changeset
|
1054 |
|
0 | 1055 |
(cd "~/") |
51 | 1056 |
(setq user-full-name "Oleksandr Gavenko") |
1057 |
(setq user-mail-address "gavenkoa@gmail.com") |
|
1058 |
(setenv "ORGANIZATION" (concat user-full-name " <" user-mail-address ">")) |
|
0 | 1059 |
|
1060 |
(message ".emacs loaded OK.") |
|
1061 |
||
1062 |
;; |
|
1063 |
;; End loading... |