--- a/.emacs-my Fri Aug 27 13:32:32 2010 +0300
+++ b/.emacs-my Mon Aug 30 09:05:01 2010 +0300
@@ -279,18 +279,20 @@
;; ----------------------------------------------------------------------
;; grep, find.
-;; Assume that we have GNU grep, so -H available.
-(setq grep-command "grep -nH ")
-;; Assume that we have GNU grep, so -H available.
-(setq grep-template "grep <C> -nH <R> <F>")
-(setq 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 ")
-;; This pattern oriented to POSIX like sh shell and availability of GNU grep for -H option.
-(setq grep-find-template "find . <X> -type f <F> -exec grep <C> -nH <R> {} \\;")
+;; This settings have effect from Emacs 22.x.
+(when (eq system-type 'windows-nt)
+ ;; Workaround for Cygwin shell, when set 'CYGWIN=noglob'. By default 'shell-quote-argument'
+ ;; quoted by double '\' chars this cause failure.
+ (defun shell-quote-argument (argument)
+ (concat "'" argument "'")
+ )
+ ;; Workaround for Cygwin.
+ (setq null-device "/dev/null")
+ )
+
;; Do not set t because some grep do not has --color options.
(setq grep-highlight-matches nil)
(setq grep-use-null-device nil)
-;; For find-dired.
-;; (setq find-ls-option '("-exec ls -ld {} \\;" . "-ld"))
(global-set-key [M-f7] 'rgrep)
@@ -419,21 +421,17 @@
;; (set-terminal-coding-system 'cp1251)
;; (set-keyboard-coding-system 'cp1251)
-(prefer-coding-system 'koi8-r-dos)
-(prefer-coding-system 'utf-16-le)
-(prefer-coding-system 'cp866-dos)
-
(modify-coding-system-alist 'file "\\.el" 'iso-2022-7bit)
(cond
((equal window-system 'w32) ; also (string-equal system-type "windows-nt")
(progn
(set-selection-coding-system 'utf-16-le-dos)
- (prefer-coding-system 'utf-8-unix)
- (prefer-coding-system 'cp1251-dos)
+ (setq-default buffer-file-coding-system 'cp1251)
+ (setq default-file-name-coding-system 'cp1251)
+ (setq default-process-coding-system '(cp1251 . cp1251))
))
((equal window-system 'x)
(progn
- (prefer-coding-system 'cp1251-dos)
(prefer-coding-system 'utf-8-unix)
(setq selection-coding-system 'compound-text-with-extensions)
(setq x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING))
@@ -441,20 +439,12 @@
))
(t
(progn
- ;; (set-selection-coding-system 'utf-8-unix)
(prefer-coding-system 'cp1251-dos)
(prefer-coding-system 'utf-8-unix)
(modify-coding-system-alist 'process ".*" 'utf-8-unix)
))
)
-;; XXXXXXXXXXXXXXXXXXXXXXXX
-
-;; To open from command line file, which names has extended opcode
-;; (set-file-name-coding-system 'cp1251)
-
-;; (set-language-environment "Russian") ; XXX not used as set default coding system to koi8-r.
-
;; ----------------------------------------------------------------------
;; dired.
@@ -981,8 +971,8 @@
;; semantic-dependency-system-include-path, semantic-customize-system-include-path
(setq-mode-local c-mode semanticdb-find-default-throttle '(project unloaded system recursive))
- (add-hook 'c-mode-hook (lambda () (semantic-add-system-include "~/.emacs.d/include" 'c-mode)))
- (add-hook 'c++-mode-hook (lambda () (semantic-add-system-include "~/.emacs.d/include" 'c++-mode)))
+ (add-hook 'c-mode-hook (lambda nil (semantic-add-system-include "~/.emacs.d/include" 'c-mode)))
+ (add-hook 'c-mode-hook (lambda nil (semantic-add-system-include "~/.emacs.d/include" 'c++-mode)))
(global-semanticdb-minor-mode 1)
(global-set-key (kbd "C-c , .") 'semantic-ia-fast-jump)
@@ -1090,6 +1080,7 @@
(statement-block-intro . +)
(statement-cont . ++)
(substatement-open . 0)
+ (inextern-lang . 0)
))
(c-echo-syntactic-information-p . t))
"My C Programming Style")