.emacs-obsolete
author Oleksandr Gavenko <gavenkoa@gmail.com>
Sun, 22 Feb 2015 18:55:54 +0200
changeset 1219 68542ca74092
parent 1199 dff272add01e
child 1222 7a33c92b5d47
permissions -rw-r--r--
ansi-color-for-comint-mode-on
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1142
7906db469af0 Switch to ido from iswitchb. Use ido key binding instead of ffap-bindings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     1
;; -*- mode: emacs-lisp; coding: utf-8; fill-column: 78 -*-
7906db469af0 Switch to ido from iswitchb. Use ido key binding instead of ffap-bindings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     2
7906db469af0 Switch to ido from iswitchb. Use ido key binding instead of ffap-bindings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     3
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
7906db469af0 Switch to ido from iswitchb. Use ido key binding instead of ffap-bindings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     4
7906db469af0 Switch to ido from iswitchb. Use ido key binding instead of ffap-bindings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     5
(iswitchb-mode 1)
7906db469af0 Switch to ido from iswitchb. Use ido key binding instead of ffap-bindings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     6
7906db469af0 Switch to ido from iswitchb. Use ido key binding instead of ffap-bindings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     7
(setq iswitchb-regexp t)
7906db469af0 Switch to ido from iswitchb. Use ido key binding instead of ffap-bindings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     8
(setq iswitchb-use-virtual-buffers t)
7906db469af0 Switch to ido from iswitchb. Use ido key binding instead of ffap-bindings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     9
(setq iswitchb-buffer-ignore
7906db469af0 Switch to ido from iswitchb. Use ido key binding instead of ffap-bindings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    10
      '("^ "
7906db469af0 Switch to ido from iswitchb. Use ido key binding instead of ffap-bindings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    11
        "^\\*Buffer"
7906db469af0 Switch to ido from iswitchb. Use ido key binding instead of ffap-bindings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    12
        "^\\*Completions\\*"
7906db469af0 Switch to ido from iswitchb. Use ido key binding instead of ffap-bindings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    13
        "^\\*tramp"
7906db469af0 Switch to ido from iswitchb. Use ido key binding instead of ffap-bindings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    14
        "^\\*Dired log\\*"
7906db469af0 Switch to ido from iswitchb. Use ido key binding instead of ffap-bindings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    15
        "^\\*Quail Completions\\*"
7906db469af0 Switch to ido from iswitchb. Use ido key binding instead of ffap-bindings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    16
        "^\\*Disabled Command\\*"
7906db469af0 Switch to ido from iswitchb. Use ido key binding instead of ffap-bindings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    17
        "^TAGS"
7906db469af0 Switch to ido from iswitchb. Use ido key binding instead of ffap-bindings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    18
        ))
7906db469af0 Switch to ido from iswitchb. Use ido key binding instead of ffap-bindings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    19
7906db469af0 Switch to ido from iswitchb. Use ido key binding instead of ffap-bindings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    20
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
7906db469af0 Switch to ido from iswitchb. Use ido key binding instead of ffap-bindings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    21
7906db469af0 Switch to ido from iswitchb. Use ido key binding instead of ffap-bindings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    22
(require 'ffap)
7906db469af0 Switch to ido from iswitchb. Use ido key binding instead of ffap-bindings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    23
(ffap-bindings)
7906db469af0 Switch to ido from iswitchb. Use ido key binding instead of ffap-bindings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    24
7906db469af0 Switch to ido from iswitchb. Use ido key binding instead of ffap-bindings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    25
;; I usually mistype "C-x C-f" to "C-x d" or "C-x C-d", so always use find-file,
7906db469af0 Switch to ido from iswitchb. Use ido key binding instead of ffap-bindings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    26
;; because when file if directory find-file load dired, if regular file open it.
7906db469af0 Switch to ido from iswitchb. Use ido key binding instead of ffap-bindings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    27
(global-set-key (kbd "C-x C-f") 'find-file-at-point)
7906db469af0 Switch to ido from iswitchb. Use ido key binding instead of ffap-bindings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    28
(global-set-key (kbd "C-x C-d") 'find-file-at-point)
7906db469af0 Switch to ido from iswitchb. Use ido key binding instead of ffap-bindings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    29
(global-set-key (kbd "C-x d") 'find-file-at-point)
7906db469af0 Switch to ido from iswitchb. Use ido key binding instead of ffap-bindings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    30
7906db469af0 Switch to ido from iswitchb. Use ido key binding instead of ffap-bindings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    31
;; Stop 'ffap' in Dired as its suggestion is inconvenient.
7906db469af0 Switch to ido from iswitchb. Use ido key binding instead of ffap-bindings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    32
(define-key dired-mode-map (kbd "C-x C-f") 'find-file)
7906db469af0 Switch to ido from iswitchb. Use ido key binding instead of ffap-bindings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    33
(define-key dired-mode-map (kbd "C-x C-d") 'find-file)
7906db469af0 Switch to ido from iswitchb. Use ido key binding instead of ffap-bindings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    34
(define-key dired-mode-map (kbd "C-x d") 'find-file)
7906db469af0 Switch to ido from iswitchb. Use ido key binding instead of ffap-bindings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    35
7906db469af0 Switch to ido from iswitchb. Use ido key binding instead of ffap-bindings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    36
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
7906db469af0 Switch to ido from iswitchb. Use ido key binding instead of ffap-bindings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    37
7906db469af0 Switch to ido from iswitchb. Use ido key binding instead of ffap-bindings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    38
(mapc (lambda (ext) (add-to-list 'completion-ignored-extensions ext))
7906db469af0 Switch to ido from iswitchb. Use ido key binding instead of ffap-bindings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    39
      '(
7906db469af0 Switch to ido from iswitchb. Use ido key binding instead of ffap-bindings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    40
        ".class" "~" ".aux"
7906db469af0 Switch to ido from iswitchb. Use ido key binding instead of ffap-bindings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    41
        ".o" ".obj" ".map" ".lib" ".lo" ".la" ".a" ".bin" ".exe"
7906db469af0 Switch to ido from iswitchb. Use ido key binding instead of ffap-bindings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    42
        ;; Place dir at end to appear at the start of completion-ignored-extensions.
7906db469af0 Switch to ido from iswitchb. Use ido key binding instead of ffap-bindings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    43
        "CVS/" ".hg/" ".svn/" ".git/" ".bzr/"
7906db469af0 Switch to ido from iswitchb. Use ido key binding instead of ffap-bindings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    44
        ) )
1199
dff272add01e Move all configs to "~/.emacs.d/my".
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1142
diff changeset
    45
dff272add01e Move all configs to "~/.emacs.d/my".
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1142
diff changeset
    46
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
dff272add01e Move all configs to "~/.emacs.d/my".
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1142
diff changeset
    47
dff272add01e Move all configs to "~/.emacs.d/my".
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1142
diff changeset
    48
(defun my-find-subdirs (dir)
dff272add01e Move all configs to "~/.emacs.d/my".
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1142
diff changeset
    49
  (if (file-directory-p dir)
dff272add01e Move all configs to "~/.emacs.d/my".
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1142
diff changeset
    50
      (cons dir (apply 'append (mapcar 'my-find-subdirs (directory-files dir t "^[^.]")) ) )
dff272add01e Move all configs to "~/.emacs.d/my".
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1142
diff changeset
    51
    ))
dff272add01e Move all configs to "~/.emacs.d/my".
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1142
diff changeset
    52
(defun my-add-subdirs-to-load-path (dir)
dff272add01e Move all configs to "~/.emacs.d/my".
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1142
diff changeset
    53
  (mapc
dff272add01e Move all configs to "~/.emacs.d/my".
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1142
diff changeset
    54
   (lambda (d)
dff272add01e Move all configs to "~/.emacs.d/my".
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1142
diff changeset
    55
     (add-to-list 'load-path d t)
dff272add01e Move all configs to "~/.emacs.d/my".
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1142
diff changeset
    56
     (message "Load-path updated with: %s" d)
dff272add01e Move all configs to "~/.emacs.d/my".
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1142
diff changeset
    57
     )
dff272add01e Move all configs to "~/.emacs.d/my".
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1142
diff changeset
    58
   (my-find-subdirs dir)) )
dff272add01e Move all configs to "~/.emacs.d/my".
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1142
diff changeset
    59
dff272add01e Move all configs to "~/.emacs.d/my".
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1142
diff changeset
    60
(my-add-subdirs-to-load-path my-usr-lisp-dir)
dff272add01e Move all configs to "~/.emacs.d/my".
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1142
diff changeset
    61
(my-add-subdirs-to-load-path my-lisp-dir)
1219
68542ca74092 ansi-color-for-comint-mode-on
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1199
diff changeset
    62
68542ca74092 ansi-color-for-comint-mode-on
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1199
diff changeset
    63
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
68542ca74092 ansi-color-for-comint-mode-on
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1199
diff changeset
    64
68542ca74092 ansi-color-for-comint-mode-on
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1199
diff changeset
    65
(add-hook 'comint-output-filter-functions 'comint-strip-ctrl-m)
68542ca74092 ansi-color-for-comint-mode-on
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1199
diff changeset
    66
(add-hook 'comint-mode-hook 'ansi-color-for-comint-mode-on)
68542ca74092 ansi-color-for-comint-mode-on
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1199
diff changeset
    67