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