--- a/.emacs-my Sun Oct 18 21:58:22 2009 +0300
+++ b/.emacs-my Wed Oct 28 00:38:15 2009 +0200
@@ -215,7 +215,11 @@
(global-set-key [?\C-x right] 'next-buffer)
(global-set-key [?\C-x left] 'previous-buffer)
-(global-set-key (kbd "C-x C-d") 'dired)
+;; I usually mistype "C-x C-f" to "C-x d" or "C-x C-d", so always use find-file,
+;; because when file if directory find-file load dired, if regular file open it.
+(global-set-key (kbd "C-x C-f") 'find-file)
+(global-set-key (kbd "C-x C-d") 'find-file)
+(global-set-key (kbd "C-x d") 'find-file)
(global-set-key (kbd "\e\eg") 'goto-line)
(global-set-key (kbd "\e\er") 'query-replace-regexp)
@@ -817,11 +821,12 @@
(setq-default indent-tabs-mode nil) ; t - будут вставляться \t
(setq tab-always-indent t)
(setq c-tab-always-indent t)
-(let (i (line-width 200))
- (setq i (* (/ line-width tab-width) tab-width))
+(let ( (line-width 400) i )
+ (setq i (* (ceiling line-width 4) 4))
(setq tab-stop-list nil)
- (while (>= (setq i (- i tab-width)) 0)
- (setq tab-stop-list (cons i tab-stop-list))))
+ (while (>= i 0)
+ (setq tab-stop-list (cons i tab-stop-list))
+ (setq i (- i 4))))
;; ----------------------------------------------------------------------
;; Diff.
@@ -839,6 +844,7 @@
(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))
@@ -847,6 +853,8 @@
;; (setq-default asm-comment-char 59)
(add-hook 'asm-mode-hook '(lambda () (setq comment-start "/*") (setq comment-end "*/")) t)
+(add-to-list 'auto-mode-alist '("\\.\\([sS]79\\|[sS]\\)\\'" . asm-mode))
+
;; (add-hook 'asm-mode-hook '(lambda () (local-unset-key ":")))
;; (add-hook 'asm-mode-hook '(lambda () (local-set-key ":" ":")))