--- a/.emacs Wed Dec 23 13:04:05 2009 +0200
+++ b/.emacs Tue Dec 29 10:57:18 2009 +0200
@@ -18,6 +18,8 @@
(defvar dot-emacs-post (expand-file-name "~/.emacs-post")
"Path to file with post-loaded custom settings.")
+(add-to-list 'auto-mode-alist '("\\.emacs-.*" . emacs-lisp-mode) t)
+
;; pre-load custom settings
(if (file-exists-p dot-emacs-pre)
(load dot-emacs-pre))
--- a/.emacs-my Wed Dec 23 13:04:05 2009 +0200
+++ b/.emacs-my Tue Dec 29 10:57:18 2009 +0200
@@ -15,10 +15,6 @@
;; Shut off message buffer by setting nil.
(setq message-log-max 100)
-;;(add-hook 'after-init-hook
-;; '(lambda () (setq debug-on-error t)))
-;;(debug-on-entry 'command-line-1)
-
;; Set the debug option to enable a backtrace when a problem occurs.
(setq debug-on-error nil) ; t/nil
@@ -32,7 +28,7 @@
(scroll-bar-mode 1)
(if window-system
- ;; Для X-window и Win
+ ;; For graphical environment.
(progn
;;установка цветов экрана
(set-background-color "white")
@@ -45,11 +41,14 @@
;; (set-face-font 'default "7x14")
(fringe-mode 'default)
)
- ;; Для tty
+ ;; For tty.
(progn
)
)
+;; See what I am typing immediately (for keystroke in minibuffer).
+(setq echo-keystrokes 0.2)
+
;; ----------------------------------------------------------------------
;; Silent runing.
@@ -125,6 +124,14 @@
)
;; ----------------------------------------------------------------------
+;; search
+(setq case-fold-search t)
+
+;; ----------------------------------------------------------------------
+;; *Occur*
+(global-set-key [f7] 'occur) ; Key binding as in mc
+
+;; ----------------------------------------------------------------------
;; *Text*
(setq default-major-mode 'text-mode)
@@ -177,7 +184,10 @@
;; ----------------------------------------------------------------------
;; Completition
-(partial-completion-mode t) ; For example, M-x p-c-m expands to M-x partial-completion-mode
+
+;; partial-completion-mode cause bug in read-file-name with Emacs v22.3.1 (but not with v23.1).
+;; read-file-name used in rgrep, so I disable partial-completion-mode.
+(partial-completion-mode -1) ; For example, M-x p-c-m expands to M-x partial-completion-mode
;; ----------------------------------------------------------------------
;; Mouse
@@ -209,9 +219,6 @@
(global-set-key [M-f4] 'save-buffers-kill-emacs)
(global-set-key [f6] 'toggle-truncate-lines)
-;; *Occur*
-(global-set-key [f7] 'occur) ; Key binding as in mc
-
;; frames, windows manipulation, switch buffers
(global-set-key [?\C-x right] 'next-buffer)
(global-set-key [?\C-x left] 'previous-buffer)
@@ -335,27 +342,31 @@
;; ======================================================================
;; Convenient
+(defun reglen()
+ "Show region length."
+ (interactive)
+ (message "%s" (- (region-end) (region-beginning))))
+
;; ----------------------------------------------------------------------
;; Completion
(require 'icomplete) ; Interactive completion in minibuffer.
(icomplete-mode 1)
-(setq completion-ignored-extensions
- '("CVS/" ".hg/" ".svn/" ".git/" ".bzr/"
- ".o" "~" ".bin" ".bak" ".obj" ".map" ".a" ".ln" ".blg" ".bbl" ".elc"
- ".lof" ".glo" ".idx" ".lot" ".fmt" ".tfm" ".class" ".fas" ".lib" ".x86f" ".sparcf"
- ".lo" ".la" ".toc" ".log" ".aux" ".cp" ".fn" ".ky" ".pg" ".tp" ".vr" ".cps"
- ".fns" ".kys" ".pgs" ".tps" ".vrs"))
+(mapc (lambda (ext) (add-to-list 'completion-ignored-extensions ext))
+ '(
+ ".class" "~" ".aux"
+ ".o" ".obj" ".map" ".lib" ".lo" ".la" ".a" ".bin" ".exe"
+ ;; Place dir at end to appear at the start of completion-ignored-extensions.
+ "CVS/" ".hg/" ".svn/" ".git/" ".bzr/"
+ ) )
;; ----------------------------------------------------------------------
;; *grep*
(setq grep-command "find . -name '*' -exec grep -nH '' {} ;"
- grep-find-command "find . '(' -name .svn -o -name CVS -o -name .hg -o -name _darcs ')' -prune -o -type f -name '*' -print0 | xargs -0 -e grep -nH "
+ 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 "
grep-highlight-matches nil ; do not set t because some grep do not has --color options
- grep-tree-command "find <D> <X> -type f <F> -print0 | xargs -0 -e grep <C> -nH <R>"
grep-use-null-device t)
-(setq blink-matching-paren-on-screen t)
;; ----------------------------------------------------------------------
;; Music
@@ -422,31 +433,10 @@
;; ----------------------------------------------------------------------
;; unknown
-;; (require 'desire)
-;; (add-to-list 'desire-load-path
-;; (expand-file-name "~/share/emacs/desire"))
-;; (add-to-list 'auto-mode-alist
-;; (cons (concat (regexp-quote desire-extension) "\\'")
-;; 'emacs-lisp-mode))
-
-;; (desire 'browse-url)
-;; (desire 'mailcrypt)
-;; (desire 'gnus)
-;; (desire 'message)
-;; (desire 'sendmail)
-;; (desire 'bbdb "bbdb")
-;; (desire 'pilot)
-;; (desire 'bibtex)
-;; (desire 'eiffel-mode)
-;; (desire 'emacs-w3m)
-;; (desire 'eudc)
-;; (desire 'filladapt)
-;;;; (desire 'hugs-mode)
-;; (desire 'mpg123)
-;; (desire 'php-mode)
-;; (desire 'ps-print)
-;; (require 'chord-mode) ; edit guitar music.
-;; (require 'discography) ; variant of BibTeX mode for discographies.
+;; browse-url mailcrypt gnus message sendmail bbdb pilot bibtex eiffel-mode emacs-w3m
+;; eudc filladapt hugs-mode mpg123 php-mode ps-print
+;; chord-mode - edit guitar music
+;; discography - variant of BibTeX mode for discographies
;; ======================================================================
;; unNOVICEd commands...
@@ -550,7 +540,9 @@
;; (setenv "SHELL" shell-file-name)
(when (eq window-system 'w32) ; may require Cygwin or MSYS
- (setq explicit-shell-file-name "bash")
+ (setenv "ESHELL" "bash")
+ ;; (setq explicit-shell-file-name "bash")
+ ;; (setq shell-file-name "bash")
(setq explicit-bash-args '("-i"))
(setq explicit-sh-args '("-i"))
;; Here is workaround: when explicit-shell-file-name is "bash" and shell-file-name is "cmdproxy.exe"
@@ -653,9 +645,7 @@
"List of development modes." )
(add-hook 'font-lock-mode-hook (function (lambda ()
- (when (or
- (member major-mode my-devel-mode-list)
- )
+ (when (member major-mode my-devel-mode-list)
(font-lock-add-keywords nil
'(
("\t+" 0 'my-tab-face t)
@@ -899,7 +889,7 @@
;; ----------------------------------------------------------------------
;; bat file, batch
-(when (provide 'bat-mode)
+(when (featurep 'bat-mode)
(progn
(add-to-list 'auto-mode-alist '("\\.[bB][aA][tT]\\'" . bat-mode))
(add-to-list 'auto-mode-alist '("\\.[cC][mM][dD]\\'" . bat-mode))
@@ -1013,35 +1003,9 @@
;; ----------------------------------------------------------------
;; SQL
-;; (desire 'sql-mode)
(setq sql-password "")
;; ======================================================================
-;;
-;; Установка режима CUA - все как в Windows
-;; поддержка Ctr-c,v,x,d как в windows через пакет CUA
-
-;; версия 21.3
-
-;(require 'cua)
-;(CUA-mode t)
-;;установка режимов работы курсора через CUA
-;(setq CUA-mode-normal-cursor-color "black")
-;(setq CUA-mode-overwrite-cursor-color "red")
-;(setq CUA-mode-read-only-cursor-color "green")
-;(CUA-keypad-mode 'numeric t); доп.клавиатура - цифры
-;(CUA-keypad-mode 'prefix t); доп.клавиатура - префиксы регистров (М-2)
-
-;; версия 21.3.50 и старше
-
-;(require 'cua-base)
-;(cua-mode t)
-;;установка режимов работы курсора через CUA
-;(setq cua-normal-cursor-color "black")
-;(setq cua-overwrite-cursor-color "red")
-;(setq cua-read-only-cursor-color "green")
-
-;; ======================================================================
;; Backup
(setq
--- a/INSTALL Wed Dec 23 13:04:05 2009 +0200
+++ b/INSTALL Tue Dec 29 10:57:18 2009 +0200
@@ -1,10 +1,10 @@
-*- mode: outline; coding: cp1251 -*-
-Copyright (C) 2008 by Oleksandr Gavenko <gavenkoa@gmail.com>
+Copyright (C) 2008, 2009 by Oleksandr Gavenko <gavenkoa@gmail.com>
* Install note for .emacs.
-* Файл настроек.
+* Config file.
Файл настроек имеет имя ".emacs". При загрузке emacs он ищется по пути "$HOME/.emacs".
@@ -20,7 +20,7 @@
".emacs-my" хранит общие настройки для всех инсталляций, файлы ".emacs-pre" и
".emacs-post" содержат настройки для локальной инсталляции.
-* Особенности для Windows.
+* Setup on Windows.
** Setup HOME.
@@ -30,7 +30,8 @@
** Setup MANPATH.
-To use woman with on Windows set MANPATH like this:
+To use woman with on Windows set MANPATH like this (note that path in
+Cygwin/MinGW style so you need use cygwin-mount.el):
MANPATH=:/cygdrive/d/home/usr/share/man:/usr/share/man:/usr/local/share/man
@@ -44,6 +45,16 @@
Also you can set woman-manpath variable.
+** Setup INFOPATH.
+
+To browse info file inside Emacs set INFOPATH like this:
+
+ INFOPATH=e:/bin/gnutls/share/info;e:/bin/gnuwin32/info;e:/bin/gnuwin32/share/info;e:/bin/MinGW/info;e:/bin/MinGW/share/info;e:/bin/wget/info:
+
+for MinGW.
+
+Note that last colon symbol is essential for include also Emacs info to list.
+
* Особенности для Unix.
Я решил сохранять файлы настроек в домашнем каталоге основного пользователя,