merged
authorOleksandr Gavenko <gavenkoa@gmail.com>
Sun, 20 Feb 2011 21:11:26 +0200
changeset 576 259fabfae56e
parent 572 ead98b9f85c3 (diff)
parent 575 d2730823e23f (current diff)
child 578 66918a26149f
merged
.emacs-my
--- a/.emacs-my	Tue Jan 04 23:55:13 2011 +0200
+++ b/.emacs-my	Sun Feb 20 21:11:26 2011 +0200
@@ -10,7 +10,7 @@
 ;; For load order see README.
 
 ;;; ----------------------------------------------------------------
-;;; debugging.
+(message "debugging")
 
 ;; Shut off message buffer by setting nil.
 (setq message-log-max 512)
@@ -18,8 +18,23 @@
 ;; Set the debug option to enable a backtrace when a problem occurs.
 (setq debug-on-error nil)               ; t/nil
 
+;; Get trace when press C-g.
+(setq debug-on-quit nil)                ; t/nil
+
+;; Prevent Emacs from loading 'default.el', which loaded after '.emacs'.
+;; Also '-q' prevent loading your init file.
+(setq inhibit-default-init nil)         ; t/nil
+
 ;;; ----------------------------------------------------------------
-;;; mode groups.
+(message "user info")
+
+(setq user-full-name "Oleksandr Gavenko")
+(setq user-mail-address "gavenkoa@gmail.com")
+(setq user-nick "gavenkoa")
+(setenv "ORGANIZATION" (concat user-full-name " <" user-mail-address  ">"))
+
+;;; ----------------------------------------------------------------
+(message "mode groups")
 
 (defun my-modelist-to-hooklist (modes)
   "Convert list of MODES to list of hooks for these modes."
@@ -69,16 +84,15 @@
   (my-modelist-to-hooklist my-text-mode-list)
   "List of text mode hooks.")
 
-
 ;;; ----------------------------------------------------------------
-;;; appearance.
-
-(setq default-directory "~/")
+(message "appearance")
 
 ;; To maximize frame on full screen, not work with Windows Emacs 21.4.
 ;; And maked different height with Emacs 22.3 and 23.1.
 ;; (setq initial-frame-alist '((fullscreen . fullboth)))
 
+(setq display-buffer-reuse-frames t)
+
 ;; Next code work with Emacs 21.4, 22.3, 23.1.
 (when window-system
   (let (
@@ -162,13 +176,13 @@
 (setq echo-keystrokes 0.2)
 
 ;;; ----------------------------------------------------------------
-;;; silent runing.
+(message "silent runing")
 
 ;; (setq inhibit-splash-screen t) ; nonexist on 21.4.1
 (setq inhibit-startup-message t)
 
 ;;; ----------------------------------------------------------------
-;;; whitespaces.
+(message "whitespaces")
 
 (setq default-indicate-empty-lines t)
 (setq default-indicate-buffer-boundaries 'left)
@@ -181,7 +195,7 @@
 (add-hook 'text-mode-hook (lambda () (setq require-final-newline nil)))
 
 ;;; ----------------------------------------------------------------
-;;; gnu serv, server.
+(message "gnu serv, server")
 
 ;; (load "~/emacs/bin/gnuserv/gnuserv.el")
 ;; (require 'gnuserv)
@@ -198,7 +212,7 @@
 ;; (desktop-read)
 
 ;;; ----------------------------------------------------------------
-;;; standart/general settings.
+(message "standart/general settings")
 
 (if (boundp 'confirm-kill-emacs)
     (setq confirm-kill-emacs 'yes-or-no-p))
@@ -225,6 +239,19 @@
 
 (setq read-quoted-char-radix 16)
 
+(setq standard-display-table (make-display-table))
+(let ( (i ?\x80) hex hi low )
+  (while (<= i ?\xff)
+    (setq hex (format "%x" i))
+    (setq hi (elt hex 0))
+    (setq low (elt hex 1))
+    (aset standard-display-table (unibyte-char-to-multibyte i)
+          (vector (make-glyph-code ?\\ 'escape-glyph)
+                  (make-glyph-code ?x 'escape-glyph)
+                  (make-glyph-code hi 'escape-glyph)
+                  (make-glyph-code low 'escape-glyph)))
+    (setq i (+ i 1))))
+
 ;; generic-define-* before (require 'generic-x) allow load all useful extra modes.
 (setq generic-define-mswindows-modes t)
 (setq generic-define-unix-modes t)
@@ -244,7 +271,7 @@
  )
 
 ;;; ----------------------------------------------------------------
-;;; switching, creating, selecting buffers.
+(message "switching, creating, selecting buffers")
 
 (iswitchb-mode 1)
 (setq iswitchb-buffer-ignore
@@ -255,6 +282,7 @@
         "^\*Dired log\*"
         "^\*Quail Completions\*"
         "^\*Disabled Command\*"
+        "^TAGS"
         ))
 
 (require 'uniquify)
@@ -264,7 +292,7 @@
 (global-set-key "\C-x\C-b" 'ibuffer)
 
 ;;; ----------------------------------------------------------------
-;;; scrolling.
+(message "scrolling")
 
 (defvar my-scroll-margin 4)
 
@@ -281,15 +309,21 @@
       (append my-text-mode-hook-list my-devel-mode-hook-list my-scroll-margin-mode-hook-list) )
 
 ;;; ----------------------------------------------------------------
-;;; search, isearch, occur.
+(message "search, isearch, occur")
 
 (setq case-fold-search t)
 
 (setq query-replace-highlight t)        ; highlight during query
 (setq search-highlight t)               ; highlight incremental search
 
+;; Make old Emacs key binding like in Emacs 23.x.
+(when (< emacs-major-version 23)
+  (global-set-key (kbd "M-s o") 'occur)
+  )
+(global-set-key [f7] 'occur)
+
 ;;; ----------------------------------------------------------------
-;;; grep, find.
+(message "grep, find")
 
 ;; This settings have effect from Emacs 22.x.
 (when (eq system-type 'windows-nt)
@@ -302,20 +336,38 @@
   (setq null-device "/dev/null")
   )
 
+;; -ls produce very noisy output:
+;; (setq find-ls-option '("-ls" . ""))
+;; So I use next expression, which work with GNU find, I replace %s with '0'
+;; to avoid unnecessary sys calls and this make output aligned by column:
+(setq find-ls-option '("-printf ' -rw-rw-rw- 0 %AY-%Am-%Ad %AH:%AM %p\n'" . ""))
+
 ;; Do not set t because some grep do not has --color options.
 (setq grep-highlight-matches nil)
 (setq grep-use-null-device nil)
 
+(eval-after-load 'grep
+  '(progn
+     (add-to-list 'grep-find-ignored-directories "build" t)
+     (add-to-list 'grep-find-ignored-directories "dist" t)
+     (add-to-list 'grep-find-ignored-directories "lib" t)
+
+     (when (boundp 'grep-find-ignored-files)
+       (add-to-list 'grep-find-ignored-files "*TAGS")
+       (add-to-list 'grep-find-ignored-files "GPATH")
+       )
+     ))
+
 (global-set-key [M-f7] 'rgrep)
 
 ;;; ----------------------------------------------------------------
-;;; syntax highlighting.
+(message "syntax highlighting")
 
 (setq font-lock-maximum-decoration t)
 (global-font-lock-mode 1)
 
 ;;; ----------------------------------------------------------------
-;;; highlight selected text.
+(message "highlight selected text")
 
 ;; 1/-1, when the mark is active, the region is highlighted.
 (transient-mark-mode 1)
@@ -335,7 +387,7 @@
   )
 
 ;;; ----------------------------------------------------------------
-;;; highlighting current line.
+(message "highlighting current line")
 
 (when window-system
   (custom-set-faces '(hl-line ((t (:inherit highlight :background "light yellow")))))
@@ -343,13 +395,13 @@
   )
 
 ;;; ----------------------------------------------------------------
-;;; paren, braces.
+(message "paren, braces")
 
 (show-paren-mode 1) ; Parenthesis matching via highlighting.
 (setq show-paren-style (quote parenthesis))
 
 ;;; ----------------------------------------------------------------
-;;; keyboard, mouse.
+(message "keyboard, mouse")
 
 ;; cyrillic-jis-russian  for 567 is :,.
 ;; cyrillic-jcuken  for SHIFT 567 is :,.
@@ -360,13 +412,13 @@
 ;; (pc-bindings-mode) ; Myself define keybinding, see
 
 ;;; ----------------------------------------------------------------
-;;; completion.
+(message "completion")
 
 ;; I remove partial-completion-mode because it depricated in Emacs 24.0.
 ;; Completion controled by 'completion-styles' variable.
 
 ;;; ----------------------------------------------------------------
-;;; mouse.
+(message "mouse")
 
 ;; Scroll Bar gets dragged by mouse butn 1
 (global-set-key [vertical-scroll-bar down-mouse-1] 'scroll-bar-drag)
@@ -377,7 +429,7 @@
   )
 
 ;;; ----------------------------------------------------------------
-;;; key binding, short-keys.
+(message "key binding, short-keys")
 
 (global-set-key [home]    'beginning-of-line)
 (global-set-key [end]     'end-of-line)
@@ -408,15 +460,10 @@
 (if window-system (global-set-key (kbd "C-z") nil))
 (global-set-key (kbd "C-x C-z") nil)
 
-;; Make old Emacs key binding like in Emacs 23.x.
-(when (< emacs-major-version 23)
-  (global-set-key (kbd "M-s o") 'occur)
-  )
-
 ;; (global-set-key [language-change] 'ignore)
 
 ;;; ----------------------------------------------------------------
-;;; coding system, charset, locale, lang.
+(message "coding system, charset, locale, lang")
 
 ;; Emacs 23.1 no longer need codepage-setup.
 (when (<= emacs-major-version 22)
@@ -457,12 +504,12 @@
   )
 
 ;;; ----------------------------------------------------------------
-;;; open file, ffap.
+(message "open file, ffap")
 (setq-default save-place t)
 (require 'saveplace)
 
 ;;; ----------------------------------------------------------------
-;;; dired.
+(message "dired")
 
 (require 'dired)
 
@@ -528,7 +575,7 @@
 (define-key dired-mode-map (kbd "`") 'my-dired-flag-tmp-files)
 
 ;;; ----------------------------------------------------------------
-;;; ls-lisp, dired ls.
+(message "ls-lisp, dired ls")
 
 ;; If non-nil - use 'insert-directory-program', which I dislike.
 (setq ls-lisp-use-insert-directory-program nil)
@@ -545,7 +592,7 @@
 (require 'ls-lisp)
 
 ;;; ----------------------------------------------------------------
-;;; compression, archive.
+(message "compression, archive")
 
 (require 'jka-compr) ; Automatic decompression, hooks for tar-mode.
 (if (fboundp 'auto-compression-mode)
@@ -556,13 +603,13 @@
 (add-to-list 'auto-mode-alist '("\\.\\(war\\|ear\\|sar\\|egg\\)\\'" . archive-mode))
 
 ;;; ----------------------------------------------------------------
-;;; image.
+(message "image")
 
 (when (fboundp 'auto-image-file-mode)
   (auto-image-file-mode 1))
 
 ;;; ----------------------------------------------------------------
-;;; recentf.
+(message "recentf")
 
 (require 'recentf)
 ;; Prevent TRAMP to login on remote host when loading.
@@ -573,14 +620,14 @@
 (global-set-key (kbd "\e\eq")  'recentf-open-files)
 
 ;;; ----------------------------------------------------------------
-;;; revert buffer.
+(message "revert buffer")
 
 (global-set-key [f5]    'revert-buffer)
 (setq revert-without-query (quote (".*")))
 (setq auto-revert-interval 2)
 
 ;;; ----------------------------------------------------------------
-;;; convenient.
+(message "convenient")
 
 (defun reglen()
   "Show region length."
@@ -588,7 +635,7 @@
   (message "%s" (- (region-end) (region-beginning))))
 
 ;;; ----------------------------------------------------------------
-;;; minibuffer.
+(message "minibuffer")
 
 (require 'icomplete) ; Interactive completion in minibuffer.
 (icomplete-mode 1)
@@ -602,13 +649,13 @@
         ) )
 
 ;;; ----------------------------------------------------------------
-;;; music.
+(message "music")
 (setq gnus-audio-au-player "winamp.exe"
       gnus-audio-directory "D:\\music"
       gnus-audio-wav-player "winamp.exe")
 
 ;;; ----------------------------------------------------------------
-;;; browser.
+(message "browser")
 
 (cond
  ((equal window-system 'w32)
@@ -619,7 +666,7 @@
   (setq browse-url-browser-function 'browse-url-mozilla)))
 
 ;;; ----------------------------------------------------------------
-;;; calendar.
+(message "calendar")
 
 ;; (setq mark-holidays-in-calendar t)
 ;; (setq all-christian-calendar-holidays t)
@@ -629,12 +676,12 @@
 (setq european-calendar-style t)
 
 ;;; ----------------------------------------------------------------
-;;; STANDARD HOOKS.
+(message "standard hooks")
 
 (add-hook 'write-file-hooks 'time-stamp)
 
 ;;; ----------------------------------------------------------------
-;;; auto-fill.
+(message "auto-fill")
 
 (setq-default fill-column 78)
 
@@ -650,7 +697,7 @@
 (add-hook 'text-mode-hook 'turn-on-auto-fill)
 
 ;;; ----------------------------------------------------------------
-;;; unknown.
+(message "unknown")
 
 ;; browse-url mailcrypt gnus message sendmail bbdb pilot bibtex eiffel-mode emacs-w3m
 ;; eudc filladapt hugs-mode mpg123 php-mode ps-print
@@ -658,7 +705,7 @@
 ;; discography - variant of BibTeX mode for discographies
 
 ;;; ----------------------------------------------------------------
-;;; cacl, calculator.
+(message "cacl, calculator")
 
 (setq-default calc-group-digits t)
 (setq-default calc-group-char "'")
@@ -677,12 +724,12 @@
         (insert result)))))
 
 ;;; ----------------------------------------------------------------
-;;; TeX, LaTeX.
+(message "TeX, LaTeX")
 
 (setq tex-run-command "initex")
 
 ;;; ----------------------------------------------------------------
-;;; AUC TeX.
+(message "AUC TeX")
 
 ;(add-hook 'LaTeX-mode-hook 'LaTeX-install-toolbar)
 ;; (setq TeX-parse-self t)             ; Enable parse on load.
@@ -719,7 +766,7 @@
 ;           'TeX-run-command nil t))))
 
 ;;; ----------------------------------------------------------------
-;;; reftex.
+(message "reftex")
 
 ;; Reftex is included with Emacs 21.1.
 
@@ -731,7 +778,7 @@
 ;; (add-hook 'latex-mode-hook 'turn-on-reftex)   ; with Emacs latex mode
 
 ;;; ----------------------------------------------------------------
-;;; PreviewLatex.
+(message "PreviewLatex")
 
 ;(load "preview-latex.el" nil t t)
 
@@ -739,7 +786,7 @@
 ;(autoload 'LaTeX-preview-setup "preview")
 
 ;;; ----------------------------------------------------------------
-;;; Info.
+(message "Info")
 
 ;; Because of Debian policy documentation covered by FDL license with invariant sections not allowed in packet
 ;; repository tree. So it must be installed manually. My usual configuration is install user local software
@@ -748,13 +795,13 @@
   (setenv "INFOPATH" "~/usr/share/info:"))
 
 ;;; ----------------------------------------------------------------
-;;; man, woman.
+(message "man, woman")
 
 (setq woman-use-own-frame nil)
 (setq woman-fill-frame t)
 
 ;;; ----------------------------------------------------------------
-;;; comint.
+(message "comint")
 
 ;; If non-nil, add a `/' to completed directories, ` ' to file names.
 (setq comint-completion-addsuffix t)
@@ -762,7 +809,7 @@
 (setq comint-eol-on-send t)
 
 ;;; ----------------------------------------------------------------
-;;; shell, sh, bash.
+(message "shell, sh, bash")
 
 ;; Setup Emacs to run bash as its primary shell.
 ;; (setq binary-process-input t)
@@ -799,7 +846,7 @@
   )
 
 ;;; ----------------------------------------------------------------
-;;; spell, ispell, aspell.
+(message "spell, ispell, aspell")
 
 ;; Settings for spelling done in '.emacs-autogen'.
 ;(add-hook 'text-mode-hook 'flyspell-mode)
@@ -807,15 +854,14 @@
 ;(setq flyspell-delay '1)
 
 ;;; ----------------------------------------------------------------
-;;; GTD, PIM, organize, todo mode.
+(message "GTD, PIM, organize, todo mode")
 
 ;;; ----------------------------------------------------------------
-;;; org-mode.
+(message "org-mode")
 
-(if (>= emacs-major-version 22)
-(progn
+(when (>= emacs-major-version 22)
   (require 'org)
-  ))
+  )
 
 ;; XXX org-todo-keywords '((sequence "TODO" "START" "|" "DONE")) for org-version 4.67c
 ;; XXX (setq org-todo-keywords '("TODO" "START" "DONE")) for org-version 6.05b
@@ -839,7 +885,7 @@
       (setq org-agenda-files '("~/.gtd/todo.org")) ))
 
 ;;; ----------------------------------------------------------------
-;;; remember-mode.
+(message "remember-mode")
 
 (if (or (featurep 'remember) (fboundp 'remember))
     (progn
@@ -857,7 +903,7 @@
        ) ))
 
 ;;; ----------------------------------------------------------------
-;;; TODO, XXX, FIXME highlight.
+(message "TODO, XXX, FIXME highlight")
 ;; Show blanks and FIXME
 ;; http://www.emacswiki.org/cgi-bin/wiki/EightyColumnRule
 
@@ -884,19 +930,22 @@
   )
 
 ;;; ----------------------------------------------------------------
-;;; communication.
+(message "communication")
 
 ;;; ----------------------------------------------------------------
-;;; jabber.
+(message "jabber")
 
 (when (featurep 'jabber)
   (setq
    jabber-history-enabled t
    jabber-use-global-history nil
-   jabber-backlog-number 15
+   jabber-backlog-number 40
    jabber-backlog-days 30
    jabber-alert-presence-message-function (lambda (who oldstatus newstatus statustext) nil)
    )
+  ;; Redefine standard binding for sending message form RET to C-RET.
+  (define-key jabber-chat-mode-map (kbd "RET") 'newline)
+  (define-key jabber-chat-mode-map [C-return] 'jabber-chat-buffer-send)
   )
 
 (setq my-chat-prompt "[%t] %n>\n")
@@ -909,13 +958,22 @@
    )
   )
 
+(when (featurep 'jabber)
+  (let ( (mgs-list '("Я тутачки, а где Вы меня ожидали?"
+                     "Software Development == Church Development. Step 1. Build it. Step 2. Pray."
+                     "А любит Б, Б любит С, что делать A? Найти другую Б!")) )
+    (random t)
+    (setq jabber-default-show (nth (random (length mgs-list)) mgs-list))
+    (setq jabber-default-status (nth (random (length mgs-list)) mgs-list))
+    ) )
+
 ;; fsm used in emacs jabber
 (when (featurep 'fsm)
   (setq fsm-debug nil)                  ; Disable *fsm-debug* buffer.
   )
 
 (defvar my-jabber-users nil
-  "Assoc list of jabber user goup. Keys are strings, values are lists of JIDs.")
+  "Assoc list of jabber user group. Keys are strings, values are lists of JIDs.")
 
 (defun my-jabber-send (group)
   "GROUP is keys from `my-jabber-users'"
@@ -941,7 +999,7 @@
 (global-set-key (kbd "C-x C-j C-s") 'my-jabber-send)
 
 ;;; ----------------------------------------------------------------
-;;; rcirc.
+(message "rcirc")
 
 ;; Turn on logging everything to a special buffer, for debugging.
 ;; (setq rcirc-debug-flag t)
@@ -951,8 +1009,13 @@
 (defun rcirc-handler-301 (process cmd sender args)
   "/away message handler.")
 
+(setq rcirc-default-server "irc.freenode.net")
+(setq rcirc-default-port 6667)
+(setq rcirc-default-nick user-nick)
+(setq rcirc-default-user-full-name user-full-name)
+
 ;;; ----------------------------------------------------------------
-;;; erc.
+(message "erc")
 
 ;; Take off noise message.
 (setq erc-track-exclude-types '("JOIN" "PART" "QUIT" "NICK" "MODE"))
@@ -963,7 +1026,7 @@
 (setq erc-server-coding-system 'utf-8)
 
 ;;; ----------------------------------------------------------------
-;;; VCS, version control, cvs, svn, mercurial, hg, bazaar, bzr, git, fossil.
+(message "VCS, version control, cvs, svn, mercurial, hg, bazaar, bzr, git, fossil")
 
 (if (equal window-system 'w32)
     (progn
@@ -1001,20 +1064,20 @@
   )
 
 ;;; ----------------------------------------------------------------
-;;; psvn.
+(message "psvn")
 
 (setq svn-status-verbose t)
 (setq svn-status-hide-unmodified t)
 
 ;;; ----------------------------------------------------------------
-;;; DVC.
+(message "DVC")
 
 (when (featurep 'dvc-emacs)
   (setq dvc-tips-enabled nil)
   )
 
 ;;; ----------------------------------------------------------------
-;;; devel, prog, programming.
+(message "devel, prog, programming")
 
 (add-to-list 'auto-mode-alist '("\\.cu$" . c-mode))
 
@@ -1038,7 +1101,7 @@
       my-devel-mode-hook-list)
 
 ;;; ----------------------------------------------------------------
-;;; diff, patch, ediff, emerge.
+(message "diff, patch, ediff, emerge")
 
 (setq diff-switches "-u")
 
@@ -1046,7 +1109,7 @@
 (setq ediff-custom-diff-options "-u")
 
 ;;; ----------------------------------------------------------------
-;;; indenting.
+(message "indenting")
 
 (setq standard-indent 4)
 (setq c-basic-offset 4)
@@ -1066,31 +1129,44 @@
     (setq i (- i 4))))
 
 ;;; ----------------------------------------------------------------
-;;; compile.
+(message "compile")
 
 (setq compile-auto-highlight t
       compile-command "make ")
 ;; compilation window shall scroll down if not 0
 (setq compilation-scroll-output 1)
 
-;; My funny error messages.
-;; XXX нужно реализовать через hook.
-(require 'compile)
-(add-to-list 'compilation-error-regexp-alist '("^\\( +\\[csc\\] \\|\\)\\(.*\\)(\\([0-9]*\\),\\([0-9]*\\)):" 2 3 4))
-(add-to-list 'compilation-error-regexp-alist '("^ *\\(.*\\)(\\([0-9]*\\)) +:" 1 2))
-(add-to-list 'compilation-error-regexp-alist '("^\"?\\([^\"]*\\)\"?,\\([0-9]*\\) .*\\[.*\\]: " 1 2)) ; KEIL compiler
-;; (add-to-list 'compilation-mode-font-lock-keywords '("\\(/[Oo][Uu][Tt]:[^ 	]+\\)" . 1))
-;; (add-to-list 'compilation-mode-font-lock-keywords '("[ 	]\\(/F[oe][^ 	]+\\)" . 1))
+(eval-after-load 'compile
+  '(progn
+     ;; My funny error messages.
+     (add-to-list 'compilation-error-regexp-alist '("^\\( +\\[csc\\] \\|\\)\\(.*\\)(\\([0-9]*\\),\\([0-9]*\\)):" 2 3 4))
+     (add-to-list 'compilation-error-regexp-alist '("^ *\\(.*\\)(\\([0-9]*\\)) +:" 1 2))
+     (add-to-list 'compilation-error-regexp-alist '("^\"?\\([^\"]*\\)\"?,\\([0-9]*\\) .*\\[.*\\]: " 1 2)) ; KEIL compiler
+     (when (boundp 'compilation-mode-font-lock-keywords)
+       (add-to-list 'compilation-mode-font-lock-keywords '("\\(/[Oo][Uu][Tt]:[^[:blank:]]+\\)" . 1))
+       (add-to-list 'compilation-mode-font-lock-keywords '("[[:blank:]]\\(/F[oe][^[:blank:]]+\\)" . 1))
+       )
+     ))
 
 ;;; ----------------------------------------------------------------
-;;; TAGS, etags, ctags, GNU GLOBAL.
+(message "TAGS, etags, ctags, GNU GLOBAL")
+
+;; One of 'tags-table-list' or 'tags-file-name' control which TAGS files to
+;; use.
+
+(setq tags-add-tables t)
 
 (when (featurep 'etags-table)
-  (setq etags-table-search-up-depth 1)
+  (setq etags-table-search-up-depth 8)
+  (when (featurep 'etags-select)
+    (global-set-key "\M-." 'etags-select-find-tag)
+    )
   )
 
+(global-set-key "\M-\r" 'complete-tag)
+
 ;;; ----------------------------------------------------------------
-;;; CEDET, semantic.
+(message "CEDET, semantic")
 
 ;; For debug use 'semantic-debug-idle-function' and 'semantic-debug-idle-work-function'.
 
@@ -1147,7 +1223,7 @@
   )
 
 ;;; ----------------------------------------------------------------
-;;; imenu.
+(message "imenu")
 
 (require 'imenu)
 (when window-system
@@ -1161,17 +1237,17 @@
   )
 
 ;;; ----------------------------------------------------------------
-;;; windows inf files for driver installing
+(message "windows inf files for driver installin")
 
 (add-to-list 'auto-mode-alist '("\\.inf\\'" . conf-mode))
 
 ;;; ----------------------------------------------------------------
-;;; makefile, make.
+(message "makefile, make")
 
 (add-to-list 'auto-mode-alist '("\\(Makefile\\|Makefile\\..+\\)\\'" . makefile-gmake-mode))
 
 ;;; ----------------------------------------------------------------
-;;; asm, assembler.
+(message "asm, assembler")
 
 ;; (setq-default asm-comment-char 59)
 (add-hook 'asm-mode-hook '(lambda () (setq comment-start "/*") (setq comment-end "*/")) t)
@@ -1182,7 +1258,7 @@
 ;; (add-hook 'asm-mode-hook '(lambda () (local-set-key ":" ":")))
 
 ;;; ----------------------------------------------------------------
-;;; linker.
+(message "linker")
 
 (when (fboundp 'iar-linker-config-mode)
   (add-to-list 'auto-mode-alist '("\\.icf\\'" . iar-linker-config-mode))
@@ -1192,12 +1268,12 @@
   )
 
 ;;; ----------------------------------------------------------------
-;;; lisp.
+(message "lisp")
 
 (setq list-command-history-max 256)
 
 ;;; ----------------------------------------------------------------
-;;; C, c-mode, C++, c++-mode.
+(message "C, c-mode, C++, c++-mode")
 
 (setq c-echo-syntactic-information-p t)
 (add-hook 'c-mode-common-hook
@@ -1237,6 +1313,7 @@
         (arglist-close . ++)
         (block-open . 0)
         (case-label . 0)
+        (cpp-define-intro . 0)
         (comment-intro . 0)
         (func-decl-cont . ++)
         (inexpr-class . 0)
@@ -1267,7 +1344,7 @@
     ))
 
 ;;; ----------------------------------------------------------------
-;;; javascript, js.
+(message "javascript, js")
 
 (if (>= emacs-major-version 23)
     (add-to-list 'auto-mode-alist '("\\.js$" . js-mode))
@@ -1275,53 +1352,53 @@
   )
 
 ;;; ----------------------------------------------------------------
-;;; bat file, batch.
+(message "bat file, batch")
 
 ;; loaded from 'generic-x.el'
 
 ;;; ----------------------------------------------------------------
-;;; nsis-mode.
+(message "nsis-mode")
 
 (when (fboundp 'nsis-mode)
   (add-to-list 'auto-mode-alist '("\\.\\(nsi\\|nsh\\)\\'" . nsis-mode))
   )
 
 ;;; ----------------------------------------------------------------
-;;; csharp, c-sharp.
+(message "csharp, c-sharp")
 
 (autoload 'csharp-mode "csharp-mode" "Major mode for editing C# code." t)
 (add-to-list 'auto-mode-alist '("\\.cs$" . csharp-mode))
 
 ;;; ----------------------------------------------------------------
-;;; java.
+(message "java")
 
 ;;; ----------------------------------------------------------------
-;;; ECB.
+(message "ECB")
 
 (setq ecb-tip-of-the-day nil)
 
 ;;; ----------------------------------------------------------------
-;;; html.
+(message "html")
 
 ;;; ----------------------------------------------------------------
-;;; nxml.
+(message "nxml")
 
 (setq nxml-sexp-element-flag t)
 (setq nxml-child-indent 2)
 (setq nxml-attribute-indent 4)
 
 ;;; ----------------------------------------------------------------
-;;; psgml.
+(message "psgml")
 
 (setq sgml-set-face t)                  ; for highlighting in sgml
 
 ;;; ----------------------------------------------------------------
-;;; sh, bash.
+(message "sh, bash")
 
 (add-to-list 'auto-mode-alist '("\\.cygport\\'" . shell-script-mode))
 
 ;;; ----------------------------------------------------------------
-;;; printing.
+(message "printing")
 
 ;; Use Notepad to print plain text files to the default Windows printer
 ;(setq lpr-command "notepad")
@@ -1336,36 +1413,14 @@
 ;(setq printer-name "~/myprint.txt")
 ;(setq ps-printer-name nil)
 ;(setq ps-print-header nil)
-;; some more menu entries in the command list:
-;; see tex-mik.el from package auctex: %v is defined in tex-mik.el
-;; other variables are defined in tex.el from auctex
-;; the meaning of some auctex-varibles:
-        ;symbols defined in tex.el and tex-mik.el:
-        ;%b name slave tex-file  %t name master tex-file
-        ;%d dvi-file  %f ps-file
-        ;%l "latex --src-specials"
-        ;%n line number  %p printcommand  %q "lpq"
-        ;%r (TeX-style-check TeX-print-style)
-        ;%s master-file-name without extention
-        ;%v yap command view line
-;(eval-after-load "tex"
-;  '(progn
-;     (add-to-list 'TeX-command-list
-;         (list "->PS landscape for pdf"
-;           "dvips %d -N0 -Ppdf -G0 -T 297mm,210mm -o %f "
-;           'TeX-run-command nil t))
-;     (add-to-list 'TeX-command-list
-;         (list "All Texify run-viewer"
-;           "texify --tex-opt=--src --run-viewer --clean %s.tex"
-;           'TeX-run-command nil t))))
 
 ;;; ----------------------------------------------------------------
-;;; SQL.
+(message "SQL")
 
 (setq sql-password "")
 
 ;;; ----------------------------------------------------------------
-;;; backuping.
+(message "backuping")
 
 (setq
  make-backup-files t
@@ -1378,7 +1433,7 @@
  version-control t)                            ; use versioned backups
 
 ;;; ----------------------------------------------------------------
-;;; auto save.
+(message "auto save")
 
 (setq auto-save-default t)
 ;; If nil autosave to different than original to buffer file.
@@ -1387,11 +1442,7 @@
 (setq delete-auto-save-files t)
 
 ;;; ----------------------------------------------------------------
-;;; user info.
-
-(setq user-full-name "Oleksandr Gavenko")
-(setq user-mail-address "gavenkoa@gmail.com")
-(setenv "ORGANIZATION" (concat user-full-name " <" user-mail-address  ">"))
+(message "User welcome msg")
 
 (add-hook 'emacs-startup-hook
           (lambda ()
@@ -1400,4 +1451,9 @@
                                "Nice day for Emacsing!")) )
               (message (nth (random (length mgs-list)) mgs-list)))))
 
+(switch-to-buffer "*Messages*")
+(setq default-directory "~/")
+(switch-to-buffer "*scratch*")
+(setq default-directory "~/")
+
 ;;; End loading...
--- a/.emacs-post	Tue Jan 04 23:55:13 2011 +0200
+++ b/.emacs-post	Sun Feb 20 21:11:26 2011 +0200
@@ -1,3 +1,30 @@
 ;; -*- mode: lisp; coding: utf-8; fill-column: 78 -*-
 ;;
 ;; For load order see README.
+
+;; (require 'cygwin-mount)
+;; (cygwin-mount-activate)
+
+;; (when (featurep 'jabber)
+;;   (setq jabber-account-list
+;;         '(
+;;           ("gavenko@services.bifit.int"
+;;            (:port . 5222)
+;;            (:password . "")
+;;            ;; (:network-server . "talk.google.com")
+;;            (:connection-type . network))
+;;           ("gavenkoa@gmail.com"
+;;            ;; (:port . 5222)
+;;            (:password . "")
+;;            (:network-server . "talk.google.com")
+;;            (:connection-type . ssl))
+;;           )
+;;         )
+;;   (jabber-connect-all)
+;;   )
+
+;; (setq etags-table-alist
+;;       (list
+;;        '(".*\\.\\([ch]\\|cpp\\|rc\\)" "c:/Program Files/Microsoft SDKs/Windows/v6.1/Include/TAGS")
+;;        ))
+
--- a/.emacs-pre	Tue Jan 04 23:55:13 2011 +0200
+++ b/.emacs-pre	Sun Feb 20 21:11:26 2011 +0200
@@ -1,3 +1,13 @@
 ;; -*- mode: lisp; coding: utf-8; fill-column: 78 -*-
 ;;
 ;; For load order see README.
+
+;; (require 'remember)
+
+;; (require 'etags-select)
+;; (require 'etags-table)
+
+;; (require 'jabber)
+
+;; (require 'rcirc)
+
--- a/Makefile	Tue Jan 04 23:55:13 2011 +0200
+++ b/Makefile	Sun Feb 20 21:11:26 2011 +0200
@@ -2,6 +2,17 @@
 #
 # You can do anything with this file without any warranty.
 
+SHELL = /bin/sh
+
+# Disable built in pattern rules.
+MAKEFLAGS += -r
+# Disable built in variables.
+MAKEFLAGS += -R
+# Disable built in suffix rules.
+.SUFFIXES:
+# Default target.
+.DEFAULT_GOAL = all
+
 ################################################################
 # Helper definition.
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/my-log-mode.el	Sun Feb 20 21:11:26 2011 +0200
@@ -0,0 +1,75 @@
+;;; my-log-mode.el --- major mode for error logs
+
+;; Copyright (C) 2010 by Oleksandr Gavenko <gavenkoa@gmail.com>
+
+;; You can do anything with this file without any warranty.
+
+;; Author: Oleksandr Gavenko <gavenkoa@gmail.com>
+;; Maintainer: Oleksandr Gavenko <gavenkoa@gmail.com>
+;; Created: 2011-02-09
+;; Version: 0.1
+;; Keywords: logging
+
+;;; Commentary:
+;;
+;; Very pure release.
+
+;;; Code:
+
+(defun my-log-goto (point)
+  ""
+  (interactive "d")
+  (let ( start stop line fname fline (fregex "^\\([^:]+\\):\\([[:digit:]]+\\):") )
+    (save-excursion
+      (move-beginning-of-line 1)
+      (setq start (point))
+      (move-end-of-line 1)
+      (setq stop (point))
+      (setq line (filter-buffer-substring start stop nil t))
+      (string-match fregex line)
+      (setq fname (match-string 1 line))
+      (when fname
+        (setq fline (string-to-int (match-string 2 line)))
+        )
+      )
+    (cond
+     ( (and fname (file-exists-p fname))
+       (find-file-other-window fname)
+       (goto-line fline)
+      )
+     ( t
+       (if fname
+           (message "File '%s' is not found (default directory is '%s')." fname default-directory)
+         (message "No file under current line.")
+         )
+       )
+     )
+    ))
+
+(setq my-log-mode-map (make-sparse-keymap))
+(define-key my-log-mode-map (kbd "RET") 'my-log-goto)
+
+(require 'generic-x)
+
+;;;###autoload
+(define-generic-mode
+  'my-log-mode
+  nil
+  nil
+  '(
+    ("^\\([^:]+\\):\\([[:digit:]]+\\):[^
+]+$" (1 font-lock-function-name-face) (2 font-lock-type-face))
+    ("^\\([^:]\\{1,10\\}\\):[^
+]+$" (1 font-lock-keyword-face))
+    )
+  ;; '("\\.log$")
+  nil
+  (list
+   (lambda nil
+     (use-local-map my-log-mode-map)
+     (modify-syntax-entry ?' ".")
+     (modify-syntax-entry ?\" ".")
+     ))
+  )
+
+;;; my-log-mode.el ends here