author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Sat, 15 Oct 2011 15:55:02 +0300 | |
changeset 728 | 78931dde783e |
parent 727 | 4d38b9e96670 |
child 729 | 9c5cb48451ad |
permissions | -rw-r--r-- |
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
1 |
;; -*- mode: emacs-lisp; coding: utf-8; fill-column: 78 -*- |
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 |
;; |
351
e30e4bd7e85e
Small spell correction.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
348
diff
changeset
|
10 |
;; For load order see README. |
0 | 11 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
12 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
611
49c993d41d3f
Firstly enable 'recentf' to easy access to recently edited file when Emacs
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
610
diff
changeset
|
13 |
(message "recentf") |
49c993d41d3f
Firstly enable 'recentf' to easy access to recently edited file when Emacs
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
610
diff
changeset
|
14 |
|
49c993d41d3f
Firstly enable 'recentf' to easy access to recently edited file when Emacs
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
610
diff
changeset
|
15 |
(require 'recentf) |
49c993d41d3f
Firstly enable 'recentf' to easy access to recently edited file when Emacs
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
610
diff
changeset
|
16 |
;; Prevent TRAMP to login on remote host when loading. |
49c993d41d3f
Firstly enable 'recentf' to easy access to recently edited file when Emacs
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
610
diff
changeset
|
17 |
;; Its take time and ask passwords! |
49c993d41d3f
Firstly enable 'recentf' to easy access to recently edited file when Emacs
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
610
diff
changeset
|
18 |
(setq recentf-auto-cleanup 'never) |
49c993d41d3f
Firstly enable 'recentf' to easy access to recently edited file when Emacs
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
610
diff
changeset
|
19 |
(recentf-mode t) |
49c993d41d3f
Firstly enable 'recentf' to easy access to recently edited file when Emacs
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
610
diff
changeset
|
20 |
(setq recentf-max-saved-items 1000) |
49c993d41d3f
Firstly enable 'recentf' to easy access to recently edited file when Emacs
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
610
diff
changeset
|
21 |
(global-set-key (kbd "\e\eq") 'recentf-open-files) |
49c993d41d3f
Firstly enable 'recentf' to easy access to recently edited file when Emacs
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
610
diff
changeset
|
22 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
23 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
658
b8a1ffa6408f
Make revert buffer available more early.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
657
diff
changeset
|
24 |
(message "revert buffer") |
b8a1ffa6408f
Make revert buffer available more early.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
657
diff
changeset
|
25 |
|
b8a1ffa6408f
Make revert buffer available more early.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
657
diff
changeset
|
26 |
(global-set-key [f5] 'revert-buffer) |
b8a1ffa6408f
Make revert buffer available more early.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
657
diff
changeset
|
27 |
(setq revert-without-query (quote (".*"))) |
b8a1ffa6408f
Make revert buffer available more early.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
657
diff
changeset
|
28 |
(setq auto-revert-interval 2) |
b8a1ffa6408f
Make revert buffer available more early.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
657
diff
changeset
|
29 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
30 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
31 |
(message "debugging") |
0 | 32 |
|
175
a505ab71060a
Make comment shorter.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
174
diff
changeset
|
33 |
;; Shut off message buffer by setting nil. |
252
330b4cdfaddf
Increase log message count.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
251
diff
changeset
|
34 |
(setq message-log-max 512) |
0 | 35 |
|
36 |
;; Set the debug option to enable a backtrace when a problem occurs. |
|
37 |
(setq debug-on-error nil) ; t/nil |
|
649 | 38 |
(setq debug-on-signal nil) |
0 | 39 |
|
549
62dd5f72d647
Document 'debug-on-quit'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
548
diff
changeset
|
40 |
;; Get trace when press C-g. |
62dd5f72d647
Document 'debug-on-quit'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
548
diff
changeset
|
41 |
(setq debug-on-quit nil) ; t/nil |
62dd5f72d647
Document 'debug-on-quit'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
548
diff
changeset
|
42 |
|
539
4e0728ed912a
Document 'inhibit-default-init'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
538
diff
changeset
|
43 |
;; Prevent Emacs from loading 'default.el', which loaded after '.emacs'. |
4e0728ed912a
Document 'inhibit-default-init'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
538
diff
changeset
|
44 |
;; Also '-q' prevent loading your init file. |
4e0728ed912a
Document 'inhibit-default-init'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
538
diff
changeset
|
45 |
(setq inhibit-default-init nil) ; t/nil |
4e0728ed912a
Document 'inhibit-default-init'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
538
diff
changeset
|
46 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
47 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
48 |
(message "user info") |
531
a6466b47121e
Move user info to top.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
530
diff
changeset
|
49 |
|
a6466b47121e
Move user info to top.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
530
diff
changeset
|
50 |
(setq user-full-name "Oleksandr Gavenko") |
a6466b47121e
Move user info to top.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
530
diff
changeset
|
51 |
(setq user-mail-address "gavenkoa@gmail.com") |
532
a77d1bbd676c
Set conection/login info for rcirc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
531
diff
changeset
|
52 |
(setq user-nick "gavenkoa") |
531
a6466b47121e
Move user info to top.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
530
diff
changeset
|
53 |
(setenv "ORGANIZATION" (concat user-full-name " <" user-mail-address ">")) |
a6466b47121e
Move user info to top.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
530
diff
changeset
|
54 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
55 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
670
d10f2e70ff5e
Redefine action to put 'html' tag in sgml-mode (more pretty look).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
669
diff
changeset
|
56 |
(message "my defun, defmacro, defvar") |
d10f2e70ff5e
Redefine action to put 'html' tag in sgml-mode (more pretty look).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
669
diff
changeset
|
57 |
|
d10f2e70ff5e
Redefine action to put 'html' tag in sgml-mode (more pretty look).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
669
diff
changeset
|
58 |
(defmacro my-filter (condfunc list) |
d10f2e70ff5e
Redefine action to put 'html' tag in sgml-mode (more pretty look).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
669
diff
changeset
|
59 |
"Construct list with elements from LIST which satisfy CONDFUNC." |
d10f2e70ff5e
Redefine action to put 'html' tag in sgml-mode (more pretty look).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
669
diff
changeset
|
60 |
`(let (r) |
d10f2e70ff5e
Redefine action to put 'html' tag in sgml-mode (more pretty look).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
669
diff
changeset
|
61 |
(mapc (lambda (item) |
d10f2e70ff5e
Redefine action to put 'html' tag in sgml-mode (more pretty look).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
669
diff
changeset
|
62 |
(when (,condfunc item) |
d10f2e70ff5e
Redefine action to put 'html' tag in sgml-mode (more pretty look).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
669
diff
changeset
|
63 |
(if r |
d10f2e70ff5e
Redefine action to put 'html' tag in sgml-mode (more pretty look).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
669
diff
changeset
|
64 |
(nconc r (cons item nil)) |
d10f2e70ff5e
Redefine action to put 'html' tag in sgml-mode (more pretty look).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
669
diff
changeset
|
65 |
(setq r (cons item nil))))) |
d10f2e70ff5e
Redefine action to put 'html' tag in sgml-mode (more pretty look).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
669
diff
changeset
|
66 |
,list) |
d10f2e70ff5e
Redefine action to put 'html' tag in sgml-mode (more pretty look).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
669
diff
changeset
|
67 |
r)) |
d10f2e70ff5e
Redefine action to put 'html' tag in sgml-mode (more pretty look).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
669
diff
changeset
|
68 |
|
716 | 69 |
(defun my-fold (f x list) |
70 |
"Recursively applies (F i j) to LIST starting with X. |
|
71 |
For example, (fold F X '(1 2 3)) computes (F (F (F X 1) 2) 3)." |
|
72 |
(let ((li list) (x2 x)) |
|
73 |
(while li |
|
74 |
(setq x2 (funcall f x2 (pop li))) |
|
75 |
) |
|
76 |
x2 |
|
77 |
) ) |
|
78 |
||
720
e50b78c6a53d
Fix: ignore-errors does not defined under Emacs 22.2.1 (on Debian).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
699
diff
changeset
|
79 |
(unless (fboundp 'ignore-errors) |
e50b78c6a53d
Fix: ignore-errors does not defined under Emacs 22.2.1 (on Debian).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
699
diff
changeset
|
80 |
(defmacro ignore-errors (&rest body) |
e50b78c6a53d
Fix: ignore-errors does not defined under Emacs 22.2.1 (on Debian).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
699
diff
changeset
|
81 |
"Execute BODY; if an error occurs, return nil. |
e50b78c6a53d
Fix: ignore-errors does not defined under Emacs 22.2.1 (on Debian).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
699
diff
changeset
|
82 |
Otherwise, return result of last form in BODY." |
e50b78c6a53d
Fix: ignore-errors does not defined under Emacs 22.2.1 (on Debian).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
699
diff
changeset
|
83 |
(declare (debug t) (indent 0)) |
e50b78c6a53d
Fix: ignore-errors does not defined under Emacs 22.2.1 (on Debian).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
699
diff
changeset
|
84 |
`(condition-case nil (progn ,@body) (error nil))) |
e50b78c6a53d
Fix: ignore-errors does not defined under Emacs 22.2.1 (on Debian).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
699
diff
changeset
|
85 |
) |
e50b78c6a53d
Fix: ignore-errors does not defined under Emacs 22.2.1 (on Debian).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
699
diff
changeset
|
86 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
87 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
88 |
(message "mode groups") |
333
14b07ca8335a
Set margin only for desired modes! Do not frustrate calendar any more.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
332
diff
changeset
|
89 |
|
606 | 90 |
(defmacro my-defun-rename-symb-tree (name doc func) |
91 |
"Travel by TREE and applies FUNC to each symbol." |
|
92 |
`(defun ,name (tree) |
|
93 |
,doc |
|
94 |
(cond |
|
95 |
((symbolp tree) |
|
96 |
(,func tree) |
|
97 |
) |
|
98 |
((listp tree) |
|
99 |
(mapcar ',name tree) |
|
100 |
) |
|
101 |
(t (error "Only tree of symbols allowed.")) |
|
102 |
))) |
|
605
c228c0414e0b
Generalize logic to rename symbols.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
604
diff
changeset
|
103 |
|
606 | 104 |
(my-defun-rename-symb-tree |
105 |
my-feature2mode |
|
106 |
"Convert TREE of features to TREE of modes for these features. Single symbol allowed." |
|
107 |
(lambda (symb) (intern (concat (symbol-name symb) "-mode")))) |
|
605
c228c0414e0b
Generalize logic to rename symbols.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
604
diff
changeset
|
108 |
|
606 | 109 |
(my-defun-rename-symb-tree |
110 |
my-mode2hook |
|
111 |
"Convert TREE of modes to TREE of hooks for these modes. Single symbol allowed." |
|
112 |
(lambda (symb) (intern (concat (symbol-name symb) "-hook"))) |
|
113 |
) |
|
605
c228c0414e0b
Generalize logic to rename symbols.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
604
diff
changeset
|
114 |
|
606 | 115 |
(my-defun-rename-symb-tree |
116 |
my-mode2modemap |
|
117 |
"Convert TREE of modes to TREE of keymaps for these modes. Single symbol allowed." |
|
118 |
(lambda (symb) (intern (concat (symbol-name symb) "-map"))) |
|
119 |
) |
|
493
4f91b5ccab17
'my-modelist-to-hooklist' convert list of MODES to list of hooks for these
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
492
diff
changeset
|
120 |
|
333
14b07ca8335a
Set margin only for desired modes! Do not frustrate calendar any more.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
332
diff
changeset
|
121 |
(defvar my-devel-mode-list |
401
4e91288dbd84
Highlight TODO FIXME in outline-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
400
diff
changeset
|
122 |
'( |
695
273e9d5c4f86
Add 'tcl-mode' to 'my-devel-mode-list'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
692
diff
changeset
|
123 |
sh-mode script-mode tcl-mode |
488
a3e4b656e4e6
Added js-mode to my list of development modes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
487
diff
changeset
|
124 |
c-mode c++-mode java-mode js-mode |
401
4e91288dbd84
Highlight TODO FIXME in outline-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
400
diff
changeset
|
125 |
python-mode |
4e91288dbd84
Highlight TODO FIXME in outline-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
400
diff
changeset
|
126 |
lisp-mode |
4e91288dbd84
Highlight TODO FIXME in outline-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
400
diff
changeset
|
127 |
emacs-lisp-mode |
4e91288dbd84
Highlight TODO FIXME in outline-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
400
diff
changeset
|
128 |
makefile-mode makefile-gmake-mode |
494
e388310789d1
Added 'nsis-mode' to 'my-devel-mode-list'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
493
diff
changeset
|
129 |
nsis-mode |
692
6e566f6c7386
Add 'bat-generic-mode' to 'my-devel-mode-list'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
691
diff
changeset
|
130 |
bat-generic-mode |
631
eb5ce5b0b208
Add 'html-mode' to devel mode list.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
629
diff
changeset
|
131 |
html-mode |
401
4e91288dbd84
Highlight TODO FIXME in outline-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
400
diff
changeset
|
132 |
) |
333
14b07ca8335a
Set margin only for desired modes! Do not frustrate calendar any more.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
332
diff
changeset
|
133 |
"List of development modes.") |
14b07ca8335a
Set margin only for desired modes! Do not frustrate calendar any more.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
332
diff
changeset
|
134 |
|
14b07ca8335a
Set margin only for desired modes! Do not frustrate calendar any more.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
332
diff
changeset
|
135 |
(defvar my-devel-mode-hook-list |
605
c228c0414e0b
Generalize logic to rename symbols.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
604
diff
changeset
|
136 |
(my-mode2hook my-devel-mode-list) |
493
4f91b5ccab17
'my-modelist-to-hooklist' convert list of MODES to list of hooks for these
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
492
diff
changeset
|
137 |
"List of development mode hooks.") |
4f91b5ccab17
'my-modelist-to-hooklist' convert list of MODES to list of hooks for these
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
492
diff
changeset
|
138 |
|
4f91b5ccab17
'my-modelist-to-hooklist' convert list of MODES to list of hooks for these
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
492
diff
changeset
|
139 |
(defvar my-scroll-margin-mode-list |
427
69d3c7df190f
Added outline-mode-hook to my-devel-mode-hook-list.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
426
diff
changeset
|
140 |
'( |
493
4f91b5ccab17
'my-modelist-to-hooklist' convert list of MODES to list of hooks for these
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
492
diff
changeset
|
141 |
vc-dir-mode |
4f91b5ccab17
'my-modelist-to-hooklist' convert list of MODES to list of hooks for these
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
492
diff
changeset
|
142 |
recentf-dialog-mode |
4f91b5ccab17
'my-modelist-to-hooklist' convert list of MODES to list of hooks for these
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
492
diff
changeset
|
143 |
org-agenda-grid-mode ; XXX for this item not worked! |
4f91b5ccab17
'my-modelist-to-hooklist' convert list of MODES to list of hooks for these
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
492
diff
changeset
|
144 |
log-view-mode |
4f91b5ccab17
'my-modelist-to-hooklist' convert list of MODES to list of hooks for these
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
492
diff
changeset
|
145 |
dired-mode |
4f91b5ccab17
'my-modelist-to-hooklist' convert list of MODES to list of hooks for these
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
492
diff
changeset
|
146 |
compilation-mode |
4f91b5ccab17
'my-modelist-to-hooklist' convert list of MODES to list of hooks for these
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
492
diff
changeset
|
147 |
) |
4f91b5ccab17
'my-modelist-to-hooklist' convert list of MODES to list of hooks for these
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
492
diff
changeset
|
148 |
"List of modes for enabling scroll margin.") |
333
14b07ca8335a
Set margin only for desired modes! Do not frustrate calendar any more.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
332
diff
changeset
|
149 |
|
391
09cfea42153e
Added list of mode hooks for enabling scroll margin.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
389
diff
changeset
|
150 |
(defvar my-scroll-margin-mode-hook-list |
605
c228c0414e0b
Generalize logic to rename symbols.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
604
diff
changeset
|
151 |
(my-mode2hook my-scroll-margin-mode-list) |
391
09cfea42153e
Added list of mode hooks for enabling scroll margin.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
389
diff
changeset
|
152 |
"List of mode hooks for enabling scroll margin.") |
09cfea42153e
Added list of mode hooks for enabling scroll margin.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
389
diff
changeset
|
153 |
|
333
14b07ca8335a
Set margin only for desired modes! Do not frustrate calendar any more.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
332
diff
changeset
|
154 |
(defvar my-text-mode-list |
631
eb5ce5b0b208
Add 'html-mode' to devel mode list.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
629
diff
changeset
|
155 |
'( |
eb5ce5b0b208
Add 'html-mode' to devel mode list.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
629
diff
changeset
|
156 |
text-mode |
eb5ce5b0b208
Add 'html-mode' to devel mode list.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
629
diff
changeset
|
157 |
outline-mode |
665
9761254a1260
Maintaining the table of contents up-to-date.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
664
diff
changeset
|
158 |
rst-mode |
723
ff912b026ad2
Move 'diff-mode' to 'my-text-mode-list' for trailing spaces highlighting.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
721
diff
changeset
|
159 |
diff-mode |
691 | 160 |
dict-c5-mode |
631
eb5ce5b0b208
Add 'html-mode' to devel mode list.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
629
diff
changeset
|
161 |
) |
333
14b07ca8335a
Set margin only for desired modes! Do not frustrate calendar any more.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
332
diff
changeset
|
162 |
"List of text modes.") |
14b07ca8335a
Set margin only for desired modes! Do not frustrate calendar any more.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
332
diff
changeset
|
163 |
|
14b07ca8335a
Set margin only for desired modes! Do not frustrate calendar any more.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
332
diff
changeset
|
164 |
(defvar my-text-mode-hook-list |
605
c228c0414e0b
Generalize logic to rename symbols.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
604
diff
changeset
|
165 |
(my-mode2hook my-text-mode-list) |
333
14b07ca8335a
Set margin only for desired modes! Do not frustrate calendar any more.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
332
diff
changeset
|
166 |
"List of text mode hooks.") |
14b07ca8335a
Set margin only for desired modes! Do not frustrate calendar any more.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
332
diff
changeset
|
167 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
168 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
169 |
(message "appearance") |
362
f4bd431ad549
By default start from user home directory (HOME point to it).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
361
diff
changeset
|
170 |
|
370
378a4dc8ea1c
Maximize frame on full screen.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
369
diff
changeset
|
171 |
;; To maximize frame on full screen, not work with Windows Emacs 21.4. |
378a4dc8ea1c
Maximize frame on full screen.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
369
diff
changeset
|
172 |
;; And maked different height with Emacs 22.3 and 23.1. |
378a4dc8ea1c
Maximize frame on full screen.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
369
diff
changeset
|
173 |
;; (setq initial-frame-alist '((fullscreen . fullboth))) |
378a4dc8ea1c
Maximize frame on full screen.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
369
diff
changeset
|
174 |
|
550
d8092299457a
(setq display-buffer-reuse-frames t)
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
549
diff
changeset
|
175 |
(setq display-buffer-reuse-frames t) |
d8092299457a
(setq display-buffer-reuse-frames t)
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
549
diff
changeset
|
176 |
|
370
378a4dc8ea1c
Maximize frame on full screen.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
369
diff
changeset
|
177 |
;; Next code work with Emacs 21.4, 22.3, 23.1. |
378a4dc8ea1c
Maximize frame on full screen.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
369
diff
changeset
|
178 |
(when window-system |
378a4dc8ea1c
Maximize frame on full screen.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
369
diff
changeset
|
179 |
(let ( |
378a4dc8ea1c
Maximize frame on full screen.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
369
diff
changeset
|
180 |
(px (display-pixel-width)) |
378a4dc8ea1c
Maximize frame on full screen.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
369
diff
changeset
|
181 |
(py (display-pixel-height)) |
378a4dc8ea1c
Maximize frame on full screen.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
369
diff
changeset
|
182 |
(fx (frame-char-width)) |
378a4dc8ea1c
Maximize frame on full screen.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
369
diff
changeset
|
183 |
(fy (frame-char-height)) |
378a4dc8ea1c
Maximize frame on full screen.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
369
diff
changeset
|
184 |
tx ty |
378a4dc8ea1c
Maximize frame on full screen.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
369
diff
changeset
|
185 |
) |
378a4dc8ea1c
Maximize frame on full screen.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
369
diff
changeset
|
186 |
;; Next formulas discovered empiric on Windows host with default font. |
373
bdf2522ad35c
On Debian with font 7x13 right part of windows go out of display border.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
372
diff
changeset
|
187 |
(setq tx (- (/ px fx) 7)) |
370
378a4dc8ea1c
Maximize frame on full screen.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
369
diff
changeset
|
188 |
(setq ty (- (/ py fy) 4)) |
625
78017f6d5b43
Indent initial frame to 2 pixel.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
624
diff
changeset
|
189 |
(setq initial-frame-alist '((top . 2) (left . 2))) |
370
378a4dc8ea1c
Maximize frame on full screen.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
369
diff
changeset
|
190 |
(add-to-list 'initial-frame-alist (cons 'width tx)) |
378a4dc8ea1c
Maximize frame on full screen.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
369
diff
changeset
|
191 |
(add-to-list 'initial-frame-alist (cons 'height ty)) |
378a4dc8ea1c
Maximize frame on full screen.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
369
diff
changeset
|
192 |
) ) |
378a4dc8ea1c
Maximize frame on full screen.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
369
diff
changeset
|
193 |
|
151 | 194 |
(menu-bar-mode -1) |
415
a325b9a15b8e
Fix: 'scroll-bar-mode' and 'tooltip-mode' do not defined in Cygwin nox Emacs.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
412
diff
changeset
|
195 |
(when window-system |
585
2431be336034
mouse-avoidance-mode
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
584
diff
changeset
|
196 |
(mouse-avoidance-mode 'animate) |
502
64a475fa36e2
tool-bar-mode not available under Cygwin console Emacs.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
501
diff
changeset
|
197 |
(scroll-bar-mode 1) |
64a475fa36e2
tool-bar-mode not available under Cygwin console Emacs.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
501
diff
changeset
|
198 |
(tool-bar-mode -1) |
429
998f33a8ec6e
Open menu by f10 like by C-Mouse-3 without mouse!
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
428
diff
changeset
|
199 |
(defun my-popup-menu () |
998f33a8ec6e
Open menu by f10 like by C-Mouse-3 without mouse!
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
428
diff
changeset
|
200 |
(interactive) |
490
d6c84d84af9b
'mouse-menu-bar-map' appear only in Emacs 23.x. To get work on any Emacs used
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
489
diff
changeset
|
201 |
(mouse-popup-menubar |
d6c84d84af9b
'mouse-menu-bar-map' appear only in Emacs 23.x. To get work on any Emacs used
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
489
diff
changeset
|
202 |
(list (list (/ (display-pixel-width) 2) 10) (get-buffer-window (buffer-name))) |
d6c84d84af9b
'mouse-menu-bar-map' appear only in Emacs 23.x. To get work on any Emacs used
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
489
diff
changeset
|
203 |
nil) |
d6c84d84af9b
'mouse-menu-bar-map' appear only in Emacs 23.x. To get work on any Emacs used
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
489
diff
changeset
|
204 |
) |
429
998f33a8ec6e
Open menu by f10 like by C-Mouse-3 without mouse!
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
428
diff
changeset
|
205 |
(global-set-key [f10] 'my-popup-menu) |
436
95dfd88eee58
Open *Global menu* by <apps> key.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
435
diff
changeset
|
206 |
(global-set-key [apps] 'my-popup-menu) |
491
72d77b2117d1
Menu key under X have name 'menu' (in contrast to Windows - 'app').
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
490
diff
changeset
|
207 |
(global-set-key [menu] 'my-popup-menu) |
415
a325b9a15b8e
Fix: 'scroll-bar-mode' and 'tooltip-mode' do not defined in Cygwin nox Emacs.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
412
diff
changeset
|
208 |
(when (>= emacs-major-version 22) (tooltip-mode -1)) |
a325b9a15b8e
Fix: 'scroll-bar-mode' and 'tooltip-mode' do not defined in Cygwin nox Emacs.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
412
diff
changeset
|
209 |
) |
0 | 210 |
|
595
be6c27e4c776
Fix "Prefer horizontal windows splitting" for terminals.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
594
diff
changeset
|
211 |
;; Prefer horizontal windows splitting. |
612
1c59e45f5358
split-height-threshold/split-width-threshold can not be nil in Emacs 21.x/22.x.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
611
diff
changeset
|
212 |
(when (>= emacs-major-version 23) |
1c59e45f5358
split-height-threshold/split-width-threshold can not be nil in Emacs 21.x/22.x.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
611
diff
changeset
|
213 |
(setq split-height-threshold nil) |
1c59e45f5358
split-height-threshold/split-width-threshold can not be nil in Emacs 21.x/22.x.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
611
diff
changeset
|
214 |
(setq split-width-threshold nil) |
1c59e45f5358
split-height-threshold/split-width-threshold can not be nil in Emacs 21.x/22.x.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
611
diff
changeset
|
215 |
) |
573
c28b88b60ed0
Prefer horizontal windows splitting.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
524
diff
changeset
|
216 |
|
641
712eec51428a
Change 'frame-title-format'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
640
diff
changeset
|
217 |
(setq frame-title-format "EMACS: %b") |
338
ebf88f988c37
Move some appearance related switch together.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
337
diff
changeset
|
218 |
|
363
17df92226b5a
Set default-header-line-format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
362
diff
changeset
|
219 |
(setq default-header-line-format nil) |
17df92226b5a
Set default-header-line-format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
362
diff
changeset
|
220 |
;; (setq default-mode-line-format nil) |
17df92226b5a
Set default-header-line-format.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
362
diff
changeset
|
221 |
|
364
3d18cfe179cc
Set default fringe and margin width.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
363
diff
changeset
|
222 |
(setq default-left-fringe-width nil) |
3d18cfe179cc
Set default fringe and margin width.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
363
diff
changeset
|
223 |
(setq default-right-fringe-width nil) |
3d18cfe179cc
Set default fringe and margin width.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
363
diff
changeset
|
224 |
(setq default-left-margin-width nil) |
3d18cfe179cc
Set default fringe and margin width.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
363
diff
changeset
|
225 |
(setq default-right-margin-width nil) |
3d18cfe179cc
Set default fringe and margin width.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
363
diff
changeset
|
226 |
|
365
913375395214
No spasing between text lines.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
364
diff
changeset
|
227 |
(setq default-line-spacing nil) |
913375395214
No spasing between text lines.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
364
diff
changeset
|
228 |
|
366
223c01e1a084
Don't truncate long lines.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
365
diff
changeset
|
229 |
(setq default-truncate-lines nil) |
223c01e1a084
Don't truncate long lines.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
365
diff
changeset
|
230 |
|
338
ebf88f988c37
Move some appearance related switch together.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
337
diff
changeset
|
231 |
;; show column & line numbers in status bar |
ebf88f988c37
Move some appearance related switch together.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
337
diff
changeset
|
232 |
(setq column-number-mode t) |
ebf88f988c37
Move some appearance related switch together.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
337
diff
changeset
|
233 |
(setq line-number-mode t) |
413
5b28a08bf61b
Set size-indication-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
412
diff
changeset
|
234 |
(setq size-indication-mode t) |
338
ebf88f988c37
Move some appearance related switch together.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
337
diff
changeset
|
235 |
|
ebf88f988c37
Move some appearance related switch together.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
337
diff
changeset
|
236 |
;; Also useful such format: (setq display-time-format " %H:%M %d-%m-%y ") |
ebf88f988c37
Move some appearance related switch together.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
337
diff
changeset
|
237 |
(setq display-time-24hr-format t) |
683
b50b879b9e04
display-time-day-and-date
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
682
diff
changeset
|
238 |
(setq display-time-day-and-date nil) |
338
ebf88f988c37
Move some appearance related switch together.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
337
diff
changeset
|
239 |
(setq display-time-default-load-average nil) |
ebf88f988c37
Move some appearance related switch together.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
337
diff
changeset
|
240 |
(display-time) ; display-time-mode |
ebf88f988c37
Move some appearance related switch together.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
337
diff
changeset
|
241 |
|
615
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
242 |
(when window-system |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
243 |
(set-background-color "white") |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
244 |
(set-foreground-color "black") |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
245 |
(set-cursor-color "brown") |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
246 |
;; (set-mouse-color "white") |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
247 |
(setq cursor-type 'box) ; box, hollow, bar, hbar |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
248 |
;;(setq blink-matching-delay 0.01) |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
249 |
(blink-cursor-mode 1) |
686
563751ecd385
Bind 'yes-or-no-p' to 'y-or-n-p'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
685
diff
changeset
|
250 |
(setq use-file-dialog t) |
563751ecd385
Bind 'yes-or-no-p' to 'y-or-n-p'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
685
diff
changeset
|
251 |
(setq use-dialog-box t) |
615
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
252 |
;; (set-face-font 'default "7x14") |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
253 |
) |
0 | 254 |
|
218
1a48dde2dfa3
See what I am typing immediately (for keystroke in minibuffer).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
217
diff
changeset
|
255 |
;; 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
|
256 |
(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
|
257 |
|
686
563751ecd385
Bind 'yes-or-no-p' to 'y-or-n-p'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
685
diff
changeset
|
258 |
(fset 'yes-or-no-p 'y-or-n-p) |
563751ecd385
Bind 'yes-or-no-p' to 'y-or-n-p'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
685
diff
changeset
|
259 |
|
563751ecd385
Bind 'yes-or-no-p' to 'y-or-n-p'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
685
diff
changeset
|
260 |
(when (boundp 'confirm-kill-emacs) |
563751ecd385
Bind 'yes-or-no-p' to 'y-or-n-p'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
685
diff
changeset
|
261 |
(setq confirm-kill-emacs 'y-or-n-p)) |
563751ecd385
Bind 'yes-or-no-p' to 'y-or-n-p'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
685
diff
changeset
|
262 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
263 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
264 |
(message "silent runing") |
85 | 265 |
|
266 |
;; (setq inhibit-splash-screen t) ; nonexist on 21.4.1 |
|
267 |
(setq inhibit-startup-message t) |
|
268 |
||
675
7bef62461084
Try enable modes to avoid do this explicitly in '.emacs-pre'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
674
diff
changeset
|
269 |
;; ---------------------------------------------------------------- |
676
0accf646e451
Move code for shell setup to proper place. Remove unused code as I do not use
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
675
diff
changeset
|
270 |
(message "shell, bash, Cygwin, MSYS") |
675
7bef62461084
Try enable modes to avoid do this explicitly in '.emacs-pre'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
674
diff
changeset
|
271 |
|
676
0accf646e451
Move code for shell setup to proper place. Remove unused code as I do not use
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
675
diff
changeset
|
272 |
(defvar my-use-windows-shell nil |
0accf646e451
Move code for shell setup to proper place. Remove unused code as I do not use
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
675
diff
changeset
|
273 |
"If t 'cmdproxy.exe' will be used as shell. Affect on M-x shell like |
0accf646e451
Move code for shell setup to proper place. Remove unused code as I do not use
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
675
diff
changeset
|
274 |
commands. If nil, 'sh' will be used." ) |
0accf646e451
Move code for shell setup to proper place. Remove unused code as I do not use
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
675
diff
changeset
|
275 |
|
709
2cb49be54b21
Follow new-style (and also UCS-16) Cygwin symlinks.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
704
diff
changeset
|
276 |
(defun follow-cygwin-symlink () |
2cb49be54b21
Follow new-style (and also UCS-16) Cygwin symlinks.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
704
diff
changeset
|
277 |
"Follow new-style (and also UCS-16) Cygwin symlinks." |
2cb49be54b21
Follow new-style (and also UCS-16) Cygwin symlinks.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
704
diff
changeset
|
278 |
(save-excursion |
2cb49be54b21
Follow new-style (and also UCS-16) Cygwin symlinks.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
704
diff
changeset
|
279 |
(goto-char 0) |
2cb49be54b21
Follow new-style (and also UCS-16) Cygwin symlinks.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
704
diff
changeset
|
280 |
(when (looking-at "!<symlink>\xff\xfe") |
2cb49be54b21
Follow new-style (and also UCS-16) Cygwin symlinks.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
704
diff
changeset
|
281 |
(find-alternate-file |
2cb49be54b21
Follow new-style (and also UCS-16) Cygwin symlinks.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
704
diff
changeset
|
282 |
(substring |
2cb49be54b21
Follow new-style (and also UCS-16) Cygwin symlinks.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
704
diff
changeset
|
283 |
(decode-coding-string |
2cb49be54b21
Follow new-style (and also UCS-16) Cygwin symlinks.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
704
diff
changeset
|
284 |
(buffer-substring (match-end 0) (point-max)) |
2cb49be54b21
Follow new-style (and also UCS-16) Cygwin symlinks.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
704
diff
changeset
|
285 |
'utf-16-le) |
2cb49be54b21
Follow new-style (and also UCS-16) Cygwin symlinks.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
704
diff
changeset
|
286 |
0 -1) ; -1 for stripping final \0. |
2cb49be54b21
Follow new-style (and also UCS-16) Cygwin symlinks.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
704
diff
changeset
|
287 |
)))) |
2cb49be54b21
Follow new-style (and also UCS-16) Cygwin symlinks.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
704
diff
changeset
|
288 |
|
676
0accf646e451
Move code for shell setup to proper place. Remove unused code as I do not use
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
675
diff
changeset
|
289 |
(when (eq system-type 'windows-nt) |
675
7bef62461084
Try enable modes to avoid do this explicitly in '.emacs-pre'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
674
diff
changeset
|
290 |
(ignore-errors |
7bef62461084
Try enable modes to avoid do this explicitly in '.emacs-pre'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
674
diff
changeset
|
291 |
(require 'cygwin-mount) |
7bef62461084
Try enable modes to avoid do this explicitly in '.emacs-pre'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
674
diff
changeset
|
292 |
(cygwin-mount-activate) |
676
0accf646e451
Move code for shell setup to proper place. Remove unused code as I do not use
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
675
diff
changeset
|
293 |
) |
709
2cb49be54b21
Follow new-style (and also UCS-16) Cygwin symlinks.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
704
diff
changeset
|
294 |
(add-hook 'find-file-hooks 'follow-cygwin-symlink) |
676
0accf646e451
Move code for shell setup to proper place. Remove unused code as I do not use
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
675
diff
changeset
|
295 |
;; Workaround for Cygwin shell, when set 'CYGWIN=noglob'. By default 'shell-quote-argument' |
0accf646e451
Move code for shell setup to proper place. Remove unused code as I do not use
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
675
diff
changeset
|
296 |
;; quoted by double '\' chars this cause failure. |
0accf646e451
Move code for shell setup to proper place. Remove unused code as I do not use
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
675
diff
changeset
|
297 |
(defun shell-quote-argument (argument) |
0accf646e451
Move code for shell setup to proper place. Remove unused code as I do not use
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
675
diff
changeset
|
298 |
(concat "'" argument "'") |
0accf646e451
Move code for shell setup to proper place. Remove unused code as I do not use
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
675
diff
changeset
|
299 |
) |
0accf646e451
Move code for shell setup to proper place. Remove unused code as I do not use
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
675
diff
changeset
|
300 |
;; Workaround for Cygwin when 'shell-file-name' is 'bash'. |
0accf646e451
Move code for shell setup to proper place. Remove unused code as I do not use
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
675
diff
changeset
|
301 |
(setq null-device "/dev/null") |
0accf646e451
Move code for shell setup to proper place. Remove unused code as I do not use
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
675
diff
changeset
|
302 |
;; Use shell from Cygwin/MinGW. |
0accf646e451
Move code for shell setup to proper place. Remove unused code as I do not use
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
675
diff
changeset
|
303 |
(setq shell-file-name "bash") |
0accf646e451
Move code for shell setup to proper place. Remove unused code as I do not use
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
675
diff
changeset
|
304 |
(setenv "SHELL" "/bin/bash") |
0accf646e451
Move code for shell setup to proper place. Remove unused code as I do not use
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
675
diff
changeset
|
305 |
(modify-coding-system-alist 'process "bash" '(cp1251-unix . cp1251-unix)) |
0accf646e451
Move code for shell setup to proper place. Remove unused code as I do not use
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
675
diff
changeset
|
306 |
) |
0accf646e451
Move code for shell setup to proper place. Remove unused code as I do not use
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
675
diff
changeset
|
307 |
|
0accf646e451
Move code for shell setup to proper place. Remove unused code as I do not use
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
675
diff
changeset
|
308 |
(ansi-color-for-comint-mode-on) |
0accf646e451
Move code for shell setup to proper place. Remove unused code as I do not use
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
675
diff
changeset
|
309 |
|
0accf646e451
Move code for shell setup to proper place. Remove unused code as I do not use
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
675
diff
changeset
|
310 |
(setq explicit-bash-args '("-i")) |
0accf646e451
Move code for shell setup to proper place. Remove unused code as I do not use
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
675
diff
changeset
|
311 |
(setq explicit-sh-args '("-i")) |
675
7bef62461084
Try enable modes to avoid do this explicitly in '.emacs-pre'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
674
diff
changeset
|
312 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
313 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
314 |
(message "whitespaces") |
361
9dbe92b8b329
Added indicate-buffer-boundaries.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
360
diff
changeset
|
315 |
|
9dbe92b8b329
Added indicate-buffer-boundaries.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
360
diff
changeset
|
316 |
(setq default-indicate-empty-lines t) |
368
a9c688c1b85f
More verbose buffer-boundaries.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
366
diff
changeset
|
317 |
(setq default-indicate-buffer-boundaries 'left) |
361
9dbe92b8b329
Added indicate-buffer-boundaries.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
360
diff
changeset
|
318 |
|
624
9db0b51b229c
Enable showing of trailing whitespace only in developer modes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
623
diff
changeset
|
319 |
;; (setq-default show-trailing-whitespace t) |
9db0b51b229c
Enable showing of trailing whitespace only in developer modes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
623
diff
changeset
|
320 |
(defun my-show-trailing-whitespace () |
9db0b51b229c
Enable showing of trailing whitespace only in developer modes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
623
diff
changeset
|
321 |
(setq show-trailing-whitespace t) |
9db0b51b229c
Enable showing of trailing whitespace only in developer modes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
623
diff
changeset
|
322 |
) |
9db0b51b229c
Enable showing of trailing whitespace only in developer modes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
623
diff
changeset
|
323 |
(mapc (lambda (hook) (add-hook hook 'my-show-trailing-whitespace)) |
669
12851e09e1ae
Remove rst-mode from my-devel-mode-list as it does not support imenu (I get
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
668
diff
changeset
|
324 |
(append my-devel-mode-hook-list my-text-mode-hook-list)) |
361
9dbe92b8b329
Added indicate-buffer-boundaries.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
360
diff
changeset
|
325 |
|
9dbe92b8b329
Added indicate-buffer-boundaries.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
360
diff
changeset
|
326 |
(setq next-line-add-newlines nil) |
9dbe92b8b329
Added indicate-buffer-boundaries.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
360
diff
changeset
|
327 |
|
9dbe92b8b329
Added indicate-buffer-boundaries.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
360
diff
changeset
|
328 |
;; See also 'mode-require-final-newline'. |
9dbe92b8b329
Added indicate-buffer-boundaries.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
360
diff
changeset
|
329 |
(add-hook 'text-mode-hook (lambda () (setq require-final-newline nil))) |
9dbe92b8b329
Added indicate-buffer-boundaries.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
360
diff
changeset
|
330 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
331 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
332 |
(message "gnu serv, server") |
85 | 333 |
|
334 |
;; (load "~/emacs/bin/gnuserv/gnuserv.el") |
|
335 |
;; (require 'gnuserv) |
|
336 |
;; (setq gnuserv-frame (selected-frame)) |
|
337 |
||
372
32b54537dd10
Code ported to work with Emac 21.4. Mainly problems in undefi8ned functions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
371
diff
changeset
|
338 |
(when (>= emacs-major-version 22) |
394
03d8b85ff815
Do not load server.el for Emacs 21.x.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
393
diff
changeset
|
339 |
(require 'server) |
398
47a3e4de976e
Fix compare func name.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
397
diff
changeset
|
340 |
(when (and (= emacs-major-version 23) (>= emacs-minor-version 1) (<= emacs-minor-version 2) (equal window-system 'w32)) |
394
03d8b85ff815
Do not load server.el for Emacs 21.x.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
393
diff
changeset
|
341 |
(defun server-ensure-safe-dir (dir) "Noop" t)) ; Suppress error directory ~/.emacs.d/server is unsafe on windows. |
662
81ca1335730a
Fix condition as it stop server from loading.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
660
diff
changeset
|
342 |
(when (or (= emacs-major-version 22) (not (eq (server-running-p server-name) t))) |
640
b430ca70e6b0
Start the emacs server only if another instance of the server is not running.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
639
diff
changeset
|
343 |
(server-start)) |
394
03d8b85ff815
Do not load server.el for Emacs 21.x.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
393
diff
changeset
|
344 |
) |
85 | 345 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
346 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
347 |
(message "standart/general settings") |
0 | 348 |
|
336
a252995f7d6b
Move general getting into one place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
335
diff
changeset
|
349 |
;; Try to speed things up, especially in VM. |
a252995f7d6b
Move general getting into one place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
335
diff
changeset
|
350 |
(setq gc-cons-threshold 2000000) |
a252995f7d6b
Move general getting into one place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
335
diff
changeset
|
351 |
|
408
78cf8a4feb66
Fix: default 'command-history' length too short (in Emacs 23.2 is 30).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
404
diff
changeset
|
352 |
;; Default 'command-history' length too short (in Emacs 23.2 is 30). |
78cf8a4feb66
Fix: default 'command-history' length too short (in Emacs 23.2 is 30).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
404
diff
changeset
|
353 |
(setq history-length 200) |
78cf8a4feb66
Fix: default 'command-history' length too short (in Emacs 23.2 is 30).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
404
diff
changeset
|
354 |
|
336
a252995f7d6b
Move general getting into one place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
335
diff
changeset
|
355 |
;; Don't beep in my headphones! |
a252995f7d6b
Move general getting into one place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
335
diff
changeset
|
356 |
(setq ring-bell-function '(lambda () "Empty ring-bell-function." nil)) |
a252995f7d6b
Move general getting into one place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
335
diff
changeset
|
357 |
(setq visible-bell t) ; With default ring-bell-function in text terminal |
a252995f7d6b
Move general getting into one place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
335
diff
changeset
|
358 |
; revert screen if press [end] or [home] |
a252995f7d6b
Move general getting into one place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
335
diff
changeset
|
359 |
|
a252995f7d6b
Move general getting into one place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
335
diff
changeset
|
360 |
;; Prompt before evaluating local bits of lisp. This stops people |
a252995f7d6b
Move general getting into one place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
335
diff
changeset
|
361 |
;; putting things at the end of files which delete all your files! |
a252995f7d6b
Move general getting into one place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
335
diff
changeset
|
362 |
(setq enable-local-variables t |
a252995f7d6b
Move general getting into one place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
335
diff
changeset
|
363 |
enable-local-eval 1) |
a252995f7d6b
Move general getting into one place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
335
diff
changeset
|
364 |
|
0 | 365 |
(setq kill-whole-line t) |
366 |
||
102
25585e240b4a
Move customization from .emacs (custom-set-variables) to .emacs-my. Remove duplication.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
101
diff
changeset
|
367 |
(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
|
368 |
|
171
2f2aae1d394c
Set read-quoted-char-radix.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
169
diff
changeset
|
369 |
(setq read-quoted-char-radix 16) |
2f2aae1d394c
Set read-quoted-char-radix.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
169
diff
changeset
|
370 |
|
622
596406094fd1
Port to Mac OS X console Emacs 22.1.1.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
371 |
(when (and (>= emacs-major-version 22) (not (eq system-type 'darwin))) |
613
1e7314bb84bc
Fix loading error for Emacs 21.3.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
612
diff
changeset
|
372 |
(setq standard-display-table (make-display-table)) |
1e7314bb84bc
Fix loading error for Emacs 21.3.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
612
diff
changeset
|
373 |
(let ( (i ?\x80) hex hi low ) |
1e7314bb84bc
Fix loading error for Emacs 21.3.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
612
diff
changeset
|
374 |
(while (<= i ?\xff) |
1e7314bb84bc
Fix loading error for Emacs 21.3.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
612
diff
changeset
|
375 |
(setq hex (format "%x" i)) |
1e7314bb84bc
Fix loading error for Emacs 21.3.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
612
diff
changeset
|
376 |
(setq hi (elt hex 0)) |
1e7314bb84bc
Fix loading error for Emacs 21.3.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
612
diff
changeset
|
377 |
(setq low (elt hex 1)) |
1e7314bb84bc
Fix loading error for Emacs 21.3.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
612
diff
changeset
|
378 |
(aset standard-display-table (unibyte-char-to-multibyte i) |
1e7314bb84bc
Fix loading error for Emacs 21.3.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
612
diff
changeset
|
379 |
(vector (make-glyph-code ?\\ 'escape-glyph) |
1e7314bb84bc
Fix loading error for Emacs 21.3.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
612
diff
changeset
|
380 |
(make-glyph-code ?x 'escape-glyph) |
1e7314bb84bc
Fix loading error for Emacs 21.3.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
612
diff
changeset
|
381 |
(make-glyph-code hi 'escape-glyph) |
1e7314bb84bc
Fix loading error for Emacs 21.3.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
612
diff
changeset
|
382 |
(make-glyph-code low 'escape-glyph))) |
1e7314bb84bc
Fix loading error for Emacs 21.3.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
612
diff
changeset
|
383 |
(setq i (+ i 1)))) |
1e7314bb84bc
Fix loading error for Emacs 21.3.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
612
diff
changeset
|
384 |
) |
525
c8d4f5368b04
Show non printable characters in hex, not in octal.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
524
diff
changeset
|
385 |
|
344
b7d0989d9472
generic-define-* before (require 'generic-x) allow load all useful extra modes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
342
diff
changeset
|
386 |
;; generic-define-* before (require 'generic-x) allow load all useful extra modes. |
b7d0989d9472
generic-define-* before (require 'generic-x) allow load all useful extra modes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
342
diff
changeset
|
387 |
(setq generic-define-mswindows-modes t) |
b7d0989d9472
generic-define-* before (require 'generic-x) allow load all useful extra modes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
342
diff
changeset
|
388 |
(setq generic-define-unix-modes t) |
341
84db44766351
Remove bat-file-mode as it present in generic-x.el.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
339
diff
changeset
|
389 |
(require 'generic-x) |
84db44766351
Remove bat-file-mode as it present in generic-x.el.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
339
diff
changeset
|
390 |
|
345
90b5ae643a6d
Move code to proper place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
344
diff
changeset
|
391 |
;; The following commands are usually disabled by default. Enable them... |
90b5ae643a6d
Move code to proper place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
344
diff
changeset
|
392 |
(put 'eval-expression 'disabled nil) |
90b5ae643a6d
Move code to proper place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
344
diff
changeset
|
393 |
(put 'downcase-region 'disabled nil) |
90b5ae643a6d
Move code to proper place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
344
diff
changeset
|
394 |
(put 'upcase-region 'disabled nil) |
90b5ae643a6d
Move code to proper place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
344
diff
changeset
|
395 |
(put 'narrow-to-page 'disabled nil) |
90b5ae643a6d
Move code to proper place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
344
diff
changeset
|
396 |
(put 'narrow-to-region 'disabled nil) |
90b5ae643a6d
Move code to proper place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
344
diff
changeset
|
397 |
(put 'scroll-left 'disabled nil) |
90b5ae643a6d
Move code to proper place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
344
diff
changeset
|
398 |
|
432
650ccece6b01
use-dialog-box set to t.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
431
diff
changeset
|
399 |
(setq |
650ccece6b01
use-dialog-box set to t.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
431
diff
changeset
|
400 |
use-dialog-box t |
650ccece6b01
use-dialog-box set to t.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
431
diff
changeset
|
401 |
x-gtk-show-hidden-files t |
650ccece6b01
use-dialog-box set to t.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
431
diff
changeset
|
402 |
) |
650ccece6b01
use-dialog-box set to t.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
431
diff
changeset
|
403 |
|
719
694f7e388f2b
Add func 'my-prevent-kill-buffer' and prevent kill '*scratch*' buffer.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
718
diff
changeset
|
404 |
(defun my-prevent-kill-buffer () |
694f7e388f2b
Add func 'my-prevent-kill-buffer' and prevent kill '*scratch*' buffer.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
718
diff
changeset
|
405 |
(if (equal (buffer-name) "*scratch*") nil t)) |
694f7e388f2b
Add func 'my-prevent-kill-buffer' and prevent kill '*scratch*' buffer.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
718
diff
changeset
|
406 |
(add-to-list 'kill-buffer-query-functions 'my-prevent-kill-buffer) |
694f7e388f2b
Add func 'my-prevent-kill-buffer' and prevent kill '*scratch*' buffer.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
718
diff
changeset
|
407 |
|
722
7d43d5ae86fe
Use "*scratch*" as temp buffer.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
721
diff
changeset
|
408 |
(define-key global-map "\C-ct" (lambda nil (interactive) (switch-to-buffer "*scratch*"))) |
7d43d5ae86fe
Use "*scratch*" as temp buffer.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
721
diff
changeset
|
409 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
410 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
411 |
(message "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
|
412 |
|
34 | 413 |
(iswitchb-mode 1) |
505
eb7d261fa539
Simplify expression.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
498
diff
changeset
|
414 |
(setq iswitchb-buffer-ignore |
eb7d261fa539
Simplify expression.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
498
diff
changeset
|
415 |
'("^ " |
eb7d261fa539
Simplify expression.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
498
diff
changeset
|
416 |
"^\*Buffer" |
eb7d261fa539
Simplify expression.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
498
diff
changeset
|
417 |
"^\*Completions\*" |
eb7d261fa539
Simplify expression.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
498
diff
changeset
|
418 |
"^\*tramp" |
eb7d261fa539
Simplify expression.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
498
diff
changeset
|
419 |
"^\*Dired log\*" |
eb7d261fa539
Simplify expression.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
498
diff
changeset
|
420 |
"^\*Quail Completions\*" |
eb7d261fa539
Simplify expression.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
498
diff
changeset
|
421 |
"^\*Disabled Command\*" |
555
7b2833356d27
Add TAGS file to 'iswitchb-buffer-ignore'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
554
diff
changeset
|
422 |
"^TAGS" |
505
eb7d261fa539
Simplify expression.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
498
diff
changeset
|
423 |
)) |
34 | 424 |
|
35
691635158df5
More pretty buffer switch and naming.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
34
diff
changeset
|
425 |
(require 'uniquify) |
691635158df5
More pretty buffer switch and naming.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
34
diff
changeset
|
426 |
(setq uniquify-buffer-name-style 'post-forward) |
685
dccfef291718
Add uniquify settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
684
diff
changeset
|
427 |
(setq uniquify-separator "|") |
dccfef291718
Add uniquify settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
684
diff
changeset
|
428 |
(setq uniquify-after-kill-buffer-p t) |
35
691635158df5
More pretty buffer switch and naming.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
34
diff
changeset
|
429 |
|
244
5db897a3f1cd
buffer-menu better then buffer-list, but ibuffer much better.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
243
diff
changeset
|
430 |
;; 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
|
431 |
(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
|
432 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
433 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
434 |
(message "scrolling") |
0 | 435 |
|
339
4e131c57a0ef
With scroll-step 3 when go down it scroll one line but if up - 3 so set
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
338
diff
changeset
|
436 |
(defvar my-scroll-margin 4) |
4e131c57a0ef
With scroll-step 3 when go down it scroll one line but if up - 3 so set
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
338
diff
changeset
|
437 |
|
127 | 438 |
(setq-default |
339
4e131c57a0ef
With scroll-step 3 when go down it scroll one line but if up - 3 so set
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
338
diff
changeset
|
439 |
scroll-step 1 |
4e131c57a0ef
With scroll-step 3 when go down it scroll one line but if up - 3 so set
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
338
diff
changeset
|
440 |
scroll-conservatively my-scroll-margin |
127 | 441 |
scroll-preserve-screen-position t |
442 |
) |
|
443 |
||
333
14b07ca8335a
Set margin only for desired modes! Do not frustrate calendar any more.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
332
diff
changeset
|
444 |
;; Set margin only for desired modes! Do not frustrate calendar any more. |
14b07ca8335a
Set margin only for desired modes! Do not frustrate calendar any more.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
332
diff
changeset
|
445 |
(make-variable-buffer-local 'scroll-margin) |
339
4e131c57a0ef
With scroll-step 3 when go down it scroll one line but if up - 3 so set
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
338
diff
changeset
|
446 |
(mapc (lambda (hook) (add-hook hook (lambda nil (setq scroll-margin my-scroll-margin)))) |
372
32b54537dd10
Code ported to work with Emac 21.4. Mainly problems in undefi8ned functions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
371
diff
changeset
|
447 |
;; TODO its good invoke delete-dups for list, but delete-dups not exist in Emacs 21.4 |
391
09cfea42153e
Added list of mode hooks for enabling scroll margin.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
389
diff
changeset
|
448 |
(append my-text-mode-hook-list my-devel-mode-hook-list my-scroll-margin-mode-hook-list) ) |
333
14b07ca8335a
Set margin only for desired modes! Do not frustrate calendar any more.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
332
diff
changeset
|
449 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
450 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
451 |
(message "search, isearch, occur") |
254
51b47da56551
Highlight on search and repalce.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
253
diff
changeset
|
452 |
|
217
1c42ba3ac4ba
Case insensitive search. Group search customization together.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
216
diff
changeset
|
453 |
(setq case-fold-search t) |
1c42ba3ac4ba
Case insensitive search. Group search customization together.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
216
diff
changeset
|
454 |
|
254
51b47da56551
Highlight on search and repalce.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
253
diff
changeset
|
455 |
(setq query-replace-highlight t) ; highlight during query |
51b47da56551
Highlight on search and repalce.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
253
diff
changeset
|
456 |
(setq search-highlight t) ; highlight incremental search |
51b47da56551
Highlight on search and repalce.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
253
diff
changeset
|
457 |
|
563
6d5387a4e95d
Move code to proper place. Add 'f7' key binding for 'occur'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
562
diff
changeset
|
458 |
;; Make old Emacs key binding like in Emacs 23.x. |
6d5387a4e95d
Move code to proper place. Add 'f7' key binding for 'occur'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
562
diff
changeset
|
459 |
(when (< emacs-major-version 23) |
6d5387a4e95d
Move code to proper place. Add 'f7' key binding for 'occur'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
562
diff
changeset
|
460 |
(global-set-key (kbd "M-s o") 'occur) |
6d5387a4e95d
Move code to proper place. Add 'f7' key binding for 'occur'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
562
diff
changeset
|
461 |
) |
6d5387a4e95d
Move code to proper place. Add 'f7' key binding for 'occur'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
562
diff
changeset
|
462 |
(global-set-key [f7] 'occur) |
6d5387a4e95d
Move code to proper place. Add 'f7' key binding for 'occur'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
562
diff
changeset
|
463 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
464 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
465 |
(message "grep, find") |
526
9e613d7de6e1
Added exclude pattern to 'grep-find-ignored-directories'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
525
diff
changeset
|
466 |
|
542 | 467 |
;; -ls produce very noisy output: |
468 |
;; (setq find-ls-option '("-ls" . "")) |
|
469 |
;; So I use next expression, which work with GNU find, I replace %s with '0' |
|
470 |
;; to avoid unnecessary sys calls and this make output aligned by column: |
|
471 |
(setq find-ls-option '("-printf ' -rw-rw-rw- 0 %AY-%Am-%Ad %AH:%AM %p\n'" . "")) |
|
472 |
||
357
84c8c5f03fd4
Correct grep command.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
356
diff
changeset
|
473 |
;; Do not set t because some grep do not has --color options. |
84c8c5f03fd4
Correct grep command.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
356
diff
changeset
|
474 |
(setq grep-highlight-matches nil) |
84c8c5f03fd4
Correct grep command.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
356
diff
changeset
|
475 |
(setq grep-use-null-device nil) |
84c8c5f03fd4
Correct grep command.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
356
diff
changeset
|
476 |
|
544
4095ef5f1346
Fix "grep-find-ignored-directories unknow variable".
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
543
diff
changeset
|
477 |
(eval-after-load 'grep |
556
782325bafc4a
Fix 'eval-after-load' usage.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
555
diff
changeset
|
478 |
'(progn |
782325bafc4a
Fix 'eval-after-load' usage.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
555
diff
changeset
|
479 |
(add-to-list 'grep-find-ignored-directories "build" t) |
782325bafc4a
Fix 'eval-after-load' usage.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
555
diff
changeset
|
480 |
(add-to-list 'grep-find-ignored-directories "dist" t) |
782325bafc4a
Fix 'eval-after-load' usage.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
555
diff
changeset
|
481 |
(add-to-list 'grep-find-ignored-directories "lib" t) |
526
9e613d7de6e1
Added exclude pattern to 'grep-find-ignored-directories'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
525
diff
changeset
|
482 |
|
560 | 483 |
(when (boundp 'grep-find-ignored-files) |
484 |
(add-to-list 'grep-find-ignored-files "*TAGS") |
|
485 |
(add-to-list 'grep-find-ignored-files "GPATH") |
|
486 |
) |
|
556
782325bafc4a
Fix 'eval-after-load' usage.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
555
diff
changeset
|
487 |
)) |
527
3996f4df0915
Added exclude pattern to 'grep-find-ignored-files'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
526
diff
changeset
|
488 |
|
356
fd1af7a494de
Added key binding for rgrep.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
355
diff
changeset
|
489 |
(global-set-key [M-f7] 'rgrep) |
fd1af7a494de
Added key binding for rgrep.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
355
diff
changeset
|
490 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
491 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
492 |
(message "syntax highlighting") |
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
493 |
|
0 | 494 |
(setq font-lock-maximum-decoration t) |
395
c7f6eb04626d
Port to Emacs 32.2 (in 'global-font-lock-mode' error - Wrong number of arguments).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
391
diff
changeset
|
495 |
(global-font-lock-mode 1) |
0 | 496 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
497 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
498 |
(message "highlight selected text") |
64
54ef0d72488f
More pretty with selecting.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
63
diff
changeset
|
499 |
|
145
b1fdfc950089
More correct code for pc-select.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
144
diff
changeset
|
500 |
;; 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
|
501 |
(transient-mark-mode 1) |
64
54ef0d72488f
More pretty with selecting.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
63
diff
changeset
|
502 |
(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
|
503 |
|
298
9fdaecd9336d
Remove duplicated comments.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
297
diff
changeset
|
504 |
;; 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
|
505 |
(require 'pc-select) |
298
9fdaecd9336d
Remove duplicated comments.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
297
diff
changeset
|
506 |
(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
|
507 |
(setq pc-select-meta-moves-sexps t) |
372
32b54537dd10
Code ported to work with Emac 21.4. Mainly problems in undefi8ned functions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
371
diff
changeset
|
508 |
(cond |
32b54537dd10
Code ported to work with Emac 21.4. Mainly problems in undefi8ned functions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
371
diff
changeset
|
509 |
((= emacs-major-version 21) (pc-selection-mode)) |
32b54537dd10
Code ported to work with Emac 21.4. Mainly problems in undefi8ned functions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
371
diff
changeset
|
510 |
((>= emacs-major-version 22) (pc-selection-mode 1)) |
32b54537dd10
Code ported to work with Emac 21.4. Mainly problems in undefi8ned functions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
371
diff
changeset
|
511 |
) |
64
54ef0d72488f
More pretty with selecting.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
63
diff
changeset
|
512 |
|
146
506d2883199f
kill/yank func also use/update CLIPBOARD selsction on X window.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
145
diff
changeset
|
513 |
(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
|
514 |
(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
|
515 |
) |
64
54ef0d72488f
More pretty with selecting.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
63
diff
changeset
|
516 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
517 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
518 |
(message "highlighting current line") |
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
519 |
|
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
520 |
(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
|
521 |
(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
|
522 |
(global-hl-line-mode 1) |
0 | 523 |
) |
524 |
||
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
525 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
526 |
(message "paren, braces") |
0 | 527 |
|
528 |
(show-paren-mode 1) ; Parenthesis matching via highlighting. |
|
529 |
(setq show-paren-style (quote parenthesis)) |
|
530 |
||
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
531 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
532 |
(message "keyboard, mouse") |
0 | 533 |
|
402
b1a9c8e0c22e
As cyrillic-jcuken input metod fixed
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
398
diff
changeset
|
534 |
;; cyrillic-jis-russian for 567 is :,. |
b1a9c8e0c22e
As cyrillic-jcuken input metod fixed
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
398
diff
changeset
|
535 |
;; cyrillic-jcuken for SHIFT 567 is :,. |
b1a9c8e0c22e
As cyrillic-jcuken input metod fixed
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
398
diff
changeset
|
536 |
;; russian-computer for SHIFT 567 is %^& |
404
c8e90a10c941
Set input method to russian-computer by default as in cyrillic-jcuken instead
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
403
diff
changeset
|
537 |
(if (>= emacs-major-version 22) |
c8e90a10c941
Set input method to russian-computer by default as in cyrillic-jcuken instead
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
403
diff
changeset
|
538 |
(setq default-input-method 'russian-computer) |
c8e90a10c941
Set input method to russian-computer by default as in cyrillic-jcuken instead
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
403
diff
changeset
|
539 |
(setq default-input-method 'cyrillic-jcuken)) |
0 | 540 |
;; (pc-bindings-mode) ; Myself define keybinding, see |
541 |
||
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
542 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
543 |
(message "completion") |
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
|
544 |
|
418
dd77820b51c4
I remove partial-completion-mode because it depricated in Emacs 24.0.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
417
diff
changeset
|
545 |
;; I remove partial-completion-mode because it depricated in Emacs 24.0. |
dd77820b51c4
I remove partial-completion-mode because it depricated in Emacs 24.0.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
417
diff
changeset
|
546 |
;; Completion controled by 'completion-styles' variable. |
0 | 547 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
548 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
549 |
(message "mouse") |
0 | 550 |
|
551 |
;; Scroll Bar gets dragged by mouse butn 1 |
|
552 |
(global-set-key [vertical-scroll-bar down-mouse-1] 'scroll-bar-drag) |
|
553 |
;; Paste at point NOT at cursor |
|
151 | 554 |
(setq mouse-yank-at-point t) |
439
a1910375f39e
mouse-wheel-mode don't defined for Cygwin console Emacs 23.2.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
438
diff
changeset
|
555 |
(when window-system |
a1910375f39e
mouse-wheel-mode don't defined for Cygwin console Emacs 23.2.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
438
diff
changeset
|
556 |
(mouse-wheel-mode 1) |
a1910375f39e
mouse-wheel-mode don't defined for Cygwin console Emacs 23.2.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
438
diff
changeset
|
557 |
) |
0 | 558 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
559 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
560 |
(message "key binding, short-keys") |
0 | 561 |
|
562 |
(global-set-key [home] 'beginning-of-line) |
|
563 |
(global-set-key [end] 'end-of-line) |
|
564 |
(global-set-key [C-home] 'beginning-of-buffer) |
|
565 |
(global-set-key [C-end] 'end-of-buffer) |
|
566 |
(global-set-key [C-delete] 'kill-word) |
|
567 |
(global-set-key [delete] 'delete-char) |
|
568 |
;; (global-set-key [backspace] 'backward-delete-char-untabify) ; not work properly in *info* mode |
|
569 |
||
570 |
;; setting some f[1-12] keys |
|
571 |
(global-set-key [f1] 'help) |
|
572 |
(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
|
573 |
;; (global-set-key [xxx] 'ediff-buffers) |
0 | 574 |
(global-set-key [f4] 'ispell-buffer) |
134
a071b60e4339
Set key binding to rename buffer.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
125
diff
changeset
|
575 |
(global-set-key [S-f6] 'rename-buffer) |
0 | 576 |
(global-set-key [f8] 'kill-this-buffer) |
601
7be9c0c0ffb7
(global-set-key (kbd C-x C-k) 'kill-this-buffer)
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
600
diff
changeset
|
577 |
(global-set-key (kbd "C-x C-k") 'kill-this-buffer) |
0 | 578 |
(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
|
579 |
(global-set-key [f6] 'toggle-truncate-lines) |
0 | 580 |
|
581 |
;; frames, windows manipulation, switch buffers |
|
582 |
(global-set-key [?\C-x right] 'next-buffer) |
|
583 |
(global-set-key [?\C-x left] 'previous-buffer) |
|
584 |
||
585 |
(global-set-key (kbd "\e\eg") 'goto-line) |
|
586 |
(global-set-key (kbd "\e\er") 'query-replace-regexp) |
|
587 |
||
435
a34e8ddc9e12
Disable suspend by C-x C-z. It ugly.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
434
diff
changeset
|
588 |
;; Disable suspend. It ugly. |
615
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
589 |
(when window-system |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
590 |
(global-set-key (kbd "C-z") nil)) |
435
a34e8ddc9e12
Disable suspend by C-x C-z. It ugly.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
434
diff
changeset
|
591 |
(global-set-key (kbd "C-x C-z") nil) |
81
0ce6eaf6f26c
Disable C-z, it ugly.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
80
diff
changeset
|
592 |
|
0 | 593 |
;; (global-set-key [language-change] 'ignore) |
594 |
||
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
595 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
596 |
(message "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
|
597 |
|
162
0ac8d1f4304d
Emacs 23.1 no longer need codepage-setup.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
157
diff
changeset
|
598 |
;; 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
|
599 |
(when (<= emacs-major-version 22) |
0ac8d1f4304d
Emacs 23.1 no longer need codepage-setup.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
157
diff
changeset
|
600 |
(codepage-setup 866) |
0ac8d1f4304d
Emacs 23.1 no longer need codepage-setup.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
157
diff
changeset
|
601 |
(codepage-setup 1251) |
0ac8d1f4304d
Emacs 23.1 no longer need codepage-setup.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
157
diff
changeset
|
602 |
) |
0 | 603 |
|
53 | 604 |
;; Comment because prefer-coding-system will be ignored. |
605 |
;; (setq-default coding-system-for-read 'cp1251-dos) |
|
606 |
;; (setq-default coding-system-for-write 'cp1251-dos) |
|
0 | 607 |
|
608 |
;; (setq locale-coding-system 'cp1251-dos) |
|
583 | 609 |
;; (set-language-environment 'UTF-8) |
0 | 610 |
;; (set-terminal-coding-system 'cp1251) |
611 |
;; (set-keyboard-coding-system 'cp1251) |
|
612 |
||
4
46543c097be0
Transfer changer from .eamcs_unix, add case for w32 or other system.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
3
diff
changeset
|
613 |
(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
|
614 |
(cond |
106
0591d06cf752
Решил проблему copy/paste в X. Решил проблему поиска в UTF-8 буфере.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
615 |
((equal window-system 'w32) ; also (string-equal system-type "windows-nt") |
615
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
616 |
(set-selection-coding-system 'utf-16-le-dos) |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
617 |
(setq-default buffer-file-coding-system 'cp1251) |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
618 |
(setq default-file-name-coding-system 'cp1251) |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
619 |
(setq default-process-coding-system '(cp1251 . cp1251)) |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
620 |
) |
106
0591d06cf752
Решил проблему copy/paste в X. Решил проблему поиска в UTF-8 буфере.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
621 |
((equal window-system 'x) |
615
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
622 |
(prefer-coding-system 'utf-8-unix) |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
623 |
(setq selection-coding-system 'compound-text-with-extensions) |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
624 |
(setq x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING)) |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
625 |
(modify-coding-system-alist 'process ".*" 'utf-8-unix) |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
626 |
) |
622
596406094fd1
Port to Mac OS X console Emacs 22.1.1.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
627 |
((eq system-type 'darwin) |
623 | 628 |
nil |
629 |
) |
|
106
0591d06cf752
Решил проблему copy/paste в X. Решил проблему поиска в UTF-8 буфере.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
630 |
(t |
615
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
631 |
(prefer-coding-system 'cp1251-dos) |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
632 |
(prefer-coding-system 'utf-8-unix) |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
633 |
(modify-coding-system-alist 'process ".*" 'utf-8-unix) |
4
46543c097be0
Transfer changer from .eamcs_unix, add case for w32 or other system.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
3
diff
changeset
|
634 |
) |
615
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
635 |
) |
0 | 636 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
637 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
598 | 638 |
(message "open file, ffap, dired") |
639 |
||
460 | 640 |
(setq-default save-place t) |
641 |
(require 'saveplace) |
|
642 |
||
598 | 643 |
(require 'dired) |
241
78cbd4c692ee
Added dired settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
240
diff
changeset
|
644 |
|
598 | 645 |
(require 'ffap) |
646 |
(ffap-bindings) |
|
455
434f14adcd26
Added key binding for reuse existent dired buffer.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
454
diff
changeset
|
647 |
|
457
188efe1c6f59
Move setting to proper place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
456
diff
changeset
|
648 |
;; I usually mistype "C-x C-f" to "C-x d" or "C-x C-d", so always use find-file, |
188efe1c6f59
Move setting to proper place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
456
diff
changeset
|
649 |
;; because when file if directory find-file load dired, if regular file open it. |
598 | 650 |
(global-set-key (kbd "C-x C-f") 'find-file-at-point) |
651 |
(global-set-key (kbd "C-x C-d") 'find-file-at-point) |
|
652 |
(global-set-key (kbd "C-x d") 'find-file-at-point) |
|
457
188efe1c6f59
Move setting to proper place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
456
diff
changeset
|
653 |
|
607
deef9ab0fb58
Stop 'ffap' in Dired as its suggestion is inconvenient.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
606
diff
changeset
|
654 |
;; Stop 'ffap' in Dired as its suggestion is inconvenient. |
deef9ab0fb58
Stop 'ffap' in Dired as its suggestion is inconvenient.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
606
diff
changeset
|
655 |
(define-key dired-mode-map (kbd "C-x C-f") 'find-file) |
deef9ab0fb58
Stop 'ffap' in Dired as its suggestion is inconvenient.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
606
diff
changeset
|
656 |
(define-key dired-mode-map (kbd "C-x C-d") 'find-file) |
deef9ab0fb58
Stop 'ffap' in Dired as its suggestion is inconvenient.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
606
diff
changeset
|
657 |
(define-key dired-mode-map (kbd "C-x d") 'find-file) |
deef9ab0fb58
Stop 'ffap' in Dired as its suggestion is inconvenient.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
606
diff
changeset
|
658 |
|
241
78cbd4c692ee
Added dired settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
240
diff
changeset
|
659 |
(setq dired-dwim-target t) |
78cbd4c692ee
Added dired settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
240
diff
changeset
|
660 |
;; dangerous |
78cbd4c692ee
Added dired settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
240
diff
changeset
|
661 |
;; (setq |
78cbd4c692ee
Added dired settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
240
diff
changeset
|
662 |
;; dired-recursive-copies 'top |
78cbd4c692ee
Added dired settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
240
diff
changeset
|
663 |
;; dired-recursive-deletes 'top) |
78cbd4c692ee
Added dired settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
240
diff
changeset
|
664 |
|
463
adc3abb3c1fc
Make Total Commmander like key binding for Enter and Backspace.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
462
diff
changeset
|
665 |
(defun my-dired-up-dir () |
adc3abb3c1fc
Make Total Commmander like key binding for Enter and Backspace.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
462
diff
changeset
|
666 |
"'Reuse' buffer if enter to dir or open new buffer if enter to file." |
adc3abb3c1fc
Make Total Commmander like key binding for Enter and Backspace.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
462
diff
changeset
|
667 |
(interactive) |
471
1d59b8a9d8a0
Fix bug: under Linux you can not go upper for '/dir' like dir (that lie
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
470
diff
changeset
|
668 |
;; (dired-current-directory) always end with trailing '/' char. |
1d59b8a9d8a0
Fix bug: under Linux you can not go upper for '/dir' like dir (that lie
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
470
diff
changeset
|
669 |
(let* ( (dir (dired-current-directory)) (i (- (length dir) 2)) upperdir ) |
463
adc3abb3c1fc
Make Total Commmander like key binding for Enter and Backspace.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
462
diff
changeset
|
670 |
(while (and |
adc3abb3c1fc
Make Total Commmander like key binding for Enter and Backspace.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
462
diff
changeset
|
671 |
(>= i 0) |
adc3abb3c1fc
Make Total Commmander like key binding for Enter and Backspace.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
462
diff
changeset
|
672 |
(not (equal (aref dir i) ?/)) ) |
adc3abb3c1fc
Make Total Commmander like key binding for Enter and Backspace.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
462
diff
changeset
|
673 |
(setq i (- i 1)) |
adc3abb3c1fc
Make Total Commmander like key binding for Enter and Backspace.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
462
diff
changeset
|
674 |
) |
471
1d59b8a9d8a0
Fix bug: under Linux you can not go upper for '/dir' like dir (that lie
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
470
diff
changeset
|
675 |
(setq upperdir (substring dir 0 (+ i 1))) |
1d59b8a9d8a0
Fix bug: under Linux you can not go upper for '/dir' like dir (that lie
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
470
diff
changeset
|
676 |
(when (file-directory-p upperdir) |
1d59b8a9d8a0
Fix bug: under Linux you can not go upper for '/dir' like dir (that lie
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
470
diff
changeset
|
677 |
(find-alternate-file upperdir) |
463
adc3abb3c1fc
Make Total Commmander like key binding for Enter and Backspace.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
462
diff
changeset
|
678 |
(dired-goto-file dir) |
adc3abb3c1fc
Make Total Commmander like key binding for Enter and Backspace.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
462
diff
changeset
|
679 |
) |
adc3abb3c1fc
Make Total Commmander like key binding for Enter and Backspace.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
462
diff
changeset
|
680 |
)) |
adc3abb3c1fc
Make Total Commmander like key binding for Enter and Backspace.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
462
diff
changeset
|
681 |
(define-key dired-mode-map (kbd "<backspace>") 'my-dired-up-dir) |
adc3abb3c1fc
Make Total Commmander like key binding for Enter and Backspace.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
462
diff
changeset
|
682 |
|
adc3abb3c1fc
Make Total Commmander like key binding for Enter and Backspace.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
462
diff
changeset
|
683 |
(defun my-dired-enter-to-dir () |
adc3abb3c1fc
Make Total Commmander like key binding for Enter and Backspace.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
462
diff
changeset
|
684 |
"'Reuse' buffer if enter to dir or open new buffer if enter to file." |
adc3abb3c1fc
Make Total Commmander like key binding for Enter and Backspace.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
462
diff
changeset
|
685 |
(interactive) |
adc3abb3c1fc
Make Total Commmander like key binding for Enter and Backspace.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
462
diff
changeset
|
686 |
(let ( (file (dired-get-file-for-visit)) ) |
adc3abb3c1fc
Make Total Commmander like key binding for Enter and Backspace.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
462
diff
changeset
|
687 |
(if (file-directory-p file) |
adc3abb3c1fc
Make Total Commmander like key binding for Enter and Backspace.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
462
diff
changeset
|
688 |
(find-alternate-file file) |
adc3abb3c1fc
Make Total Commmander like key binding for Enter and Backspace.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
462
diff
changeset
|
689 |
(find-file file) |
adc3abb3c1fc
Make Total Commmander like key binding for Enter and Backspace.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
462
diff
changeset
|
690 |
))) |
adc3abb3c1fc
Make Total Commmander like key binding for Enter and Backspace.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
462
diff
changeset
|
691 |
(define-key dired-mode-map (kbd "<return>") |
adc3abb3c1fc
Make Total Commmander like key binding for Enter and Backspace.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
462
diff
changeset
|
692 |
'my-dired-enter-to-dir) |
adc3abb3c1fc
Make Total Commmander like key binding for Enter and Backspace.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
462
diff
changeset
|
693 |
|
697
d19881accc91
Make behaviour same as in GUI for dired.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
695
diff
changeset
|
694 |
;; Make behaviour same as in GUI. |
d19881accc91
Make behaviour same as in GUI for dired.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
695
diff
changeset
|
695 |
(unless window-system |
d19881accc91
Make behaviour same as in GUI for dired.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
695
diff
changeset
|
696 |
(define-key dired-mode-map (kbd "DEL") 'my-dired-up-dir) |
d19881accc91
Make behaviour same as in GUI for dired.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
695
diff
changeset
|
697 |
(define-key dired-mode-map (kbd "RET") 'my-dired-enter-to-dir) |
d19881accc91
Make behaviour same as in GUI for dired.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
695
diff
changeset
|
698 |
) |
d19881accc91
Make behaviour same as in GUI for dired.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
695
diff
changeset
|
699 |
|
455
434f14adcd26
Added key binding for reuse existent dired buffer.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
454
diff
changeset
|
700 |
(when (>= emacs-major-version 22) |
434f14adcd26
Added key binding for reuse existent dired buffer.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
454
diff
changeset
|
701 |
;; Enable 'a' command. |
434f14adcd26
Added key binding for reuse existent dired buffer.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
454
diff
changeset
|
702 |
(put 'dired-find-alternate-file 'disabled nil) |
434f14adcd26
Added key binding for reuse existent dired buffer.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
454
diff
changeset
|
703 |
) |
326
ded53e19d23a
Enable 'a' command in dired.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
303
diff
changeset
|
704 |
|
469
a9adec4fbcbf
Mark temporary files in dired by '`'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
468
diff
changeset
|
705 |
(defun my-file-name-tmp-p (file) |
667
32cbaa8f4368
Add .base .local .other to list of tmp files.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
666
diff
changeset
|
706 |
(string-match |
32cbaa8f4368
Add .base .local .other to list of tmp files.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
666
diff
changeset
|
707 |
`,(concat |
32cbaa8f4368
Add .base .local .other to list of tmp files.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
666
diff
changeset
|
708 |
"\\(?:^#.*#\\|~\\|^.?\\.diff\\|" |
32cbaa8f4368
Add .base .local .other to list of tmp files.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
666
diff
changeset
|
709 |
"\\." (regexp-opt '("base" "local" "orig" "other" "log" "stackdump" "rej")) |
32cbaa8f4368
Add .base .local .other to list of tmp files.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
666
diff
changeset
|
710 |
"\\)\\'") |
32cbaa8f4368
Add .base .local .other to list of tmp files.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
666
diff
changeset
|
711 |
(file-name-nondirectory file))) |
469
a9adec4fbcbf
Mark temporary files in dired by '`'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
468
diff
changeset
|
712 |
|
a9adec4fbcbf
Mark temporary files in dired by '`'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
468
diff
changeset
|
713 |
(defun my-dired-flag-tmp-files () |
a9adec4fbcbf
Mark temporary files in dired by '`'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
468
diff
changeset
|
714 |
"Flag all temporary files for deletion." |
a9adec4fbcbf
Mark temporary files in dired by '`'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
468
diff
changeset
|
715 |
(interactive) |
a9adec4fbcbf
Mark temporary files in dired by '`'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
468
diff
changeset
|
716 |
(dired-mark-if |
a9adec4fbcbf
Mark temporary files in dired by '`'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
468
diff
changeset
|
717 |
(let ( (fn (dired-get-filename 'verbatim t)) ) |
a9adec4fbcbf
Mark temporary files in dired by '`'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
468
diff
changeset
|
718 |
(and fn (my-file-name-tmp-p fn)) ) |
a9adec4fbcbf
Mark temporary files in dired by '`'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
468
diff
changeset
|
719 |
"backup file" |
a9adec4fbcbf
Mark temporary files in dired by '`'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
468
diff
changeset
|
720 |
) |
a9adec4fbcbf
Mark temporary files in dired by '`'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
468
diff
changeset
|
721 |
) |
a9adec4fbcbf
Mark temporary files in dired by '`'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
468
diff
changeset
|
722 |
|
a9adec4fbcbf
Mark temporary files in dired by '`'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
468
diff
changeset
|
723 |
(define-key dired-mode-map (kbd "`") 'my-dired-flag-tmp-files) |
a9adec4fbcbf
Mark temporary files in dired by '`'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
468
diff
changeset
|
724 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
725 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
726 |
(message "ls-lisp, dired ls") |
464
ae073d35f674
Always use 'ls-lisp' to emulate 'ls'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
463
diff
changeset
|
727 |
|
ae073d35f674
Always use 'ls-lisp' to emulate 'ls'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
463
diff
changeset
|
728 |
;; If non-nil - use 'insert-directory-program', which I dislike. |
ae073d35f674
Always use 'ls-lisp' to emulate 'ls'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
463
diff
changeset
|
729 |
(setq ls-lisp-use-insert-directory-program nil) |
ae073d35f674
Always use 'ls-lisp' to emulate 'ls'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
463
diff
changeset
|
730 |
(setq ls-lisp-ignore-case t) |
ae073d35f674
Always use 'ls-lisp' to emulate 'ls'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
463
diff
changeset
|
731 |
(setq ls-lisp-dirs-first t) |
519
bdc19bd3820f
Ignore owners and groups under Cygwin (mostly because
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
517
diff
changeset
|
732 |
(if (memq system-type '(windows-nt cygwin)) |
464
ae073d35f674
Always use 'ls-lisp' to emulate 'ls'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
463
diff
changeset
|
733 |
(setq ls-lisp-verbosity nil) |
ae073d35f674
Always use 'ls-lisp' to emulate 'ls'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
463
diff
changeset
|
734 |
(setq ls-lisp-verbosity '(links uid gid))) |
ae073d35f674
Always use 'ls-lisp' to emulate 'ls'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
463
diff
changeset
|
735 |
;; Force use 'ls-lisp-format-time-list'. |
ae073d35f674
Always use 'ls-lisp' to emulate 'ls'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
463
diff
changeset
|
736 |
(setq ls-lisp-use-localized-time-format t) |
ae073d35f674
Always use 'ls-lisp' to emulate 'ls'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
463
diff
changeset
|
737 |
(setq ls-lisp-format-time-list |
474
d1a3f9322927
Show seconds for file modification time in dired.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
473
diff
changeset
|
738 |
'("%Y-%m-%d %H:%M:%S" |
d1a3f9322927
Show seconds for file modification time in dired.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
473
diff
changeset
|
739 |
"%Y-%m-%d %H:%M ")) |
475
bb2bc4c0192a
Emacs must load ls-lisp to enable it under Linux.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
474
diff
changeset
|
740 |
(require 'ls-lisp) |
464
ae073d35f674
Always use 'ls-lisp' to emulate 'ls'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
463
diff
changeset
|
741 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
742 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
743 |
(message "compression, archive") |
240
77b01720a256
Enable image if supported.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
239
diff
changeset
|
744 |
|
0 | 745 |
(require 'jka-compr) ; Automatic decompression, hooks for tar-mode. |
615
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
746 |
(when (fboundp 'auto-compression-mode) |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
747 |
(auto-compression-mode 1)) |
0 | 748 |
|
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
749 |
(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
|
750 |
|
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
751 |
(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
|
752 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
753 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
619
d5b22e5edae1
Exclude .svg image from supported image list, as Emacs doesn't come with SVG
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
618
diff
changeset
|
754 |
(message "image, png, svg") |
240
77b01720a256
Enable image if supported.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
239
diff
changeset
|
755 |
|
77b01720a256
Enable image if supported.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
239
diff
changeset
|
756 |
(when (fboundp 'auto-image-file-mode) |
77b01720a256
Enable image if supported.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
239
diff
changeset
|
757 |
(auto-image-file-mode 1)) |
619
d5b22e5edae1
Exclude .svg image from supported image list, as Emacs doesn't come with SVG
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
618
diff
changeset
|
758 |
(eval-after-load 'image-file |
d5b22e5edae1
Exclude .svg image from supported image list, as Emacs doesn't come with SVG
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
618
diff
changeset
|
759 |
'(progn |
d5b22e5edae1
Exclude .svg image from supported image list, as Emacs doesn't come with SVG
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
618
diff
changeset
|
760 |
;; Exclude .svg image from supported image list, as Emacs doesn't come |
d5b22e5edae1
Exclude .svg image from supported image list, as Emacs doesn't come with SVG
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
618
diff
changeset
|
761 |
;; with SVG shared library. |
d5b22e5edae1
Exclude .svg image from supported image list, as Emacs doesn't come with SVG
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
618
diff
changeset
|
762 |
(setq image-file-name-extensions (remove "svg" image-file-name-extensions)) |
655 | 763 |
;; Re-initialize the image-file handler. |
764 |
(auto-image-file-mode t) |
|
619
d5b22e5edae1
Exclude .svg image from supported image list, as Emacs doesn't come with SVG
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
618
diff
changeset
|
765 |
)) |
240
77b01720a256
Enable image if supported.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
239
diff
changeset
|
766 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
767 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
768 |
(message "minibuffer") |
153
a03216c9fa8c
Delete dust. Correct 'completion-ignored-extensions' list.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
769 |
|
0 | 770 |
(require 'icomplete) ; Interactive completion in minibuffer. |
153
a03216c9fa8c
Delete dust. Correct 'completion-ignored-extensions' list.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
152
diff
changeset
|
771 |
(icomplete-mode 1) |
0 | 772 |
|
228
f55559c1ce8e
Do not redefine completion-ignored-extensions, instead append new values.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
227
diff
changeset
|
773 |
(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
|
774 |
'( |
f55559c1ce8e
Do not redefine completion-ignored-extensions, instead append new values.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
227
diff
changeset
|
775 |
".class" "~" ".aux" |
f55559c1ce8e
Do not redefine completion-ignored-extensions, instead append new values.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
227
diff
changeset
|
776 |
".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
|
777 |
;; 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
|
778 |
"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
|
779 |
) ) |
609
f397a4d2a697
(setq read-file-name-completion-ignore-case t)
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
608
diff
changeset
|
780 |
(setq read-file-name-completion-ignore-case t) |
0 | 781 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
782 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
783 |
(message "music") |
0 | 784 |
(setq gnus-audio-au-player "winamp.exe" |
785 |
gnus-audio-directory "D:\\music" |
|
786 |
gnus-audio-wav-player "winamp.exe") |
|
787 |
||
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
788 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
716 | 789 |
(message "url") |
790 |
||
791 |
;; http://tools.ietf.org/html/rfc3986 |
|
792 |
;; http://en.wikipedia.org/wiki/Percent-encoding |
|
793 |
(defun my-percent-decode (str) |
|
794 |
(decode-coding-string |
|
795 |
(let* ( (s (split-string str "%")) ) |
|
796 |
(my-fold |
|
797 |
'concat |
|
798 |
(car s) |
|
799 |
(mapcar |
|
800 |
(lambda (x) |
|
801 |
(concat (unibyte-string (string-to-number (substring x 0 2) 16)) (substring x 2))) |
|
802 |
(cdr s)) |
|
803 |
)) 'utf-8)) |
|
804 |
||
717
b958f182d0d4
Convert percent encoded string to native.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
716
diff
changeset
|
805 |
(defun my-percent-decode-region (arg beg end) |
b958f182d0d4
Convert percent encoded string to native.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
716
diff
changeset
|
806 |
"Convert percent encoded string to native." |
b958f182d0d4
Convert percent encoded string to native.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
716
diff
changeset
|
807 |
(interactive "P\nr") |
b958f182d0d4
Convert percent encoded string to native.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
716
diff
changeset
|
808 |
(let ( (result (my-percent-decode (buffer-substring-no-properties beg end))) ) |
b958f182d0d4
Convert percent encoded string to native.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
716
diff
changeset
|
809 |
(if (not arg) |
b958f182d0d4
Convert percent encoded string to native.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
716
diff
changeset
|
810 |
(message result) |
b958f182d0d4
Convert percent encoded string to native.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
716
diff
changeset
|
811 |
(delete-region beg end) |
b958f182d0d4
Convert percent encoded string to native.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
716
diff
changeset
|
812 |
(insert result)) |
b958f182d0d4
Convert percent encoded string to native.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
716
diff
changeset
|
813 |
) ) |
b958f182d0d4
Convert percent encoded string to native.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
716
diff
changeset
|
814 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
815 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
816 |
(message "browser") |
98
5223817dad90
Use mozilla browser. Not tested for Windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
97
diff
changeset
|
817 |
|
138
90fda97adcb1
Setup browse-url func for linux and windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
120
diff
changeset
|
818 |
(cond |
90fda97adcb1
Setup browse-url func for linux and windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
120
diff
changeset
|
819 |
((equal window-system 'w32) |
90fda97adcb1
Setup browse-url func for linux and windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
120
diff
changeset
|
820 |
(setq browse-url-browser-function 'browse-url-default-windows-browser)) |
476
4d3b20be2562
Use Firefox to open URLs under Debian Linux.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
475
diff
changeset
|
821 |
((boundp 'debian-emacs-flavor) |
4d3b20be2562
Use Firefox to open URLs under Debian Linux.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
475
diff
changeset
|
822 |
(setq browse-url-browser-function 'browse-url-firefox)) |
138
90fda97adcb1
Setup browse-url func for linux and windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
120
diff
changeset
|
823 |
(t |
90fda97adcb1
Setup browse-url func for linux and windows.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
120
diff
changeset
|
824 |
(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
|
825 |
|
677 | 826 |
(defun my-cygwin-search (str) |
827 |
"Search for Cygwin package on-line." |
|
828 |
(interactive (list (read-input "Search for Cygwin package on-line: "))) |
|
829 |
(browse-url (format "http://cygwin.com/cgi-bin2/package-grep.cgi?grep=%s" str)) |
|
830 |
) |
|
831 |
||
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
832 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
833 |
(message "calendar") |
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
834 |
|
0 | 835 |
;; (setq mark-holidays-in-calendar t) |
836 |
;; (setq all-christian-calendar-holidays t) |
|
837 |
;; (setq calendar-date-display-form (quote ((format "%04s-%02d-%02d" year (string-to-int month) (string-to-int day))))) |
|
838 |
;; (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
|
839 |
(setq calendar-week-start-day 1) |
71cec5d9c60f
Set week start with Monday.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
48
diff
changeset
|
840 |
(setq european-calendar-style t) |
0 | 841 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
842 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
843 |
(message "standard hooks") |
0 | 844 |
|
845 |
(add-hook 'write-file-hooks 'time-stamp) |
|
846 |
||
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
847 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
848 |
(message "auto-fill") |
0 | 849 |
|
102
25585e240b4a
Move customization from .emacs (custom-set-variables) to .emacs-my. Remove duplication.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
101
diff
changeset
|
850 |
(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
|
851 |
|
335
748c6e05fe87
Use common value for fill-column.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
334
diff
changeset
|
852 |
(defvar my-fill-column 100 |
748c6e05fe87
Use common value for fill-column.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
334
diff
changeset
|
853 |
"I use greater value then 78 for comment in prog source.") |
748c6e05fe87
Use common value for fill-column.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
334
diff
changeset
|
854 |
|
148
7df64d2c9f3d
Remove unused key binding. Added more docs.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
147
diff
changeset
|
855 |
;; 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
|
856 |
;; 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
|
857 |
(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
|
858 |
|
0 | 859 |
;; Turn on auto-fill mode |
860 |
(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
|
861 |
(add-hook 'text-mode-hook 'turn-on-auto-fill) |
0 | 862 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
863 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
864 |
(message "unknown") |
0 | 865 |
|
677 | 866 |
;; mailcrypt gnus message sendmail bbdb pilot bibtex eiffel-mode emacs-w3m |
233
dbef8d59a7c1
Remove old unknow desire function.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
232
diff
changeset
|
867 |
;; eudc filladapt hugs-mode mpg123 php-mode ps-print |
dbef8d59a7c1
Remove old unknow desire function.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
232
diff
changeset
|
868 |
;; chord-mode - edit guitar music |
dbef8d59a7c1
Remove old unknow desire function.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
232
diff
changeset
|
869 |
;; discography - variant of BibTeX mode for discographies |
0 | 870 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
871 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
872 |
(message "cacl, calculator") |
367
58e70956523a
Set cacl digit grouping.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
366
diff
changeset
|
873 |
|
58e70956523a
Set cacl digit grouping.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
366
diff
changeset
|
874 |
(setq-default calc-group-digits t) |
58e70956523a
Set cacl digit grouping.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
366
diff
changeset
|
875 |
(setq-default calc-group-char "'") |
58e70956523a
Set cacl digit grouping.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
366
diff
changeset
|
876 |
|
517
6889ad2dbd35
Add 'my-calc-eval-region' func.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
516
diff
changeset
|
877 |
(defun my-calc-eval-region (arg beg end) |
6889ad2dbd35
Add 'my-calc-eval-region' func.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
516
diff
changeset
|
878 |
"Calculate the region and display the result in the echo area. |
6889ad2dbd35
Add 'my-calc-eval-region' func.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
516
diff
changeset
|
879 |
With prefix ARG non-nil, insert the result at the end of region." |
6889ad2dbd35
Add 'my-calc-eval-region' func.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
516
diff
changeset
|
880 |
(interactive "P\nr") |
6889ad2dbd35
Add 'my-calc-eval-region' func.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
516
diff
changeset
|
881 |
(require 'calc) |
6889ad2dbd35
Add 'my-calc-eval-region' func.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
516
diff
changeset
|
882 |
(let* ((expr (buffer-substring-no-properties beg end)) |
6889ad2dbd35
Add 'my-calc-eval-region' func.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
516
diff
changeset
|
883 |
(result (calc-eval expr))) |
6889ad2dbd35
Add 'my-calc-eval-region' func.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
516
diff
changeset
|
884 |
(if (null arg) |
6889ad2dbd35
Add 'my-calc-eval-region' func.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
516
diff
changeset
|
885 |
(message "%s = %s" expr result) |
6889ad2dbd35
Add 'my-calc-eval-region' func.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
516
diff
changeset
|
886 |
(goto-char end) |
6889ad2dbd35
Add 'my-calc-eval-region' func.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
516
diff
changeset
|
887 |
(save-excursion |
6889ad2dbd35
Add 'my-calc-eval-region' func.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
516
diff
changeset
|
888 |
(insert result))))) |
6889ad2dbd35
Add 'my-calc-eval-region' func.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
516
diff
changeset
|
889 |
|
665
9761254a1260
Maintaining the table of contents up-to-date.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
664
diff
changeset
|
890 |
;; ---------------------------------------------------------------- |
666 | 891 |
(message "rst, reStructuredText") |
665
9761254a1260
Maintaining the table of contents up-to-date.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
664
diff
changeset
|
892 |
|
9761254a1260
Maintaining the table of contents up-to-date.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
664
diff
changeset
|
893 |
;; Maintaining the table of contents up-to-date. |
9761254a1260
Maintaining the table of contents up-to-date.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
664
diff
changeset
|
894 |
(add-hook 'rst-adjust-hook 'rst-toc-update) |
9761254a1260
Maintaining the table of contents up-to-date.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
664
diff
changeset
|
895 |
|
689
1b632e2151cc
Fix rst-level-*-face for terminal.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
688
diff
changeset
|
896 |
(unless window-system |
1b632e2151cc
Fix rst-level-*-face for terminal.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
688
diff
changeset
|
897 |
(eval-after-load 'rst |
1b632e2151cc
Fix rst-level-*-face for terminal.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
688
diff
changeset
|
898 |
'(progn |
1b632e2151cc
Fix rst-level-*-face for terminal.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
688
diff
changeset
|
899 |
(custom-set-faces |
1b632e2151cc
Fix rst-level-*-face for terminal.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
688
diff
changeset
|
900 |
'(rst-level-1-face ((t (:background "yellow"))) t) |
1b632e2151cc
Fix rst-level-*-face for terminal.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
688
diff
changeset
|
901 |
'(rst-level-2-face ((t (:background "yellow"))) t) |
1b632e2151cc
Fix rst-level-*-face for terminal.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
688
diff
changeset
|
902 |
'(rst-level-3-face ((t (:background "yellow"))) t) |
1b632e2151cc
Fix rst-level-*-face for terminal.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
688
diff
changeset
|
903 |
'(rst-level-4-face ((t (:background "yellow"))) t) |
1b632e2151cc
Fix rst-level-*-face for terminal.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
688
diff
changeset
|
904 |
'(rst-level-5-face ((t (:background "yellow"))) t) |
1b632e2151cc
Fix rst-level-*-face for terminal.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
688
diff
changeset
|
905 |
'(rst-level-6face ((t (:background "yellow"))) t) |
1b632e2151cc
Fix rst-level-*-face for terminal.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
688
diff
changeset
|
906 |
) ) ) ) |
1b632e2151cc
Fix rst-level-*-face for terminal.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
688
diff
changeset
|
907 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
908 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
909 |
(message "TeX, LaTeX") |
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
910 |
|
0 | 911 |
(setq tex-run-command "initex") |
912 |
||
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
913 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
914 |
(message "AUC TeX") |
0 | 915 |
|
916 |
;(add-hook 'LaTeX-mode-hook 'LaTeX-install-toolbar) |
|
917 |
;; (setq TeX-parse-self t) ; Enable parse on load. |
|
918 |
;; (setq TeX-auto-save t) ; Enable parse on save. |
|
347
ae8ed6d33e90
Dont prompt for master file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
346
diff
changeset
|
919 |
;; Query for master file. If you often use \include or \input, you should make AUCTEX aware of the |
ae8ed6d33e90
Dont prompt for master file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
346
diff
changeset
|
920 |
;; multi-file document structure. |
ae8ed6d33e90
Dont prompt for master file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
346
diff
changeset
|
921 |
(setq-default TeX-master nil) |
0 | 922 |
|
923 |
;(setq TeX-PDF-mode t) |
|
924 |
;(setq TeX-interactive-mode t) |
|
925 |
;(setq TeX-source-specials-mode 1) |
|
926 |
||
927 |
;;; some more menu entries in the command list: |
|
928 |
;;; see tex-mik.el from package auctex: %v is defined in tex-mik.el |
|
929 |
;;; other variables are defined in tex.el from auctex |
|
930 |
;;; the meaning of some auctex-varibles: |
|
931 |
;symbols defined in tex.el and tex-mik.el: |
|
932 |
;%b name slave tex-file %t name master tex-file |
|
933 |
;%d dvi-file %f ps-file |
|
934 |
;%l "latex --src-specials" |
|
935 |
;%n line number %p printcommand %q "lpq" |
|
936 |
;%r (TeX-style-check TeX-print-style) |
|
937 |
;%s master-file-name without extention |
|
938 |
;%v yap command view line |
|
939 |
;(eval-after-load "tex" |
|
940 |
; '(progn |
|
941 |
; (add-to-list 'TeX-command-list |
|
9 | 942 |
; (list "->PS landscape for pdf" |
943 |
; "dvips %d -N0 -Ppdf -G0 -T 297mm,210mm -o %f " |
|
944 |
; 'TeX-run-command nil t)) |
|
0 | 945 |
; (add-to-list 'TeX-command-list |
9 | 946 |
; (list "All Texify run-viewer" |
947 |
; "texify --tex-opt=--src --run-viewer --clean %s.tex" |
|
948 |
; 'TeX-run-command nil t)))) |
|
0 | 949 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
950 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
951 |
(message "reftex") |
461
1639d2540bbd
Set outline-minor for file. Fix section to feet header outline pattern.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
460
diff
changeset
|
952 |
|
1639d2540bbd
Set outline-minor for file. Fix section to feet header outline pattern.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
460
diff
changeset
|
953 |
;; Reftex is included with Emacs 21.1. |
0 | 954 |
|
955 |
;; (autoload 'reftex-mode "reftex" "RefTeX Minor Mode" t) |
|
956 |
;; (autoload 'turn-on-reftex "reftex" "RefTeX Minor Mode" nil) |
|
957 |
;; (autoload 'reftex-citation "reftex-cite" "Make citation" nil) |
|
958 |
;; (autoload 'reftex-index-phrase-mode "reftex-index" "Phrase mode" t) |
|
959 |
;; (add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; with AUCTeX LaTeX mode |
|
960 |
;; (add-hook 'latex-mode-hook 'turn-on-reftex) ; with Emacs latex mode |
|
961 |
||
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
962 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
963 |
(message "PreviewLatex") |
0 | 964 |
|
965 |
;(load "preview-latex.el" nil t t) |
|
966 |
||
967 |
;(add-hook 'LaTeX-mode-hook #'LaTeX-preview-setup) |
|
968 |
;(autoload 'LaTeX-preview-setup "preview") |
|
969 |
||
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
970 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
971 |
(message "Info") |
0 | 972 |
|
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
|
973 |
;; Because of Debian policy documentation covered by FDL license with invariant sections not allowed in packet |
324 | 974 |
;; 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
|
975 |
;; 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
|
976 |
(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
|
977 |
(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
|
978 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
979 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
980 |
(message "man, woman") |
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
981 |
|
156
55aed5f25591
Added customisation for woman.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
143
diff
changeset
|
982 |
(setq woman-use-own-frame nil) |
55aed5f25591
Added customisation for woman.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
143
diff
changeset
|
983 |
(setq woman-fill-frame t) |
55aed5f25591
Added customisation for woman.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
143
diff
changeset
|
984 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
985 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
986 |
(message "comint") |
434
12acc6727bd9
Set comint-eol-on-send.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
433
diff
changeset
|
987 |
|
12acc6727bd9
Set comint-eol-on-send.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
433
diff
changeset
|
988 |
;; If non-nil, add a `/' to completed directories, ` ' to file names. |
12acc6727bd9
Set comint-eol-on-send.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
433
diff
changeset
|
989 |
(setq comint-completion-addsuffix t) |
12acc6727bd9
Set comint-eol-on-send.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
433
diff
changeset
|
990 |
;; Non-nil means go to the end of the line before sending input. |
12acc6727bd9
Set comint-eol-on-send.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
433
diff
changeset
|
991 |
(setq comint-eol-on-send t) |
12acc6727bd9
Set comint-eol-on-send.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
433
diff
changeset
|
992 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
993 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
994 |
(message "spell, ispell, aspell") |
0 | 995 |
|
387
7340a863ae23
Fix spelling settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
385
diff
changeset
|
996 |
;; Settings for spelling done in '.emacs-autogen'. |
0 | 997 |
;(add-hook 'text-mode-hook 'flyspell-mode) |
998 |
;(setq flyspell-default-dictionary "russianw") |
|
999 |
;(setq flyspell-delay '1) |
|
1000 |
||
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
1001 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
691 | 1002 |
(message "dict, dictd, dictionary") |
1003 |
||
1004 |
(when (fboundp 'dict-c5-mode) |
|
1005 |
(add-to-list 'auto-mode-alist '("\\.dict-c5$" . dict-c5-mode)) |
|
1006 |
) |
|
1007 |
||
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
1008 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
588
aa917b11ffef
Initialize remember mode before org-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
587
diff
changeset
|
1009 |
(message "remember-mode") |
aa917b11ffef
Initialize remember mode before org-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
587
diff
changeset
|
1010 |
|
aa917b11ffef
Initialize remember mode before org-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
587
diff
changeset
|
1011 |
(when (>= emacs-major-version 23) |
aa917b11ffef
Initialize remember mode before org-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
587
diff
changeset
|
1012 |
(require 'remember)) |
48
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
1013 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
1014 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
588
aa917b11ffef
Initialize remember mode before org-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
587
diff
changeset
|
1015 |
(message "org-mode, GTD, PIM, organize, todo") |
79
f80cd58e09cb
Use buildin and installed version of org-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
78
diff
changeset
|
1016 |
|
561 | 1017 |
(when (>= emacs-major-version 22) |
589 | 1018 |
(require 'org)) |
108
1559bb79bdd1
Enable org mode for >= emacs22.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
107
diff
changeset
|
1019 |
|
295 | 1020 |
;; XXX org-todo-keywords '((sequence "TODO" "START" "|" "DONE")) for org-version 4.67c |
1021 |
;; XXX (setq org-todo-keywords '("TODO" "START" "DONE")) for org-version 6.05b |
|
615
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1022 |
(when (or (featurep 'org) (featurep 'org-install)) |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1023 |
(add-to-list 'auto-mode-alist '("\\.org$" . org-mode)) |
663
1fdbc6490e16
Use ~/devel/my-devel/gtd for 'org-directory' to allow fetch changes with
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
662
diff
changeset
|
1024 |
(setq org-directory "~/devel/my-devel/gtd") |
615
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1025 |
(setq |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1026 |
org-default-notes-file nil |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1027 |
org-agenda-ndays 31 |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1028 |
org-deadline-warning-days 7 |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1029 |
org-agenda-show-all-dates t |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1030 |
org-agenda-format-date "%Y-%m-%d, %A %e %B" |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1031 |
org-agenda-skip-deadline-if-done t |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1032 |
org-agenda-skip-scheduled-if-done t |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1033 |
org-agenda-start-on-weekday nil |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1034 |
org-reverse-note-order t |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1035 |
org-hide-leading-stars t |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1036 |
org-tags-column 64 |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1037 |
) |
663
1fdbc6490e16
Use ~/devel/my-devel/gtd for 'org-directory' to allow fetch changes with
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
662
diff
changeset
|
1038 |
(setq my-org-agenda-todo-file (concat org-directory "/TODO.org")) |
1fdbc6490e16
Use ~/devel/my-devel/gtd for 'org-directory' to allow fetch changes with
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
662
diff
changeset
|
1039 |
(setq my-org-agenda-note-file (concat org-directory "/NOTE.org")) |
615
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1040 |
(setq org-agenda-files `(,my-org-agenda-todo-file ,my-org-agenda-note-file)) |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1041 |
(define-key global-map "\C-ca" 'org-agenda) |
722
7d43d5ae86fe
Use "*scratch*" as temp buffer.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
721
diff
changeset
|
1042 |
(define-key global-map "\C-ce" (lambda nil (interactive) (find-file my-org-agenda-note-file))) |
616
c8a07683bc57
I expect that these bindings work in all mode, Org mode use own, so redefine.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
615
diff
changeset
|
1043 |
;; I expect that these bindings work in all mode, Org mode use own, so redefine: |
c8a07683bc57
I expect that these bindings work in all mode, Org mode use own, so redefine.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
615
diff
changeset
|
1044 |
(define-key org-mode-map [C-S-right] 'forward-word-mark) |
c8a07683bc57
I expect that these bindings work in all mode, Org mode use own, so redefine.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
615
diff
changeset
|
1045 |
(define-key org-mode-map [C-S-left] 'backward-word-mark) |
c8a07683bc57
I expect that these bindings work in all mode, Org mode use own, so redefine.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
615
diff
changeset
|
1046 |
(define-key org-mode-map [S-up] 'previous-line-mark) |
c8a07683bc57
I expect that these bindings work in all mode, Org mode use own, so redefine.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
615
diff
changeset
|
1047 |
(define-key org-mode-map [S-down] 'next-line-mark) |
589 | 1048 |
|
671
c8f7a49f06a9
My tags for remember buffer.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
670
diff
changeset
|
1049 |
;; My tags for remember buffer. |
c8f7a49f06a9
My tags for remember buffer.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
670
diff
changeset
|
1050 |
(setq org-tag-persistent-alist |
c8f7a49f06a9
My tags for remember buffer.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
670
diff
changeset
|
1051 |
'( |
c8f7a49f06a9
My tags for remember buffer.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
670
diff
changeset
|
1052 |
("ADMIN" . ?a) |
c8f7a49f06a9
My tags for remember buffer.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
670
diff
changeset
|
1053 |
("BLOG" . ?b) |
c8f7a49f06a9
My tags for remember buffer.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
670
diff
changeset
|
1054 |
("DEVEL" . ?d) |
c8f7a49f06a9
My tags for remember buffer.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
670
diff
changeset
|
1055 |
("LIFE" . ?l) |
c8f7a49f06a9
My tags for remember buffer.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
670
diff
changeset
|
1056 |
("MISC" . ?m) |
c8f7a49f06a9
My tags for remember buffer.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
670
diff
changeset
|
1057 |
("JOB" . ?j) |
c8f7a49f06a9
My tags for remember buffer.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
670
diff
changeset
|
1058 |
("PROJECT" . ?p) |
c8f7a49f06a9
My tags for remember buffer.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
670
diff
changeset
|
1059 |
("READ" . ?r) |
687
54a77c8a091a
Add item to org-tag-persistent-alist.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
682
diff
changeset
|
1060 |
("SEE" . ?s) |
671
c8f7a49f06a9
My tags for remember buffer.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
670
diff
changeset
|
1061 |
)) |
c8f7a49f06a9
My tags for remember buffer.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
670
diff
changeset
|
1062 |
|
615
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1063 |
(when (or (featurep 'remember) (fboundp 'remember)) |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1064 |
(setq remember-annotation-functions '(org-remember-annotation)) |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1065 |
(setq remember-handler-functions '(org-remember-handler)) |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1066 |
(add-hook 'remember-mode-hook 'org-remember-apply-template) |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1067 |
(define-key global-map "\C-cr" 'org-remember) |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1068 |
(setq org-remember-templates |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1069 |
;; With one item org-mode do not prompt choose template. |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1070 |
`( |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1071 |
("todo" ?t "* TODO %?" ,my-org-agenda-todo-file) |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1072 |
;; ("note" ?n "* %?\n" ,my-org-agenda-note-file) |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1073 |
)) |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1074 |
(setq org-remember-store-without-prompt t) |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1075 |
(org-remember-insinuate) |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1076 |
) |
589 | 1077 |
|
615
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1078 |
;; (setq org-todo-keyword-faces |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1079 |
;; '(("TODO" . (:foreground "red" :weight bold)) |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1080 |
;; ("WAIT" . (:foreground "orange" :weight bold)) |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1081 |
;; ("DONE" . (:foreground "green" :weight bold))) ) |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1082 |
) |
48
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
1083 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
1084 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
1085 |
(message "TODO, XXX, FIXME highlight") |
48
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
1086 |
;; Show blanks and FIXME |
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
1087 |
;; 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
|
1088 |
|
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
1089 |
(defface my-tab-face |
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
1090 |
'((t :background "gray")) |
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
1091 |
"Face for showing TABs." |
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
1092 |
:group 'basic-faces) |
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
1093 |
|
465
0a9cbfab10f4
Moved highlight pattern from hook to mode highlighting list.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
463
diff
changeset
|
1094 |
(defface my-contrasty-face |
48
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
1095 |
'((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
|
1096 |
"Font for showing conflicts." |
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
1097 |
:group 'basic-faces) |
5aa6729514f6
Add customize for org mode. Place todo higlight вместе с org mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
47
diff
changeset
|
1098 |
|
682
c80875ec8ad3
Remove text modes from devel mode list as it can not supprt imenu.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
681
diff
changeset
|
1099 |
(dolist (mode (append my-devel-mode-list my-text-mode-list)) |
465
0a9cbfab10f4
Moved highlight pattern from hook to mode highlighting list.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
463
diff
changeset
|
1100 |
(font-lock-add-keywords |
0a9cbfab10f4
Moved highlight pattern from hook to mode highlighting list.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
463
diff
changeset
|
1101 |
mode |
600
5a67b40de30d
Add some TODO keywords.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
599
diff
changeset
|
1102 |
`( |
465
0a9cbfab10f4
Moved highlight pattern from hook to mode highlighting list.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
463
diff
changeset
|
1103 |
("\t+" 0 'my-tab-face t) |
600
5a67b40de30d
Add some TODO keywords.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
599
diff
changeset
|
1104 |
( ,(concat "\\<\\(" (regexp-opt '("TODO" "FIX" "FIXME" "HACK" "XXX")) ":?\\)\\>") 1 'font-lock-warning-face t) |
478 | 1105 |
("\\(=\\|<\\|>\\)\\{7,\\}" 0 'my-contrasty-face t) |
465
0a9cbfab10f4
Moved highlight pattern from hook to mode highlighting list.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
463
diff
changeset
|
1106 |
;; 64 times, for highlight C-u C-u C-u <key> |
467 | 1107 |
("\\([^[:space:]]\\)\\1\\{63\\}" 0 'my-contrasty-face t) |
465
0a9cbfab10f4
Moved highlight pattern from hook to mode highlighting list.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
463
diff
changeset
|
1108 |
)) |
0a9cbfab10f4
Moved highlight pattern from hook to mode highlighting list.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
463
diff
changeset
|
1109 |
) |
284
bf5829d9bbf7
Another way to register TODO highlighting.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
280
diff
changeset
|
1110 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
1111 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
660
7abcc3f39fe9
Set basic mail settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
658
diff
changeset
|
1112 |
(message "fortune") |
7abcc3f39fe9
Set basic mail settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
658
diff
changeset
|
1113 |
(setq fortune-file "~/XXX") |
7abcc3f39fe9
Set basic mail settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
658
diff
changeset
|
1114 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
1115 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
660
7abcc3f39fe9
Set basic mail settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
658
diff
changeset
|
1116 |
(message "mail, mh-e") |
7abcc3f39fe9
Set basic mail settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
658
diff
changeset
|
1117 |
|
7abcc3f39fe9
Set basic mail settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
658
diff
changeset
|
1118 |
(setq mail-signature t) |
7abcc3f39fe9
Set basic mail settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
658
diff
changeset
|
1119 |
(setq mail-signature-file "~/.signature") |
7abcc3f39fe9
Set basic mail settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
658
diff
changeset
|
1120 |
;; (add-hook 'mail-setup-hook 'fortune-to-signature) |
7abcc3f39fe9
Set basic mail settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
658
diff
changeset
|
1121 |
|
7abcc3f39fe9
Set basic mail settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
658
diff
changeset
|
1122 |
;; (setq mail-user-agent 'mh-e-user-agent) |
83
d2eaf2ed6d1c
Added basic jabber customization.
gavenkoa@gavenko.bifit.int
parents:
82
diff
changeset
|
1123 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
1124 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
1125 |
(message "jabber") |
83
d2eaf2ed6d1c
Added basic jabber customization.
gavenkoa@gavenko.bifit.int
parents:
82
diff
changeset
|
1126 |
|
675
7bef62461084
Try enable modes to avoid do this explicitly in '.emacs-pre'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
674
diff
changeset
|
1127 |
(autoload 'jabber-connect-all "jabber") |
7bef62461084
Try enable modes to avoid do this explicitly in '.emacs-pre'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
674
diff
changeset
|
1128 |
|
7bef62461084
Try enable modes to avoid do this explicitly in '.emacs-pre'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
674
diff
changeset
|
1129 |
(setq |
7bef62461084
Try enable modes to avoid do this explicitly in '.emacs-pre'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
674
diff
changeset
|
1130 |
jabber-history-enabled t |
7bef62461084
Try enable modes to avoid do this explicitly in '.emacs-pre'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
674
diff
changeset
|
1131 |
jabber-use-global-history nil |
7bef62461084
Try enable modes to avoid do this explicitly in '.emacs-pre'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
674
diff
changeset
|
1132 |
jabber-backlog-number 40 |
7bef62461084
Try enable modes to avoid do this explicitly in '.emacs-pre'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
674
diff
changeset
|
1133 |
jabber-backlog-days 30 |
7bef62461084
Try enable modes to avoid do this explicitly in '.emacs-pre'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
674
diff
changeset
|
1134 |
jabber-alert-presence-message-function (lambda (who oldstatus newstatus statustext) nil) |
7bef62461084
Try enable modes to avoid do this explicitly in '.emacs-pre'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
674
diff
changeset
|
1135 |
) |
7bef62461084
Try enable modes to avoid do this explicitly in '.emacs-pre'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
674
diff
changeset
|
1136 |
|
7bef62461084
Try enable modes to avoid do this explicitly in '.emacs-pre'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
674
diff
changeset
|
1137 |
(eval-after-load 'jabber |
7bef62461084
Try enable modes to avoid do this explicitly in '.emacs-pre'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
674
diff
changeset
|
1138 |
'(progn |
7bef62461084
Try enable modes to avoid do this explicitly in '.emacs-pre'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
674
diff
changeset
|
1139 |
;; Redefine standard binding for sending message form RET to C-RET. |
7bef62461084
Try enable modes to avoid do this explicitly in '.emacs-pre'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
674
diff
changeset
|
1140 |
(define-key jabber-chat-mode-map (kbd "RET") 'newline) |
7bef62461084
Try enable modes to avoid do this explicitly in '.emacs-pre'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
674
diff
changeset
|
1141 |
(define-key jabber-chat-mode-map [C-return] 'jabber-chat-buffer-send) |
7bef62461084
Try enable modes to avoid do this explicitly in '.emacs-pre'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
674
diff
changeset
|
1142 |
;; fsm used in emacs jabber |
7bef62461084
Try enable modes to avoid do this explicitly in '.emacs-pre'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
674
diff
changeset
|
1143 |
(when (featurep 'fsm) |
7bef62461084
Try enable modes to avoid do this explicitly in '.emacs-pre'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
674
diff
changeset
|
1144 |
(setq fsm-debug nil) ; Disable *fsm-debug* buffer. |
7bef62461084
Try enable modes to avoid do this explicitly in '.emacs-pre'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
674
diff
changeset
|
1145 |
) |
7bef62461084
Try enable modes to avoid do this explicitly in '.emacs-pre'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
674
diff
changeset
|
1146 |
;; Handle Emacs exit. |
7bef62461084
Try enable modes to avoid do this explicitly in '.emacs-pre'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
674
diff
changeset
|
1147 |
(add-hook 'kill-emacs-hook 'jabber-disconnect) |
7bef62461084
Try enable modes to avoid do this explicitly in '.emacs-pre'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
674
diff
changeset
|
1148 |
)) |
83
d2eaf2ed6d1c
Added basic jabber customization.
gavenkoa@gavenko.bifit.int
parents:
82
diff
changeset
|
1149 |
|
214
f4234e15d891
Fix prompt format (prompt and text stay on two line, not one).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
211
diff
changeset
|
1150 |
(setq my-chat-prompt "[%t] %n>\n") |
675
7bef62461084
Try enable modes to avoid do this explicitly in '.emacs-pre'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
674
diff
changeset
|
1151 |
(setq |
7bef62461084
Try enable modes to avoid do this explicitly in '.emacs-pre'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
674
diff
changeset
|
1152 |
jabber-chat-foreign-prompt-format my-chat-prompt |
7bef62461084
Try enable modes to avoid do this explicitly in '.emacs-pre'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
674
diff
changeset
|
1153 |
jabber-chat-local-prompt-format my-chat-prompt |
7bef62461084
Try enable modes to avoid do this explicitly in '.emacs-pre'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
674
diff
changeset
|
1154 |
jabber-groupchat-prompt-format my-chat-prompt |
7bef62461084
Try enable modes to avoid do this explicitly in '.emacs-pre'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
674
diff
changeset
|
1155 |
jabber-muc-private-foreign-prompt-format "[%t] %g/%n>\n" |
7bef62461084
Try enable modes to avoid do this explicitly in '.emacs-pre'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
674
diff
changeset
|
1156 |
) |
214
f4234e15d891
Fix prompt format (prompt and text stay on two line, not one).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
211
diff
changeset
|
1157 |
|
675
7bef62461084
Try enable modes to avoid do this explicitly in '.emacs-pre'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
674
diff
changeset
|
1158 |
(let ( (mgs-list '("Я тутачки, а где Вы меня ожидали?" |
7bef62461084
Try enable modes to avoid do this explicitly in '.emacs-pre'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
674
diff
changeset
|
1159 |
"Software Development == Church Development. Step 1. Build it. Step 2. Pray." |
680 | 1160 |
"Great books aren't written – they're rewritten." |
675
7bef62461084
Try enable modes to avoid do this explicitly in '.emacs-pre'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
674
diff
changeset
|
1161 |
"А любит Б, Б любит С, что делать A? Найти другую Б!")) ) |
7bef62461084
Try enable modes to avoid do this explicitly in '.emacs-pre'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
674
diff
changeset
|
1162 |
(random t) |
7bef62461084
Try enable modes to avoid do this explicitly in '.emacs-pre'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
674
diff
changeset
|
1163 |
(setq jabber-default-show (nth (random (length mgs-list)) mgs-list)) |
7bef62461084
Try enable modes to avoid do this explicitly in '.emacs-pre'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
674
diff
changeset
|
1164 |
(setq jabber-default-status (nth (random (length mgs-list)) mgs-list)) |
182
8a8bf4f3e7c2
Correctly set fsm var.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
181
diff
changeset
|
1165 |
) |
83
d2eaf2ed6d1c
Added basic jabber customization.
gavenkoa@gavenko.bifit.int
parents:
82
diff
changeset
|
1166 |
|
516
efa00a6ef34e
Allow send message to multiply users.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
515
diff
changeset
|
1167 |
(defvar my-jabber-users nil |
533
15b63e0cc424
Document some settings from .emacs-pre/-post.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
532
diff
changeset
|
1168 |
"Assoc list of jabber user group. Keys are strings, values are lists of JIDs.") |
516
efa00a6ef34e
Allow send message to multiply users.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
515
diff
changeset
|
1169 |
|
efa00a6ef34e
Allow send message to multiply users.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
515
diff
changeset
|
1170 |
(defun my-jabber-send (group) |
efa00a6ef34e
Allow send message to multiply users.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
515
diff
changeset
|
1171 |
"GROUP is keys from `my-jabber-users'" |
efa00a6ef34e
Allow send message to multiply users.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
515
diff
changeset
|
1172 |
(interactive |
efa00a6ef34e
Allow send message to multiply users.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
515
diff
changeset
|
1173 |
(list (completing-read "Select group: " my-jabber-users)) |
efa00a6ef34e
Allow send message to multiply users.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
515
diff
changeset
|
1174 |
) |
efa00a6ef34e
Allow send message to multiply users.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
515
diff
changeset
|
1175 |
(let ( |
efa00a6ef34e
Allow send message to multiply users.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
515
diff
changeset
|
1176 |
(msg (if (use-region-p) |
efa00a6ef34e
Allow send message to multiply users.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
515
diff
changeset
|
1177 |
(buffer-substring (region-beginning) (region-end)) |
efa00a6ef34e
Allow send message to multiply users.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
515
diff
changeset
|
1178 |
(buffer-string))) |
efa00a6ef34e
Allow send message to multiply users.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
515
diff
changeset
|
1179 |
(jc (jabber-read-account)) |
efa00a6ef34e
Allow send message to multiply users.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
515
diff
changeset
|
1180 |
) |
efa00a6ef34e
Allow send message to multiply users.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
515
diff
changeset
|
1181 |
(deactivate-mark) |
efa00a6ef34e
Allow send message to multiply users.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
515
diff
changeset
|
1182 |
(mapc |
efa00a6ef34e
Allow send message to multiply users.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
515
diff
changeset
|
1183 |
(lambda (user) |
efa00a6ef34e
Allow send message to multiply users.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
515
diff
changeset
|
1184 |
(jabber-send-message jc user "" msg "normal") |
efa00a6ef34e
Allow send message to multiply users.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
515
diff
changeset
|
1185 |
) |
efa00a6ef34e
Allow send message to multiply users.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
515
diff
changeset
|
1186 |
(cdr (assoc group my-jabber-users)) |
efa00a6ef34e
Allow send message to multiply users.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
515
diff
changeset
|
1187 |
) |
efa00a6ef34e
Allow send message to multiply users.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
515
diff
changeset
|
1188 |
) |
efa00a6ef34e
Allow send message to multiply users.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
515
diff
changeset
|
1189 |
) |
efa00a6ef34e
Allow send message to multiply users.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
515
diff
changeset
|
1190 |
|
efa00a6ef34e
Allow send message to multiply users.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
515
diff
changeset
|
1191 |
(global-set-key (kbd "C-x C-j C-s") 'my-jabber-send) |
efa00a6ef34e
Allow send message to multiply users.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
515
diff
changeset
|
1192 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
1193 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
1194 |
(message "rcirc") |
142
adfc0c678483
Basic customisation for rcirc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
141
diff
changeset
|
1195 |
|
adfc0c678483
Basic customisation for rcirc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
141
diff
changeset
|
1196 |
;; Turn on logging everything to a special buffer, for debugging. |
adfc0c678483
Basic customisation for rcirc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
141
diff
changeset
|
1197 |
;; (setq rcirc-debug-flag t) |
adfc0c678483
Basic customisation for rcirc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
141
diff
changeset
|
1198 |
|
adfc0c678483
Basic customisation for rcirc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
141
diff
changeset
|
1199 |
(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
|
1200 |
(setq rcirc-time-format "%H:%M ") |
adfc0c678483
Basic customisation for rcirc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
141
diff
changeset
|
1201 |
(defun rcirc-handler-301 (process cmd sender args) |
adfc0c678483
Basic customisation for rcirc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
141
diff
changeset
|
1202 |
"/away message handler.") |
adfc0c678483
Basic customisation for rcirc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
141
diff
changeset
|
1203 |
|
532
a77d1bbd676c
Set conection/login info for rcirc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
531
diff
changeset
|
1204 |
(setq rcirc-default-server "irc.freenode.net") |
a77d1bbd676c
Set conection/login info for rcirc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
531
diff
changeset
|
1205 |
(setq rcirc-default-port 6667) |
a77d1bbd676c
Set conection/login info for rcirc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
531
diff
changeset
|
1206 |
(setq rcirc-default-nick user-nick) |
a77d1bbd676c
Set conection/login info for rcirc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
531
diff
changeset
|
1207 |
(setq rcirc-default-user-full-name user-full-name) |
a77d1bbd676c
Set conection/login info for rcirc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
531
diff
changeset
|
1208 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
1209 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
1210 |
(message "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
|
1211 |
|
639 | 1212 |
;; (add-to-list 'erc-modules 'notify) |
1213 |
;; (setq erc-notify-list '("")) |
|
1214 |
||
377
3e8792ee03cc
Take off noise message from erc in notify.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
376
diff
changeset
|
1215 |
;; Take off noise message. |
3e8792ee03cc
Take off noise message from erc in notify.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
376
diff
changeset
|
1216 |
(setq erc-track-exclude-types '("JOIN" "PART" "QUIT" "NICK" "MODE")) |
3e8792ee03cc
Take off noise message from erc in notify.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
376
diff
changeset
|
1217 |
|
3e8792ee03cc
Take off noise message from erc in notify.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
376
diff
changeset
|
1218 |
(setq erc-current-nick-highlight-type 'nick-or-keyword) |
3e8792ee03cc
Take off noise message from erc in notify.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
376
diff
changeset
|
1219 |
(setq erc-track-use-faces t) |
3e8792ee03cc
Take off noise message from erc in notify.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
376
diff
changeset
|
1220 |
|
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
|
1221 |
(setq erc-server-coding-system 'utf-8) |
634
97785d982806
erc-encoding-coding-alist, erc-autojoin-channels-alist
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
632
diff
changeset
|
1222 |
(setq erc-encoding-coding-alist |
97785d982806
erc-encoding-coding-alist, erc-autojoin-channels-alist
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
632
diff
changeset
|
1223 |
'( |
97785d982806
erc-encoding-coding-alist, erc-autojoin-channels-alist
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
632
diff
changeset
|
1224 |
("^icq-" . cp1251) |
97785d982806
erc-encoding-coding-alist, erc-autojoin-channels-alist
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
632
diff
changeset
|
1225 |
)) |
97785d982806
erc-encoding-coding-alist, erc-autojoin-channels-alist
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
632
diff
changeset
|
1226 |
|
97785d982806
erc-encoding-coding-alist, erc-autojoin-channels-alist
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
632
diff
changeset
|
1227 |
(setq erc-autojoin-channels-alist '(("freenode.net" "#emacs"))) |
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
|
1228 |
|
637
f4806bc22860
Enable reconnect facility for ERC.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
636
diff
changeset
|
1229 |
(setq |
f4806bc22860
Enable reconnect facility for ERC.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
636
diff
changeset
|
1230 |
erc-server-auto-reconnect t |
f4806bc22860
Enable reconnect facility for ERC.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
636
diff
changeset
|
1231 |
erc-server-reconnect-timeout 60 |
f4806bc22860
Enable reconnect facility for ERC.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
636
diff
changeset
|
1232 |
erc-server-reconnect-attempts 2 |
f4806bc22860
Enable reconnect facility for ERC.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
636
diff
changeset
|
1233 |
) |
f4806bc22860
Enable reconnect facility for ERC.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
636
diff
changeset
|
1234 |
|
636
1c47e3a86feb
Add commented settings for remember.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
635
diff
changeset
|
1235 |
;; Kill buffers for channels after /part |
1c47e3a86feb
Add commented settings for remember.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
635
diff
changeset
|
1236 |
;; (setq erc-kill-buffer-on-part t) |
1c47e3a86feb
Add commented settings for remember.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
635
diff
changeset
|
1237 |
;; Kill buffers for private queries after quitting the server |
1c47e3a86feb
Add commented settings for remember.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
635
diff
changeset
|
1238 |
;; (setq erc-kill-queries-on-quit t) |
1c47e3a86feb
Add commented settings for remember.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
635
diff
changeset
|
1239 |
;; Kill buffers for server messages after quitting the server |
1c47e3a86feb
Add commented settings for remember.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
635
diff
changeset
|
1240 |
;; (setq erc-kill-server-buffer-on-quit t) |
1c47e3a86feb
Add commented settings for remember.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
635
diff
changeset
|
1241 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
1242 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
648
6486ccef8fd1
`-b' switch to ignore changes in whitespaces.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
647
diff
changeset
|
1243 |
(message "vc-mode, VCS, version control, cvs, svn, mercurial, hg, bazaar, bzr, git, fossil") |
6486ccef8fd1
`-b' switch to ignore changes in whitespaces.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
647
diff
changeset
|
1244 |
|
6486ccef8fd1
`-b' switch to ignore changes in whitespaces.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
647
diff
changeset
|
1245 |
;; `-b' switch to ignore changes in whitespaces. |
6486ccef8fd1
`-b' switch to ignore changes in whitespaces.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
647
diff
changeset
|
1246 |
;; (setq vc-git-diff-switches "-b") |
6486ccef8fd1
`-b' switch to ignore changes in whitespaces.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
647
diff
changeset
|
1247 |
;; (setq vc-diff-switches "-b") |
0 | 1248 |
|
615
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1249 |
(when (equal window-system 'w32) |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1250 |
(modify-coding-system-alist 'process "cvs" '(cp1251-dos . cp1251-dos)) |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1251 |
(modify-coding-system-alist 'process "svn" '(cp1251 . cp1251)) |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1252 |
(setq vc-svn-checkin-switches '("--encoding" "UTF-8")) |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1253 |
) |
0 | 1254 |
|
615
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1255 |
(when window-system |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1256 |
(setq |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1257 |
vc-annotate-very-old-color "#0b5b20" |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1258 |
vc-annotate-background "white" |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1259 |
vc-annotate-color-map |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1260 |
'( |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1261 |
(20 . "#EE0000") |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1262 |
(40 . "#E0800D") |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1263 |
(60 . "#D3001A") |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1264 |
(80 . "#C68027") |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1265 |
(100 . "#B90034") |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1266 |
(120 . "#AB8042") |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1267 |
(140 . "#9E004F") |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1268 |
(160 . "#91805C") |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1269 |
(180 . "#840069") |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1270 |
(200 . "#778077") |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1271 |
(220 . "#690084") |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1272 |
(240 . "#5C8091") |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1273 |
(260 . "#4F009E") |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1274 |
(280 . "#4280AB") |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1275 |
(300 . "#3400B9") |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1276 |
(320 . "#2780C6") |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1277 |
(340 . "#1A00D3") |
22cf0c9014d9
Replace '(if COND (progn BODY...))' by '(when COND BODY...)'. Remove
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
614
diff
changeset
|
1278 |
(360 . "#0D80E0"))) |
19
a8e7a6e94341
Теперь белый фон для annotated.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
18
diff
changeset
|
1279 |
) |
a8e7a6e94341
Теперь белый фон для annotated.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
18
diff
changeset
|
1280 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
1281 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
1282 |
(message "psvn") |
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
1283 |
|
197
2abcea5b91db
Added settings for psvn.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
192
diff
changeset
|
1284 |
(setq svn-status-verbose t) |
2abcea5b91db
Added settings for psvn.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
192
diff
changeset
|
1285 |
(setq svn-status-hide-unmodified t) |
2abcea5b91db
Added settings for psvn.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
192
diff
changeset
|
1286 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
1287 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
1288 |
(message "DVC") |
91 | 1289 |
|
1290 |
(when (featurep 'dvc-emacs) |
|
1291 |
(setq dvc-tips-enabled nil) |
|
1292 |
) |
|
1293 |
||
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
1294 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
1295 |
(message "devel, prog, programming") |
0 | 1296 |
|
643
bfb236f0ef44
Show current function name in the mode line.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
642
diff
changeset
|
1297 |
(which-func-mode 1) |
bfb236f0ef44
Show current function name in the mode line.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
642
diff
changeset
|
1298 |
|
0 | 1299 |
(add-to-list 'auto-mode-alist '("\\.cu$" . c-mode)) |
1300 |
||
499
c3390bcde246
C and C++ both use .h extension for headers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
497
diff
changeset
|
1301 |
(defun my-c++-header-file-p () |
c3390bcde246
C and C++ both use .h extension for headers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
497
diff
changeset
|
1302 |
"Return non-nil, if in a C++ header." |
c3390bcde246
C and C++ both use .h extension for headers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
497
diff
changeset
|
1303 |
(and (string-match "\\.h$" |
c3390bcde246
C and C++ both use .h extension for headers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
497
diff
changeset
|
1304 |
(or (buffer-file-name) |
c3390bcde246
C and C++ both use .h extension for headers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
497
diff
changeset
|
1305 |
(buffer-name))) |
c3390bcde246
C and C++ both use .h extension for headers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
497
diff
changeset
|
1306 |
(save-excursion |
c3390bcde246
C and C++ both use .h extension for headers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
497
diff
changeset
|
1307 |
(re-search-forward "\\_<class\\_>" nil t)))) |
c3390bcde246
C and C++ both use .h extension for headers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
497
diff
changeset
|
1308 |
|
613
1e7314bb84bc
Fix loading error for Emacs 21.3.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
612
diff
changeset
|
1309 |
(when (>= emacs-major-version 22) |
1e7314bb84bc
Fix loading error for Emacs 21.3.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
612
diff
changeset
|
1310 |
(add-to-list 'magic-mode-alist '(my-c++-header-file-p . c++-mode)) |
1e7314bb84bc
Fix loading error for Emacs 21.3.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
612
diff
changeset
|
1311 |
) |
499
c3390bcde246
C and C++ both use .h extension for headers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
497
diff
changeset
|
1312 |
|
172
fcea80b465b9
Comment customisation.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
167
diff
changeset
|
1313 |
(setq-default comment-style (quote indent)) |
fcea80b465b9
Comment customisation.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
167
diff
changeset
|
1314 |
(setq-default comment-column 44) |
335
748c6e05fe87
Use common value for fill-column.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
334
diff
changeset
|
1315 |
(setq-default comment-fill-column my-fill-column) |
54 | 1316 |
|
337
17e3c74b7c22
Use variable my-devel-mode-hook-list so easy adds new devel modes in one
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
336
diff
changeset
|
1317 |
(mapc (lambda (hook) (add-hook hook (lambda () (setq fill-column my-fill-column)) )) |
682
c80875ec8ad3
Remove text modes from devel mode list as it can not supprt imenu.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
681
diff
changeset
|
1318 |
(append my-devel-mode-hook-list my-text-mode-hook-list)) |
201
8531f8af6528
Allow long line coment in c/lisp code.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
200
diff
changeset
|
1319 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
1320 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
1321 |
(message "diff, patch, ediff, emerge") |
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
1322 |
|
0 | 1323 |
(setq diff-switches "-u") |
1324 |
||
420
71e5a962381e
Group related settings in one place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
418
diff
changeset
|
1325 |
(setq ediff-diff-options "") |
497
1848e3b1fc00
Set 'ediff-custom-diff-options'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
496
diff
changeset
|
1326 |
(setq ediff-custom-diff-options "-u") |
420
71e5a962381e
Group related settings in one place.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
418
diff
changeset
|
1327 |
|
714
29d5bc4953c6
Use different colors for added and removed lines in diff mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
713
diff
changeset
|
1328 |
(when window-system |
29d5bc4953c6
Use different colors for added and removed lines in diff mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
713
diff
changeset
|
1329 |
(eval-after-load 'diff-mode |
29d5bc4953c6
Use different colors for added and removed lines in diff mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
713
diff
changeset
|
1330 |
'(progn |
29d5bc4953c6
Use different colors for added and removed lines in diff mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
713
diff
changeset
|
1331 |
(set-face-foreground 'diff-added-face "DarkGreen") |
29d5bc4953c6
Use different colors for added and removed lines in diff mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
713
diff
changeset
|
1332 |
(set-face-foreground 'diff-removed-face "DarkRed") |
29d5bc4953c6
Use different colors for added and removed lines in diff mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
713
diff
changeset
|
1333 |
))) |
29d5bc4953c6
Use different colors for added and removed lines in diff mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
713
diff
changeset
|
1334 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
1335 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
1336 |
(message "indenting") |
0 | 1337 |
|
1338 |
(setq standard-indent 4) |
|
1339 |
(setq c-basic-offset 4) |
|
22
8ca8997d9f1d
Определил размер отступа для sh-mode.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
21
diff
changeset
|
1340 |
(setq sh-basic-offset 2) |
0 | 1341 |
(setq sgml-basic-offset 4) |
1342 |
||
1343 |
;; TAB (tab settings) |
|
1344 |
(setq-default tab-width 4) |
|
253
7cb6ff8a9a75
Translate comment to English.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
252
diff
changeset
|
1345 |
(setq-default indent-tabs-mode nil) ; spaces instead of tabs by default |
0 | 1346 |
(setq tab-always-indent t) |
1347 |
(setq c-tab-always-indent t) |
|
188
e36736f245fd
Start tab-stop-list with zero.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
162
diff
changeset
|
1348 |
(let ( (line-width 400) i ) |
e36736f245fd
Start tab-stop-list with zero.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
162
diff
changeset
|
1349 |
(setq i (* (ceiling line-width 4) 4)) |
73
73e42aa11b3c
Correct initial asigned with nil.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
72
diff
changeset
|
1350 |
(setq tab-stop-list nil) |
188
e36736f245fd
Start tab-stop-list with zero.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
162
diff
changeset
|
1351 |
(while (>= i 0) |
e36736f245fd
Start tab-stop-list with zero.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
162
diff
changeset
|
1352 |
(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
|
1353 |
(setq i (- i 4)))) |
0 | 1354 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
1355 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
1356 |
(message "compile") |
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
1357 |
|
647 | 1358 |
;; Prompt for compilation command. |
1359 |
(setq compilation-read-command 1) |
|
638
5bfd6f2d1ae7
Use gmake on FreeBSD.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
637
diff
changeset
|
1360 |
(setq compile-auto-highlight t) |
5bfd6f2d1ae7
Use gmake on FreeBSD.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
637
diff
changeset
|
1361 |
(setq compile-command "make ") |
5bfd6f2d1ae7
Use gmake on FreeBSD.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
637
diff
changeset
|
1362 |
(when (eq system-type 'berkeley-unix) |
5bfd6f2d1ae7
Use gmake on FreeBSD.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
637
diff
changeset
|
1363 |
(setq compile-command "gmake ")) |
646 | 1364 |
;; With '1' compilation window shall scroll down, with `first-error' stops scrolling at the first error. |
0 | 1365 |
(setq compilation-scroll-output 1) |
684
f0604e71f261
compilation-ask-about-save
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
683
diff
changeset
|
1366 |
(setq compilation-ask-about-save t) |
0 | 1367 |
|
577
d24848aec7d1
Show error in EN locale to easy search how fix problem in docs and Internet.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
564
diff
changeset
|
1368 |
;; Show error in EN locale to easy search how fix problem in docs and Internet. |
d24848aec7d1
Show error in EN locale to easy search how fix problem in docs and Internet.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
564
diff
changeset
|
1369 |
(setq compilation-environment '("LANG=C")) |
d24848aec7d1
Show error in EN locale to easy search how fix problem in docs and Internet.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
564
diff
changeset
|
1370 |
|
552
1cdd21e5f0b9
Set compilation-error-regexp-alist after loading 'compile.el'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
551
diff
changeset
|
1371 |
(eval-after-load 'compile |
556
782325bafc4a
Fix 'eval-after-load' usage.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
555
diff
changeset
|
1372 |
'(progn |
782325bafc4a
Fix 'eval-after-load' usage.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
555
diff
changeset
|
1373 |
;; My funny error messages. |
782325bafc4a
Fix 'eval-after-load' usage.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
555
diff
changeset
|
1374 |
(add-to-list 'compilation-error-regexp-alist '("^\\( +\\[csc\\] \\|\\)\\(.*\\)(\\([0-9]*\\),\\([0-9]*\\)):" 2 3 4)) |
782325bafc4a
Fix 'eval-after-load' usage.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
555
diff
changeset
|
1375 |
(add-to-list 'compilation-error-regexp-alist '("^ *\\(.*\\)(\\([0-9]*\\)) +:" 1 2)) |
782325bafc4a
Fix 'eval-after-load' usage.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
555
diff
changeset
|
1376 |
(add-to-list 'compilation-error-regexp-alist '("^\"?\\([^\"]*\\)\"?,\\([0-9]*\\) .*\\[.*\\]: " 1 2)) ; KEIL compiler |
782325bafc4a
Fix 'eval-after-load' usage.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
555
diff
changeset
|
1377 |
(when (boundp 'compilation-mode-font-lock-keywords) |
782325bafc4a
Fix 'eval-after-load' usage.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
555
diff
changeset
|
1378 |
(add-to-list 'compilation-mode-font-lock-keywords '("\\(/[Oo][Uu][Tt]:[^[:blank:]]+\\)" . 1)) |
782325bafc4a
Fix 'eval-after-load' usage.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
555
diff
changeset
|
1379 |
(add-to-list 'compilation-mode-font-lock-keywords '("[[:blank:]]\\(/F[oe][^[:blank:]]+\\)" . 1)) |
782325bafc4a
Fix 'eval-after-load' usage.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
555
diff
changeset
|
1380 |
) |
782325bafc4a
Fix 'eval-after-load' usage.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
555
diff
changeset
|
1381 |
)) |
0 | 1382 |
|
672
ec015b06e121
my-comint-send-string
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
670
diff
changeset
|
1383 |
(defvar my-comint-send-hist-list nil |
ec015b06e121
my-comint-send-string
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
670
diff
changeset
|
1384 |
"History list for `my-comint-send-string'." |
ec015b06e121
my-comint-send-string
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
670
diff
changeset
|
1385 |
) |
ec015b06e121
my-comint-send-string
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
670
diff
changeset
|
1386 |
(defun my-comint-send-string (string) |
704
474a9291a602
Automaticaly append final newline.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
703
diff
changeset
|
1387 |
"Send string to comint buffers. Useful for *compilation* read-only buffer. |
474a9291a602
Automaticaly append final newline.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
703
diff
changeset
|
1388 |
Automaticaly append final newline." |
672
ec015b06e121
my-comint-send-string
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
670
diff
changeset
|
1389 |
(interactive |
ec015b06e121
my-comint-send-string
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
670
diff
changeset
|
1390 |
(list (read-input "Type string: " nil 'my-comint-send-hist-list)) |
ec015b06e121
my-comint-send-string
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
670
diff
changeset
|
1391 |
) |
704
474a9291a602
Automaticaly append final newline.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
703
diff
changeset
|
1392 |
(comint-send-string (get-buffer-process (current-buffer)) (concat string "\n")) |
672
ec015b06e121
my-comint-send-string
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
670
diff
changeset
|
1393 |
) |
674
f3ac6416ef21
Fix: "Symbol's value as variable is void: compilation-mode-map".
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
673
diff
changeset
|
1394 |
(eval-after-load 'compile |
f3ac6416ef21
Fix: "Symbol's value as variable is void: compilation-mode-map".
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
673
diff
changeset
|
1395 |
'(progn |
f3ac6416ef21
Fix: "Symbol's value as variable is void: compilation-mode-map".
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
673
diff
changeset
|
1396 |
(define-key compilation-mode-map [C-return] 'my-comint-send-string) |
f3ac6416ef21
Fix: "Symbol's value as variable is void: compilation-mode-map".
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
673
diff
changeset
|
1397 |
)) |
672
ec015b06e121
my-comint-send-string
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
670
diff
changeset
|
1398 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
1399 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
1400 |
(message "TAGS, etags, ctags, GNU GLOBAL") |
421
44d516f2badd
Enable automatic depth up search for TAGS file when 'etags-table' available.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
420
diff
changeset
|
1401 |
|
529
1d38dfff2664
Add 'etags-select' and 'etags-table' customization.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
528
diff
changeset
|
1402 |
;; One of 'tags-table-list' or 'tags-file-name' control which TAGS files to |
1d38dfff2664
Add 'etags-select' and 'etags-table' customization.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
528
diff
changeset
|
1403 |
;; use. |
1d38dfff2664
Add 'etags-select' and 'etags-table' customization.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
528
diff
changeset
|
1404 |
|
675
7bef62461084
Try enable modes to avoid do this explicitly in '.emacs-pre'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
674
diff
changeset
|
1405 |
(ignore-errors |
7bef62461084
Try enable modes to avoid do this explicitly in '.emacs-pre'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
674
diff
changeset
|
1406 |
(require 'etags-table) |
529
1d38dfff2664
Add 'etags-select' and 'etags-table' customization.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
528
diff
changeset
|
1407 |
(setq etags-table-search-up-depth 8) |
675
7bef62461084
Try enable modes to avoid do this explicitly in '.emacs-pre'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
674
diff
changeset
|
1408 |
(require 'etags-select) |
7bef62461084
Try enable modes to avoid do this explicitly in '.emacs-pre'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
674
diff
changeset
|
1409 |
(global-set-key "\M-." 'etags-select-find-tag) |
421
44d516f2badd
Enable automatic depth up search for TAGS file when 'etags-table' available.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
420
diff
changeset
|
1410 |
) |
44d516f2badd
Enable automatic depth up search for TAGS file when 'etags-table' available.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
420
diff
changeset
|
1411 |
|
675
7bef62461084
Try enable modes to avoid do this explicitly in '.emacs-pre'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
674
diff
changeset
|
1412 |
(setq tags-add-tables t) |
541
3d913b8531f4
Bound 'complete-tag' to M-RET.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
539
diff
changeset
|
1413 |
(global-set-key "\M-\r" 'complete-tag) |
3d913b8531f4
Bound 'complete-tag' to M-RET.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
539
diff
changeset
|
1414 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
1415 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
1416 |
(message "CEDET, semantic") |
422
021017e52754
Enable 'semantic' for Emacs 23.2.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
421
diff
changeset
|
1417 |
|
425
b835c68d20a8
Added more semantic customisation.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
424
diff
changeset
|
1418 |
;; For debug use 'semantic-debug-idle-function' and 'semantic-debug-idle-work-function'. |
454
18ce601cb4fb
Enable CEDET which custom installed.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
453
diff
changeset
|
1419 |
|
18ce601cb4fb
Enable CEDET which custom installed.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
453
diff
changeset
|
1420 |
(unless (featurep 'cedet) |
626 | 1421 |
(when (or |
1422 |
(and (= emacs-major-version 23) (>= emacs-minor-version 2)) |
|
1423 |
(>= emacs-minor-version 24) |
|
1424 |
) |
|
1425 |
(semantic-mode 1) |
|
1426 |
) ) |
|
454
18ce601cb4fb
Enable CEDET which custom installed.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
453
diff
changeset
|
1427 |
|
18ce601cb4fb
Enable CEDET which custom installed.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
453
diff
changeset
|
1428 |
(when (featurep 'cedet) |
458
48aa731d00d8
Always anable ede-mode if semantic present.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
457
diff
changeset
|
1429 |
(global-ede-mode t) |
422
021017e52754
Enable 'semantic' for Emacs 23.2.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
421
diff
changeset
|
1430 |
(global-semantic-idle-summary-mode 1) |
425
b835c68d20a8
Added more semantic customisation.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
424
diff
changeset
|
1431 |
(global-semantic-idle-scheduler-mode 1) |
426
56e15e68d925
Set low idle time to less wait for type info in minibuffer.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
425
diff
changeset
|
1432 |
(setq semantic-idle-scheduler-idle-time 1) ; 1 sec. |
425
b835c68d20a8
Added more semantic customisation.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
424
diff
changeset
|
1433 |
(global-semantic-decoration-mode 1) |
b835c68d20a8
Added more semantic customisation.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
424
diff
changeset
|
1434 |
(global-semantic-mru-bookmark-mode 1) |
b835c68d20a8
Added more semantic customisation.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
424
diff
changeset
|
1435 |
;; (setq semantic-stickyfunc-sticky-classes '(function type variable include package)) |
456
7b13bdbb2d0e
Explicitly disable 'global-semantic-stickyfunc-mode' for manually installed CEDET.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
455
diff
changeset
|
1436 |
(global-semantic-stickyfunc-mode -1) |
7b13bdbb2d0e
Explicitly disable 'global-semantic-stickyfunc-mode' for manually installed CEDET.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
455
diff
changeset
|
1437 |
(global-semantic-idle-completions-mode -1) |
425
b835c68d20a8
Added more semantic customisation.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
424
diff
changeset
|
1438 |
|
466
71d60f805984
Make larger time for heavy idle-scheduler-work.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
465
diff
changeset
|
1439 |
(setq semantic-idle-scheduler-work-idle-time 60) |
71d60f805984
Make larger time for heavy idle-scheduler-work.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
465
diff
changeset
|
1440 |
;; (setq semantic-idle-work-parse-neighboring-files-flag nil) |
71d60f805984
Make larger time for heavy idle-scheduler-work.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
465
diff
changeset
|
1441 |
|
450
53773da85b43
Magic for semantic-add-system-include. Previous not worked.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
443
diff
changeset
|
1442 |
;; semantic-dependency-system-include-path, semantic-customize-system-include-path |
626 | 1443 |
|
1444 |
;; file local project unloaded system recursive |
|
1445 |
(setq-mode-local c-mode semanticdb-find-default-throttle '(file)) |
|
447
fde6ee13fce1
Use '~/.emacs.d/include' as place for headers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
446
diff
changeset
|
1446 |
(add-hook 'c-mode-hook (lambda nil (semantic-add-system-include "~/.emacs.d/include" 'c-mode))) |
fde6ee13fce1
Use '~/.emacs.d/include' as place for headers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
446
diff
changeset
|
1447 |
(add-hook 'c-mode-hook (lambda nil (semantic-add-system-include "~/.emacs.d/include" 'c++-mode))) |
443
8c5d0e026821
Set my path for headers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
442
diff
changeset
|
1448 |
(global-semanticdb-minor-mode 1) |
8c5d0e026821
Set my path for headers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
442
diff
changeset
|
1449 |
|
626 | 1450 |
;; (add-to-list 'ede-locate-setup-options 'ede-locate-idutils) |
1451 |
;; (add-to-list 'ede-locate-setup-options 'ede-locate-global) |
|
1452 |
||
630
2dc36a3fdde6
Temporary disable cedet-global and cedet-idutils as GNU Global and IdUtils may
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
629
diff
changeset
|
1453 |
;; (ignore-errors (require 'cedet-idutils)) |
2dc36a3fdde6
Temporary disable cedet-global and cedet-idutils as GNU Global and IdUtils may
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
629
diff
changeset
|
1454 |
;; (when (ignore-errors (require 'cedet-global)) |
2dc36a3fdde6
Temporary disable cedet-global and cedet-idutils as GNU Global and IdUtils may
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
629
diff
changeset
|
1455 |
;; (semanticdb-enable-gnu-global-databases 'c-mode) |
2dc36a3fdde6
Temporary disable cedet-global and cedet-idutils as GNU Global and IdUtils may
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
629
diff
changeset
|
1456 |
;; (semanticdb-enable-gnu-global-databases 'c++-mode) |
2dc36a3fdde6
Temporary disable cedet-global and cedet-idutils as GNU Global and IdUtils may
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
629
diff
changeset
|
1457 |
;; ) |
470
f859726fcca9
Enable GNU Global and GNU ID utils for EDE.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
469
diff
changeset
|
1458 |
|
442
bf31b8f54b4a
Set funny key binding for analyzer.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
439
diff
changeset
|
1459 |
(global-set-key (kbd "C-c , .") 'semantic-ia-fast-jump) |
bf31b8f54b4a
Set funny key binding for analyzer.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
439
diff
changeset
|
1460 |
(global-set-key (kbd "C-c , d") 'semantic-ia-show-doc) |
bf31b8f54b4a
Set funny key binding for analyzer.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
439
diff
changeset
|
1461 |
(global-set-key (kbd "C-c , D") 'semantic-ia-describe-class) |
459
71e9734f6569
Bind key sequence for semantic-ia-complete-symbol-menu.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
458
diff
changeset
|
1462 |
(global-set-key (kbd "C-c , c") 'semantic-ia-complete-symbol-menu) |
422
021017e52754
Enable 'semantic' for Emacs 23.2.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
421
diff
changeset
|
1463 |
) |
021017e52754
Enable 'semantic' for Emacs 23.2.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
421
diff
changeset
|
1464 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
1465 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
1466 |
(message "imenu") |
428
6e8b3a312262
Allow imenu function if manu-bar-mode disabled (becase in that case
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
427
diff
changeset
|
1467 |
|
652
243f52487da7
Always enable 'imenu'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
650
diff
changeset
|
1468 |
(defun my-imenu-to-menubar () |
243f52487da7
Always enable 'imenu'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
650
diff
changeset
|
1469 |
(imenu-add-menubar-index) |
243f52487da7
Always enable 'imenu'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
650
diff
changeset
|
1470 |
(run-hooks 'menu-bar-update-hook) |
428
6e8b3a312262
Allow imenu function if manu-bar-mode disabled (becase in that case
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
427
diff
changeset
|
1471 |
) |
6e8b3a312262
Allow imenu function if manu-bar-mode disabled (becase in that case
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
427
diff
changeset
|
1472 |
|
652
243f52487da7
Always enable 'imenu'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
650
diff
changeset
|
1473 |
(require 'imenu) |
243f52487da7
Always enable 'imenu'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
650
diff
changeset
|
1474 |
(mapc (lambda (hook) (add-hook hook 'my-imenu-to-menubar)) |
243f52487da7
Always enable 'imenu'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
650
diff
changeset
|
1475 |
my-devel-mode-hook-list) |
243f52487da7
Always enable 'imenu'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
650
diff
changeset
|
1476 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
1477 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
1478 |
(message "windows inf files for driver installin") |
303 | 1479 |
|
288
5009c3f4afef
Windows inf files for installing drivers.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
285
diff
changeset
|
1480 |
(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
|
1481 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
1482 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
1483 |
(message "makefile, make") |
196
154d8ebf534b
Added matches for makefile-gmake-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
192
diff
changeset
|
1484 |
|
154d8ebf534b
Added matches for makefile-gmake-mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
192
diff
changeset
|
1485 |
(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
|
1486 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
1487 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
1488 |
(message "asm, assembler") |
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
1489 |
|
36
4261883ccdb6
Use C-style comment in asm files.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
35
diff
changeset
|
1490 |
;; (setq-default asm-comment-char 59) |
4261883ccdb6
Use C-style comment in asm files.
Oleksander Gavenko <gavenko_a@3g.ua>
parents:
35
diff
changeset
|
1491 |
(add-hook 'asm-mode-hook '(lambda () (setq comment-start "/*") (setq comment-end "*/")) t) |
0 | 1492 |
|
186
8c74e1ac4da1
Added association for IAR asm file.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
185
diff
changeset
|
1493 |
(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
|
1494 |
|
176
69d65b8a0a25
Added example for unset-key.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
175
diff
changeset
|
1495 |
;; (add-hook 'asm-mode-hook '(lambda () (local-unset-key ":"))) |
69d65b8a0a25
Added example for unset-key.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
175
diff
changeset
|
1496 |
;; (add-hook 'asm-mode-hook '(lambda () (local-set-key ":" ":"))) |
69d65b8a0a25
Added example for unset-key.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
175
diff
changeset
|
1497 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
1498 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
1499 |
(message "linker") |
272
f7fba93f4028
Enable file association for myself defined modes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
266
diff
changeset
|
1500 |
|
f7fba93f4028
Enable file association for myself defined modes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
266
diff
changeset
|
1501 |
(when (fboundp 'iar-linker-config-mode) |
f7fba93f4028
Enable file association for myself defined modes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
266
diff
changeset
|
1502 |
(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
|
1503 |
) |
f7fba93f4028
Enable file association for myself defined modes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
266
diff
changeset
|
1504 |
(when (fboundp 'iar4-linker-config-mode) |
f7fba93f4028
Enable file association for myself defined modes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
266
diff
changeset
|
1505 |
(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
|
1506 |
) |
f7fba93f4028
Enable file association for myself defined modes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
266
diff
changeset
|
1507 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
1508 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
602
e8242148f3dd
Enable 'turn-on-eldoc-mode'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
601
diff
changeset
|
1509 |
(message "lisp, elisp") |
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
1510 |
|
0 | 1511 |
(setq list-command-history-max 256) |
1512 |
||
602
e8242148f3dd
Enable 'turn-on-eldoc-mode'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
601
diff
changeset
|
1513 |
(add-hook 'emacs-lisp-mode-hook 'turn-on-eldoc-mode) |
610
9af87adeed3c
Try find variable at point, if fail find function in 'emacs-lisp-mode'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
609
diff
changeset
|
1514 |
|
9af87adeed3c
Try find variable at point, if fail find function in 'emacs-lisp-mode'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
609
diff
changeset
|
1515 |
(defun my-elisp-find-tag () |
9af87adeed3c
Try find variable at point, if fail find function in 'emacs-lisp-mode'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
609
diff
changeset
|
1516 |
(interactive) |
629
f441ee5e03d4
Fix error: my-elisp-find-tag: Symbol's value as variable is void: find-tag-marker-ring
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
628
diff
changeset
|
1517 |
(require 'etags) |
614
41c826f2b24f
Save place from which we jump.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
613
diff
changeset
|
1518 |
(ring-insert find-tag-marker-ring (point-marker)) |
610
9af87adeed3c
Try find variable at point, if fail find function in 'emacs-lisp-mode'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
609
diff
changeset
|
1519 |
(unless (find-variable-at-point) |
9af87adeed3c
Try find variable at point, if fail find function in 'emacs-lisp-mode'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
609
diff
changeset
|
1520 |
(find-function-at-point) |
9af87adeed3c
Try find variable at point, if fail find function in 'emacs-lisp-mode'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
609
diff
changeset
|
1521 |
)) |
603
291a8df0cf97
Goto elisp definition.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
602
diff
changeset
|
1522 |
;; Goto elisp definition. |
610
9af87adeed3c
Try find variable at point, if fail find function in 'emacs-lisp-mode'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
609
diff
changeset
|
1523 |
(define-key emacs-lisp-mode-map (kbd "M-.") 'my-elisp-find-tag) |
602
e8242148f3dd
Enable 'turn-on-eldoc-mode'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
601
diff
changeset
|
1524 |
|
608
9bbdc481172e
http://www.emacswiki.org/emacs/PrettyLambda
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
607
diff
changeset
|
1525 |
;; http://www.emacswiki.org/emacs/PrettyLambda |
9bbdc481172e
http://www.emacswiki.org/emacs/PrettyLambda
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
607
diff
changeset
|
1526 |
(font-lock-add-keywords |
9bbdc481172e
http://www.emacswiki.org/emacs/PrettyLambda
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
607
diff
changeset
|
1527 |
'emacs-lisp-mode |
9bbdc481172e
http://www.emacswiki.org/emacs/PrettyLambda
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
607
diff
changeset
|
1528 |
`( |
9bbdc481172e
http://www.emacswiki.org/emacs/PrettyLambda
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
607
diff
changeset
|
1529 |
("(\\<\\(lambda\\)\\>" |
9bbdc481172e
http://www.emacswiki.org/emacs/PrettyLambda
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
607
diff
changeset
|
1530 |
(1 (progn (compose-region (match-beginning 1) (match-end 1) ,(make-char 'greek-iso8859-7 107)) font-lock-keyword-face)) |
9bbdc481172e
http://www.emacswiki.org/emacs/PrettyLambda
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
607
diff
changeset
|
1531 |
) |
9bbdc481172e
http://www.emacswiki.org/emacs/PrettyLambda
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
607
diff
changeset
|
1532 |
)) |
9bbdc481172e
http://www.emacswiki.org/emacs/PrettyLambda
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
607
diff
changeset
|
1533 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
1534 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
1535 |
(message "C, c-mode, C++, c++-mode") |
173
04b974b118c2
cc-mode customisations.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
172
diff
changeset
|
1536 |
|
645
f5a8fa2c4534
Minor mode that highlights suspicious C and C++ constructions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
644
diff
changeset
|
1537 |
;; Minor mode that highlights suspicious C and C++ constructions. |
f5a8fa2c4534
Minor mode that highlights suspicious C and C++ constructions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
644
diff
changeset
|
1538 |
(cwarn-mode 1) |
f5a8fa2c4534
Minor mode that highlights suspicious C and C++ constructions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
644
diff
changeset
|
1539 |
|
0 | 1540 |
(setq c-echo-syntactic-information-p t) |
710
49635ebf70f1
Move some anonymous hooks to func definition.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
704
diff
changeset
|
1541 |
|
49635ebf70f1
Move some anonymous hooks to func definition.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
704
diff
changeset
|
1542 |
(defun my-c-mode-common-hook () |
49635ebf70f1
Move some anonymous hooks to func definition.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
704
diff
changeset
|
1543 |
;; Automatically inserte newlines after special characters such as brace, comma, semi-colon, and colon. |
711
c124c5e589af
Enable electric new-line. Document auto indent after typing colon.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
710
diff
changeset
|
1544 |
(c-toggle-auto-newline 1) |
710
49635ebf70f1
Move some anonymous hooks to func definition.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
704
diff
changeset
|
1545 |
;; Delete all preceding whitespace by DEL. |
49635ebf70f1
Move some anonymous hooks to func definition.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
704
diff
changeset
|
1546 |
(c-toggle-hungry-state -1) |
711
c124c5e589af
Enable electric new-line. Document auto indent after typing colon.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
710
diff
changeset
|
1547 |
;; Auto indent after typing colon according to `c-hanging-colons-alist'. |
c124c5e589af
Enable electric new-line. Document auto indent after typing colon.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
710
diff
changeset
|
1548 |
(c-toggle-electric-state 1) |
710
49635ebf70f1
Move some anonymous hooks to func definition.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
704
diff
changeset
|
1549 |
) |
49635ebf70f1
Move some anonymous hooks to func definition.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
704
diff
changeset
|
1550 |
(add-hook 'c-mode-common-hook 'my-c-mode-common-hook) |
0 | 1551 |
|
1552 |
(defconst my-c-style |
|
129
23d028bad418
More regular indent.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
128
diff
changeset
|
1553 |
'((c-tab-always-indent . t) |
0 | 1554 |
(c-comment-only-line-offset . 4) |
129
23d028bad418
More regular indent.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
128
diff
changeset
|
1555 |
(c-hanging-braces-alist |
131
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
1556 |
. ( |
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
1557 |
(brace-list-open) |
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
1558 |
(substatement-open after) |
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
1559 |
)) |
129
23d028bad418
More regular indent.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
128
diff
changeset
|
1560 |
(c-hanging-colons-alist |
131
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
1561 |
. ( |
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
1562 |
(access-label after) |
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
1563 |
(case-label after) |
129
23d028bad418
More regular indent.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
128
diff
changeset
|
1564 |
(inher-intro) |
23d028bad418
More regular indent.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
128
diff
changeset
|
1565 |
(label after) |
131
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
1566 |
(member-init-intro before) |
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
1567 |
)) |
129
23d028bad418
More regular indent.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
128
diff
changeset
|
1568 |
(c-cleanup-list |
131
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
1569 |
. ( |
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
1570 |
defun-close-semi |
129
23d028bad418
More regular indent.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
128
diff
changeset
|
1571 |
empty-defun-braces |
131
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
1572 |
scope-operator |
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
1573 |
)) |
129
23d028bad418
More regular indent.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
128
diff
changeset
|
1574 |
(c-offsets-alist |
131
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
1575 |
. ( |
712
b54c2306b184
Set indent level for privdate/public keywords.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
711
diff
changeset
|
1576 |
(access-label . -) |
485
28f82b8f4f46
Set 'arglist-close' to same indent level as 'arglist-intro' and 'arglist-cont-nonempty'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
484
diff
changeset
|
1577 |
(arglist-intro . ++) |
129
23d028bad418
More regular indent.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
128
diff
changeset
|
1578 |
(arglist-cont-nonempty . ++) |
485
28f82b8f4f46
Set 'arglist-close' to same indent level as 'arglist-intro' and 'arglist-cont-nonempty'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
484
diff
changeset
|
1579 |
(arglist-close . ++) |
131
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
1580 |
(block-open . 0) |
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
1581 |
(case-label . 0) |
562
f277076ade00
Don't indent first LEFT CURLY BRACKET on new line of macros.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
561
diff
changeset
|
1582 |
(cpp-define-intro . 0) |
131
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
1583 |
(comment-intro . 0) |
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
1584 |
(func-decl-cont . ++) |
129
23d028bad418
More regular indent.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
128
diff
changeset
|
1585 |
(inexpr-class . 0) |
131
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
1586 |
(inline-open . 0) |
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
1587 |
(knr-argdecl-intro . -) |
129
23d028bad418
More regular indent.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
128
diff
changeset
|
1588 |
(label . 0) |
131
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
1589 |
(statement-block-intro . +) |
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
1590 |
(statement-cont . ++) |
129
23d028bad418
More regular indent.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
128
diff
changeset
|
1591 |
(substatement-open . 0) |
445
17ffd2e22d12
Disable indent on extern C.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
444
diff
changeset
|
1592 |
(inextern-lang . 0) |
131
bd2400a18295
Practice alphabetical order.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
130
diff
changeset
|
1593 |
)) |
0 | 1594 |
(c-echo-syntactic-information-p . t)) |
1595 |
"My C Programming Style") |
|
1596 |
||
710
49635ebf70f1
Move some anonymous hooks to func definition.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
704
diff
changeset
|
1597 |
(defun my-c-mode-style-hook () |
49635ebf70f1
Move some anonymous hooks to func definition.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
704
diff
changeset
|
1598 |
(c-add-style "my" my-c-style t) |
49635ebf70f1
Move some anonymous hooks to func definition.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
704
diff
changeset
|
1599 |
;; If set 'c-default-style' before 'c-add-style' |
49635ebf70f1
Move some anonymous hooks to func definition.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
704
diff
changeset
|
1600 |
;; "Undefined style: my" error occured from 'c-get-style-variables'. |
49635ebf70f1
Move some anonymous hooks to func definition.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
704
diff
changeset
|
1601 |
(setq c-default-style |
49635ebf70f1
Move some anonymous hooks to func definition.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
704
diff
changeset
|
1602 |
'( |
49635ebf70f1
Move some anonymous hooks to func definition.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
704
diff
changeset
|
1603 |
(java-mode . "my") (c-mode . "my") (csharp-mode . "my") (c++-mode . "my") (objc-mode . "my") |
49635ebf70f1
Move some anonymous hooks to func definition.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
704
diff
changeset
|
1604 |
(idl-mode . "my") |
49635ebf70f1
Move some anonymous hooks to func definition.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
704
diff
changeset
|
1605 |
(awk-mode . "awk") |
49635ebf70f1
Move some anonymous hooks to func definition.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
704
diff
changeset
|
1606 |
(other . "my") |
49635ebf70f1
Move some anonymous hooks to func definition.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
704
diff
changeset
|
1607 |
)) |
49635ebf70f1
Move some anonymous hooks to func definition.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
704
diff
changeset
|
1608 |
) |
49635ebf70f1
Move some anonymous hooks to func definition.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
704
diff
changeset
|
1609 |
(add-hook 'c-mode-common-hook 'my-c-mode-style-hook) |
424
188eba7735eb
If set 'c-default-style' before 'c-add-style'
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
423
diff
changeset
|
1610 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
1611 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
703
970915b27f69
Don't send ^M to Python process under Windows as you get error
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
699
diff
changeset
|
1612 |
(message "python") |
970915b27f69
Don't send ^M to Python process under Windows as you get error
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
699
diff
changeset
|
1613 |
|
727
4d38b9e96670
Set 'python-indent' and 'python-continuation-offset'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
724
diff
changeset
|
1614 |
(setq python-indent 4) |
4d38b9e96670
Set 'python-indent' and 'python-continuation-offset'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
724
diff
changeset
|
1615 |
|
703
970915b27f69
Don't send ^M to Python process under Windows as you get error
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
699
diff
changeset
|
1616 |
(when (equal window-system 'w32) |
970915b27f69
Don't send ^M to Python process under Windows as you get error
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
699
diff
changeset
|
1617 |
(add-to-list 'process-coding-system-alist '("python" cp1251-unix . cp1251-unix)) |
970915b27f69
Don't send ^M to Python process under Windows as you get error
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
699
diff
changeset
|
1618 |
) |
970915b27f69
Don't send ^M to Python process under Windows as you get error
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
699
diff
changeset
|
1619 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
1620 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
1621 |
(message "javascript, js") |
508
79bcafd3d45f
As old Emacs have on 'js-mode', use 'javascript-generic-mode'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
507
diff
changeset
|
1622 |
|
657
e8416d2b2f6a
Use c++-mode for JS files because of single char comment highlight but when
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
656
diff
changeset
|
1623 |
;; (if (>= emacs-major-version 23) |
e8416d2b2f6a
Use c++-mode for JS files because of single char comment highlight but when
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
656
diff
changeset
|
1624 |
;; (add-to-list 'auto-mode-alist '("\\.js$" . js-mode)) |
e8416d2b2f6a
Use c++-mode for JS files because of single char comment highlight but when
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
656
diff
changeset
|
1625 |
;; (add-to-list 'auto-mode-alist '("\\.js$" . javascript-generic-mode)) |
e8416d2b2f6a
Use c++-mode for JS files because of single char comment highlight but when
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
656
diff
changeset
|
1626 |
;; ) |
e8416d2b2f6a
Use c++-mode for JS files because of single char comment highlight but when
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
656
diff
changeset
|
1627 |
|
e8416d2b2f6a
Use c++-mode for JS files because of single char comment highlight but when
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
656
diff
changeset
|
1628 |
(setq auto-mode-alist (rassq-delete-all 'js-mode auto-mode-alist)) |
e8416d2b2f6a
Use c++-mode for JS files because of single char comment highlight but when
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
656
diff
changeset
|
1629 |
(add-to-list 'auto-mode-alist '("\\.js$" . c++-mode)) |
0 | 1630 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
1631 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
1632 |
(message "bat file, batch") |
272
f7fba93f4028
Enable file association for myself defined modes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
266
diff
changeset
|
1633 |
|
461
1639d2540bbd
Set outline-minor for file. Fix section to feet header outline pattern.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
460
diff
changeset
|
1634 |
;; loaded from 'generic-x.el' |
1639d2540bbd
Set outline-minor for file. Fix section to feet header outline pattern.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
460
diff
changeset
|
1635 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
1636 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
1637 |
(message "nsis-mode") |
272
f7fba93f4028
Enable file association for myself defined modes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
266
diff
changeset
|
1638 |
|
f7fba93f4028
Enable file association for myself defined modes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
266
diff
changeset
|
1639 |
(when (fboundp 'nsis-mode) |
f7fba93f4028
Enable file association for myself defined modes.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
266
diff
changeset
|
1640 |
(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
|
1641 |
) |
204
4545865a64c3
Move bat file mode code.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
203
diff
changeset
|
1642 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
1643 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
1644 |
(message "csharp, c-sharp") |
204
4545865a64c3
Move bat file mode code.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
203
diff
changeset
|
1645 |
|
0 | 1646 |
(autoload 'csharp-mode "csharp-mode" "Major mode for editing C# code." t) |
1647 |
(add-to-list 'auto-mode-alist '("\\.cs$" . csharp-mode)) |
|
1648 |
||
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
1649 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
1650 |
(message "java") |
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
1651 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
1652 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
1653 |
(message "ECB") |
0 | 1654 |
|
102
25585e240b4a
Move customization from .emacs (custom-set-variables) to .emacs-my. Remove duplication.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
101
diff
changeset
|
1655 |
(setq ecb-tip-of-the-day nil) |
0 | 1656 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
1657 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
1658 |
(message "html") |
104
e921a5d906ca
Use highlighting on sgml modes!
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
1659 |
|
654
f08ea38190d6
html-charref package for converting string from/to HTML charref.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
653
diff
changeset
|
1660 |
(defun html-charref-escape-region (start end) |
628 | 1661 |
(interactive "r") |
1662 |
(save-excursion |
|
1663 |
(save-restriction |
|
1664 |
(narrow-to-region start end) |
|
1665 |
(goto-char (point-min)) |
|
1666 |
(replace-string "&" "&") |
|
1667 |
(goto-char (point-min)) |
|
1668 |
(replace-string "<" "<") |
|
1669 |
(goto-char (point-min)) |
|
1670 |
(replace-string ">" ">") |
|
1671 |
))) |
|
1672 |
||
654
f08ea38190d6
html-charref package for converting string from/to HTML charref.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
653
diff
changeset
|
1673 |
(defun html-charref-from-char (char) |
f08ea38190d6
html-charref package for converting string from/to HTML charref.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
653
diff
changeset
|
1674 |
(format "&#%d;" char) |
f08ea38190d6
html-charref package for converting string from/to HTML charref.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
653
diff
changeset
|
1675 |
) |
f08ea38190d6
html-charref package for converting string from/to HTML charref.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
653
diff
changeset
|
1676 |
|
f08ea38190d6
html-charref package for converting string from/to HTML charref.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
653
diff
changeset
|
1677 |
(defun html-charref-from-string (string) |
f08ea38190d6
html-charref package for converting string from/to HTML charref.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
653
diff
changeset
|
1678 |
(let ((res "")) |
f08ea38190d6
html-charref package for converting string from/to HTML charref.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
653
diff
changeset
|
1679 |
(mapc |
f08ea38190d6
html-charref package for converting string from/to HTML charref.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
653
diff
changeset
|
1680 |
(lambda (char) (setq res (concat res (html-charref-from-char char)))) |
f08ea38190d6
html-charref package for converting string from/to HTML charref.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
653
diff
changeset
|
1681 |
string) |
f08ea38190d6
html-charref package for converting string from/to HTML charref.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
653
diff
changeset
|
1682 |
res |
f08ea38190d6
html-charref package for converting string from/to HTML charref.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
653
diff
changeset
|
1683 |
) ) |
f08ea38190d6
html-charref package for converting string from/to HTML charref.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
653
diff
changeset
|
1684 |
|
f08ea38190d6
html-charref package for converting string from/to HTML charref.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
653
diff
changeset
|
1685 |
(defun html-charref-escape-region2 (begin end &optional prefix) |
f08ea38190d6
html-charref package for converting string from/to HTML charref.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
653
diff
changeset
|
1686 |
(interactive "r\nP") |
f08ea38190d6
html-charref package for converting string from/to HTML charref.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
653
diff
changeset
|
1687 |
(if prefix |
f08ea38190d6
html-charref package for converting string from/to HTML charref.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
653
diff
changeset
|
1688 |
(save-excursion |
f08ea38190d6
html-charref package for converting string from/to HTML charref.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
653
diff
changeset
|
1689 |
(goto-char begin) |
f08ea38190d6
html-charref package for converting string from/to HTML charref.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
653
diff
changeset
|
1690 |
(insert (html-charref-from-string (delete-and-extract-region begin end)))) |
f08ea38190d6
html-charref package for converting string from/to HTML charref.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
653
diff
changeset
|
1691 |
(html-charref-from-string (buffer-substring begin end)) |
f08ea38190d6
html-charref package for converting string from/to HTML charref.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
653
diff
changeset
|
1692 |
)) |
f08ea38190d6
html-charref package for converting string from/to HTML charref.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
653
diff
changeset
|
1693 |
|
f08ea38190d6
html-charref package for converting string from/to HTML charref.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
653
diff
changeset
|
1694 |
(defun html-charref-to-string (html) |
f08ea38190d6
html-charref package for converting string from/to HTML charref.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
653
diff
changeset
|
1695 |
(let ((res "") (pos 0)) |
f08ea38190d6
html-charref package for converting string from/to HTML charref.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
653
diff
changeset
|
1696 |
(while (string-match "&#\\([[:digit:]]+\\);" html pos) |
f08ea38190d6
html-charref package for converting string from/to HTML charref.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
653
diff
changeset
|
1697 |
(setq res (concat res (string (string-to-int (substring html (match-beginning 1) (match-end 1)) 10)))) |
f08ea38190d6
html-charref package for converting string from/to HTML charref.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
653
diff
changeset
|
1698 |
(setq pos (match-end 0)) |
f08ea38190d6
html-charref package for converting string from/to HTML charref.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
653
diff
changeset
|
1699 |
) |
f08ea38190d6
html-charref package for converting string from/to HTML charref.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
653
diff
changeset
|
1700 |
res |
f08ea38190d6
html-charref package for converting string from/to HTML charref.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
653
diff
changeset
|
1701 |
) ) |
f08ea38190d6
html-charref package for converting string from/to HTML charref.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
653
diff
changeset
|
1702 |
|
f08ea38190d6
html-charref package for converting string from/to HTML charref.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
653
diff
changeset
|
1703 |
(defun html-charref-unescape-region (begin end &optional prefix) |
f08ea38190d6
html-charref package for converting string from/to HTML charref.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
653
diff
changeset
|
1704 |
(interactive "r\nP") |
f08ea38190d6
html-charref package for converting string from/to HTML charref.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
653
diff
changeset
|
1705 |
(if prefix |
f08ea38190d6
html-charref package for converting string from/to HTML charref.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
653
diff
changeset
|
1706 |
(save-excursion |
f08ea38190d6
html-charref package for converting string from/to HTML charref.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
653
diff
changeset
|
1707 |
(goto-char begin) |
f08ea38190d6
html-charref package for converting string from/to HTML charref.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
653
diff
changeset
|
1708 |
(insert (html-charref-to-string (delete-and-extract-region begin end)))) |
f08ea38190d6
html-charref package for converting string from/to HTML charref.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
653
diff
changeset
|
1709 |
(html-charref-to-string (buffer-substring begin end)) |
f08ea38190d6
html-charref package for converting string from/to HTML charref.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
653
diff
changeset
|
1710 |
)) |
f08ea38190d6
html-charref package for converting string from/to HTML charref.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
653
diff
changeset
|
1711 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
1712 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
1713 |
(message "nxml") |
520
7e8d77531ecf
Make the complete element be treated as a single markup item.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
514
diff
changeset
|
1714 |
|
7e8d77531ecf
Make the complete element be treated as a single markup item.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
514
diff
changeset
|
1715 |
(setq nxml-sexp-element-flag t) |
522
14a5ff978db7
Set indent for NXML.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
521
diff
changeset
|
1716 |
(setq nxml-child-indent 2) |
14a5ff978db7
Set indent for NXML.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
521
diff
changeset
|
1717 |
(setq nxml-attribute-indent 4) |
104
e921a5d906ca
Use highlighting on sgml modes!
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
1718 |
|
618 | 1719 |
(eval-after-load 'rng-loc |
621
0fdb4051446c
Fix 'eval-after-load' usage.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
620
diff
changeset
|
1720 |
'(add-to-list 'rng-schema-locating-files "~/.emacs.d/rnc/schemas.xml") |
617
5e34660f1a23
Add path to local rnc schemas.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
616
diff
changeset
|
1721 |
) |
5e34660f1a23
Add path to local rnc schemas.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
616
diff
changeset
|
1722 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
1723 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
1724 |
(message "psgml") |
296
e502c69ab80a
Make header name like tags, separated by comma and ended on period.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
295
diff
changeset
|
1725 |
|
698
2a081d4e2e7c
FIX: 'html-tag-alist' is not defined in 'psgml' mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
691
diff
changeset
|
1726 |
(setq my-html-template |
2a081d4e2e7c
FIX: 'html-tag-alist' is not defined in 'psgml' mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
691
diff
changeset
|
1727 |
'("html" |
2a081d4e2e7c
FIX: 'html-tag-alist' is not defined in 'psgml' mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
691
diff
changeset
|
1728 |
(nil |
2a081d4e2e7c
FIX: 'html-tag-alist' is not defined in 'psgml' mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
691
diff
changeset
|
1729 |
"\n<head>" \n |
2a081d4e2e7c
FIX: 'html-tag-alist' is not defined in 'psgml' mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
691
diff
changeset
|
1730 |
"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=" (read-input "Charset: ") "\">" \n |
2a081d4e2e7c
FIX: 'html-tag-alist' is not defined in 'psgml' mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
691
diff
changeset
|
1731 |
"<title>" (setq str (read-input "Title: ")) "</title>\n" |
2a081d4e2e7c
FIX: 'html-tag-alist' is not defined in 'psgml' mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
691
diff
changeset
|
1732 |
"</head>\n" |
2a081d4e2e7c
FIX: 'html-tag-alist' is not defined in 'psgml' mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
691
diff
changeset
|
1733 |
"<body>\n<h1>" str "</h1>" |
2a081d4e2e7c
FIX: 'html-tag-alist' is not defined in 'psgml' mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
691
diff
changeset
|
1734 |
"\n<address>" \n |
2a081d4e2e7c
FIX: 'html-tag-alist' is not defined in 'psgml' mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
691
diff
changeset
|
1735 |
"<a href=\"mailto:" user-mail-address "\">" (user-full-name) "</a>" \n |
2a081d4e2e7c
FIX: 'html-tag-alist' is not defined in 'psgml' mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
691
diff
changeset
|
1736 |
"</address>" \n |
2a081d4e2e7c
FIX: 'html-tag-alist' is not defined in 'psgml' mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
691
diff
changeset
|
1737 |
"</body>\n" |
2a081d4e2e7c
FIX: 'html-tag-alist' is not defined in 'psgml' mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
691
diff
changeset
|
1738 |
)) |
2a081d4e2e7c
FIX: 'html-tag-alist' is not defined in 'psgml' mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
691
diff
changeset
|
1739 |
) |
2a081d4e2e7c
FIX: 'html-tag-alist' is not defined in 'psgml' mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
691
diff
changeset
|
1740 |
|
245 | 1741 |
(setq sgml-set-face t) ; for highlighting in sgml |
670
d10f2e70ff5e
Redefine action to put 'html' tag in sgml-mode (more pretty look).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
669
diff
changeset
|
1742 |
(eval-after-load 'sgml-mode |
d10f2e70ff5e
Redefine action to put 'html' tag in sgml-mode (more pretty look).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
669
diff
changeset
|
1743 |
'(progn |
698
2a081d4e2e7c
FIX: 'html-tag-alist' is not defined in 'psgml' mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
691
diff
changeset
|
1744 |
(unless (featurep 'psgml) |
2a081d4e2e7c
FIX: 'html-tag-alist' is not defined in 'psgml' mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
691
diff
changeset
|
1745 |
(setq html-tag-alist |
2a081d4e2e7c
FIX: 'html-tag-alist' is not defined in 'psgml' mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
691
diff
changeset
|
1746 |
(cons |
2a081d4e2e7c
FIX: 'html-tag-alist' is not defined in 'psgml' mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
691
diff
changeset
|
1747 |
my-html-template |
2a081d4e2e7c
FIX: 'html-tag-alist' is not defined in 'psgml' mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
691
diff
changeset
|
1748 |
(my-filter |
2a081d4e2e7c
FIX: 'html-tag-alist' is not defined in 'psgml' mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
691
diff
changeset
|
1749 |
(lambda (item) (not (equal (car item) "html"))) |
2a081d4e2e7c
FIX: 'html-tag-alist' is not defined in 'psgml' mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
691
diff
changeset
|
1750 |
html-tag-alist))) |
2a081d4e2e7c
FIX: 'html-tag-alist' is not defined in 'psgml' mode.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
691
diff
changeset
|
1751 |
))) |
104
e921a5d906ca
Use highlighting on sgml modes!
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
102
diff
changeset
|
1752 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
1753 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
1754 |
(message "sh, bash") |
438
740efbdc5777
Associate shell-script-mode for .cygport files.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
437
diff
changeset
|
1755 |
|
740efbdc5777
Associate shell-script-mode for .cygport files.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
437
diff
changeset
|
1756 |
(add-to-list 'auto-mode-alist '("\\.cygport\\'" . shell-script-mode)) |
740efbdc5777
Associate shell-script-mode for .cygport files.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
437
diff
changeset
|
1757 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
1758 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
1759 |
(message "printing") |
0 | 1760 |
|
1761 |
;; Use Notepad to print plain text files to the default Windows printer |
|
1762 |
;(setq lpr-command "notepad") |
|
1763 |
;(setq lpr-headers-switches '("/p")) ; \ mis-use these |
|
1764 |
;(setq lpr-switches nil) ; / two variables |
|
9 | 1765 |
;(setq printer-name nil) ; notepad takes the default |
0 | 1766 |
;(setq lpr-printer-switch "/P") ;; run notepad as batch printer |
1767 |
;; |
|
295 | 1768 |
|
461
1639d2540bbd
Set outline-minor for file. Fix section to feet header outline pattern.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
460
diff
changeset
|
1769 |
;; Printing to file. |
295 | 1770 |
|
0 | 1771 |
;(setq printer-name "~/myprint.txt") |
1772 |
;(setq ps-printer-name nil) |
|
1773 |
;(setq ps-print-header nil) |
|
1774 |
||
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
1775 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
1776 |
(message "SQL") |
102
25585e240b4a
Move customization from .emacs (custom-set-variables) to .emacs-my. Remove duplication.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
101
diff
changeset
|
1777 |
|
25585e240b4a
Move customization from .emacs (custom-set-variables) to .emacs-my. Remove duplication.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
101
diff
changeset
|
1778 |
(setq sql-password "") |
0 | 1779 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
1780 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
1781 |
(message "backuping") |
0 | 1782 |
|
75
cd964a1d58b9
Use backup for files.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
74
diff
changeset
|
1783 |
(setq |
328
c770f75a351f
Set make-backup-files.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
327
diff
changeset
|
1784 |
make-backup-files t |
374 | 1785 |
;; In other case (by renaming) you loose original file creation date. |
1786 |
backup-by-copying t |
|
75
cd964a1d58b9
Use backup for files.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
74
diff
changeset
|
1787 |
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
|
1788 |
delete-old-versions t ; delete excess backup versions silently |
75
cd964a1d58b9
Use backup for files.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
74
diff
changeset
|
1789 |
kept-old-versions 1 ; store first original version |
cd964a1d58b9
Use backup for files.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
74
diff
changeset
|
1790 |
kept-new-versions 3 ; store last 3 version |
cd964a1d58b9
Use backup for files.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
74
diff
changeset
|
1791 |
version-control t) ; use versioned backups |
0 | 1792 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
1793 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
1794 |
(message "auto save") |
150 | 1795 |
|
1796 |
(setq auto-save-default t) |
|
1797 |
;; If nil autosave to different than original to buffer file. |
|
1798 |
(setq auto-save-visited-file-name nil) |
|
653
76d35d1516dc
Make auto-save-interval lager.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
652
diff
changeset
|
1799 |
(setq auto-save-interval 300) |
150 | 1800 |
;; Note: if you kill unsaved file auto save file not deleted. |
1801 |
(setq delete-auto-save-files t) |
|
0 | 1802 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
1803 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
657
e8416d2b2f6a
Use c++-mode for JS files because of single char comment highlight but when
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
656
diff
changeset
|
1804 |
;; Save and restore my buffers every time. |
e8416d2b2f6a
Use c++-mode for JS files because of single char comment highlight but when
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
656
diff
changeset
|
1805 |
(setq desktop-dirname "~/.emacs.d") |
e8416d2b2f6a
Use c++-mode for JS files because of single char comment highlight but when
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
656
diff
changeset
|
1806 |
(when (>= emacs-major-version 22) |
e8416d2b2f6a
Use c++-mode for JS files because of single char comment highlight but when
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
656
diff
changeset
|
1807 |
(desktop-save-mode 1) |
e8416d2b2f6a
Use c++-mode for JS files because of single char comment highlight but when
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
656
diff
changeset
|
1808 |
) |
e8416d2b2f6a
Use c++-mode for JS files because of single char comment highlight but when
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
656
diff
changeset
|
1809 |
|
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
1810 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
545
24992bae7599
Use 'message' instead of comment to easy debug where error occurred.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
544
diff
changeset
|
1811 |
(message "User welcome msg") |
0 | 1812 |
|
250
ef1c7269280f
Show different messages on statup.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
249
diff
changeset
|
1813 |
(add-hook 'emacs-startup-hook |
ef1c7269280f
Show different messages on statup.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
249
diff
changeset
|
1814 |
(lambda () |
ef1c7269280f
Show different messages on statup.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
249
diff
changeset
|
1815 |
(let ( (mgs-list '("Welcome to emacs, the thermonuclear editor." |
ef1c7269280f
Show different messages on statup.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
249
diff
changeset
|
1816 |
"You enter to Out Space. Emacs on." |
ef1c7269280f
Show different messages on statup.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
249
diff
changeset
|
1817 |
"Nice day for Emacsing!")) ) |
ef1c7269280f
Show different messages on statup.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
249
diff
changeset
|
1818 |
(message (nth (random (length mgs-list)) mgs-list))))) |
0 | 1819 |
|
548
1bfa0cf51c9c
Set *Messages* buffer 'default-directory' to $HOME.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
547
diff
changeset
|
1820 |
(switch-to-buffer "*Messages*") |
1bfa0cf51c9c
Set *Messages* buffer 'default-directory' to $HOME.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
547
diff
changeset
|
1821 |
(setq default-directory "~/") |
546
083974006b4a
'default-directory' for '*scratch*' buffer. This allow 'eval-buffer' on '.emacs-my'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
545
diff
changeset
|
1822 |
(switch-to-buffer "*scratch*") |
083974006b4a
'default-directory' for '*scratch*' buffer. This allow 'eval-buffer' on '.emacs-my'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
545
diff
changeset
|
1823 |
(setq default-directory "~/") |
083974006b4a
'default-directory' for '*scratch*' buffer. This allow 'eval-buffer' on '.emacs-my'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
545
diff
changeset
|
1824 |
|
461
1639d2540bbd
Set outline-minor for file. Fix section to feet header outline pattern.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
460
diff
changeset
|
1825 |
;;; End loading... |
718
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
1826 |
|
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
1827 |
;; Local variables: |
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
1828 |
;; mode: outline-minor |
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
1829 |
;; outline-regexp: "(message \"" |
19ab21ec7640
Define own outline-regex to easy view file structure.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
717
diff
changeset
|
1830 |
;; End: |