Permalink
Browse files

more config's optimizations

- fixed problem with new CEDET layout
- added autocomplete mode
- use prog-mode-hook to setup common hooks
  • Loading branch information...
alexott committed May 1, 2012
1 parent 0fbb20b commit e8ece07c46559aca042896593a03ac1f1672315f
View
50 .emacs
@@ -10,29 +10,31 @@
(push "/Users/ott/exp/bin" exec-path)
)
(when (string= (system-name) "alexott")
- (setenv "PATH" (concat "/home/ott.cabal/bin:/home/ott/exp/bin:" (getenv "PATH")))
- (push "/home/ott.cabal/bin" exec-path)
+ (setenv "PATH" (concat "/home/ott/.cabal/bin:/home/ott/exp/bin:" (getenv "PATH")))
+ (push "/home/ott/.cabal/bin" exec-path)
(push "/home/ott/exp/bin" exec-path)
)
-;; el-get
+(load "~/emacs/rc/emacs-rc-cedet.el")
+(load "~/emacs/rc/emacs-rc-erlang.el")
+;; el-get
(add-to-list 'load-path "~/projects/el-get/")
(require 'el-get)
+(setq el-get-byte-compile nil)
(setq el-get-recipe-path '("~/projects/el-get/recipes/"))
-(setq el-get-sources '(magit psvn org-mode haskell-mode haskell-mode-exts shime
- auctex erlware-mode scala-mode ; sbt ensime
- distel slime bbdb clojure-mode cedet ess g-client
- emacs-jabber ahg doxymacs emacs-w3m geiser dvc
- (:name muse
- :type git
- :url "git@github.com:alexott/muse.git"
- :load-path ("./lisp")
- :build ("make")
- :features muse-autoloads
- )
- planner remember
- xml-rpc-el n3-mode))
+(setq el-get-sources '(magit psvn org-mode auctex scala-mode
+ distel slime bbdb clojure-mode
+ ess emacs-jabber ahg doxymacs
+ emacs-w3m geiser planner remember
+ xml-rpc-el n3-mode yasnippet
+ android-mode elein json tuareg-mode
+ htmlize cmake-mode paredit quack
+ js2-mode oddmuse markdown-mode
+ graphviz-dot-mode google-contacts
+ ghc-mod auto-complete auto-complete-clang
+ auto-complete-emacs-lisp auto-complete-etags
+ auto-complete-latex auto-complete-yasnippet))
(el-get 'sync)
;;(el-get-update-all)
@@ -51,7 +53,7 @@
(load "~/emacs/rc/emacs-rc-info.el")
(load "~/emacs/rc/emacs-rc-osd.el")
(load "~/emacs/rc/emacs-rc-yasnippet.el")
-;;(load "~/emacs/rc/emacs-rc-autocomplete.el")
+(load "~/emacs/rc/emacs-rc-autocomplete.el")
;; TODOs, etc.
(load "~/emacs/rc/emacs-rc-remember.el")
(load "~/emacs/rc/emacs-rc-org-mode.el")
@@ -68,35 +70,35 @@
(load "~/emacs/rc/emacs-rc-gdb.el")
(load "~/emacs/rc/emacs-rc-ccmode.el")
(load "~/emacs/rc/emacs-rc-python.el")
-;(load "~/emacs/rc/emacs-rc-doxygen.el")
-(load "~/emacs/rc/emacs-rc-cedet.el")
+(load "~/emacs/rc/emacs-rc-doxygen.el")
(load "~/emacs/rc/emacs-rc-elisp.el")
-(load "~/emacs/rc/emacs-rc-ecb.el")
+;(load "~/emacs/rc/emacs-rc-ecb.el")
(load "~/emacs/rc/emacs-rc-prolog.el")
(load "~/emacs/rc/emacs-rc-javascript.el")
(load "~/emacs/rc/emacs-rc-scheme.el")
;;(load "~/emacs/rc/emacs-rc-ocaml.el")
(load "~/emacs/rc/emacs-rc-lisp.el")
(load "~/emacs/rc/emacs-rc-clojure.el")
(load "~/emacs/rc/emacs-rc-slime.el")
-(load "~/emacs/rc/emacs-rc-erlang.el")
(load "~/emacs/rc/emacs-rc-haskell.el")
(load "~/emacs/rc/emacs-rc-scala.el")
(load "~/emacs/rc/emacs-rc-sh-mode.el")
(load "~/emacs/rc/emacs-rc-auto-insert.el")
(load "~/emacs/rc/emacs-rc-cmake.el")
+(load "~/emacs/rc/emacs-rc-distel.el")
+(load "~/emacs/rc/emacs-rc-octave.el")
;;
;; VCS & DVCS
(load "~/emacs/rc/emacs-rc-mercurial.el")
-(load "~/emacs/rc/emacs-rc-dvc.el")
+;;(load "~/emacs/rc/emacs-rc-dvc.el")
(load "~/emacs/rc/emacs-rc-git.el")
(load "~/emacs/rc/emacs-rc-vcs-misc.el")
;;
;; WWW, IM, social networking & blogging
;;(load "~/emacs/rc/emacs-rc-twitter.el")
(load "~/emacs/rc/emacs-rc-jabber.el")
(load "~/emacs/rc/emacs-rc-w3.el")
-(load "~/emacs/rc/emacs-rc-erc.el")
+;(load "~/emacs/rc/emacs-rc-erc.el")
(load "~/emacs/rc/emacs-rc-w3m.el")
;;(load "~/emacs/rc/emacs-rc-eblogger.el")
;;(load "~/emacs/rc/emacs-rc-lj.el")
@@ -110,7 +112,7 @@
;;(load "~/emacs/rc/emacs-rc-timeclock.el")
;;(load "~/emacs/rc/emacs-rc-autocomplete.el")
-(load "~/emacs/rc/emacs-rc-gclient.el")
+;;(load "~/emacs/rc/emacs-rc-gclient.el")
;; (load "~/emacs/rc/emacs-rc-.el")
;; (load "~/emacs/rc/emacs-rc-.el")
View
@@ -44,3 +44,5 @@ GTAGS
/snippets/c++-mode/wwdbg.detail
/snippets/c++-mode/wwdbg.max_detail
/snippets/c++-mode/wwdbg.normal
+/rc/emacs-rc-local-colibri.el
+/rc/emacs-rc-local-mwg-e6500.el
@@ -3,21 +3,14 @@
;; Copyright (C) Alex Ott
;;
;; Author: Alex Ott <alexott@gmail.com>
-;; Keywords:
-;; Requirements:
-;; Status: not intended to be distributed yet
-(add-to-list 'load-path "~/emacs/auto-complete")
+(setq ac-auto-start nil)
+(define-key ac-mode-map (kbd "C-TAB") 'auto-complete)
-(require 'auto-complete-config)
-(add-to-list 'ac-dictionary-directories "~/emacs/auto-complete/ac-dict")
-(ac-config-default)
+(defun alexott/ac-hook ()
+ (local-set-key [(control return)] 'auto-complete)
+ )
+(add-hook 'prog-mode-hook 'alexott/ac-hook)
+(add-hook 'LaTeX-mode-hook 'alexott/ac-hook)
-;; Generic setup.
-(setq ac-auto-start t) ;automatically start (disabled)
-(setq ac-dwim t) ;Do what i mean
-;;(ac-set-trigger-key "M-TAB")
-;;(define-key ac-mode-map (kbd "M-TAB") 'auto-complete)
-
-;;; emacs-rc-autocomplete.el ends here
View
@@ -32,7 +32,6 @@
)
(add-hook 'c-mode-common-hook 'alexott/c-mode-common-hook)
(add-hook 'c-mode-common-hook 'alexott/common-hook)
-(add-hook 'c-mode-common-hook 'alexott/common-prog-hook)
(require 'info-look)
(info-lookup-add-help
View
@@ -8,7 +8,7 @@
(add-to-list 'semantic-default-submodes 'global-semantic-mru-bookmark-mode)
(add-to-list 'semantic-default-submodes 'global-semanticdb-minor-mode)
(add-to-list 'semantic-default-submodes 'global-semantic-idle-scheduler-mode)
-(add-to-list 'semantic-default-submodes 'global-semantic-stickyfunc-mode)
+;(add-to-list 'semantic-default-submodes 'global-semantic-stickyfunc-mode)
(add-to-list 'semantic-default-submodes 'global-cedet-m3-minor-mode)
(add-to-list 'semantic-default-submodes 'global-semantic-highlight-func-mode)
;;(add-to-list 'semantic-default-submodes 'global-semantic-show-unmatched-syntax-mode)
@@ -29,7 +29,6 @@
;; customisation of modes
(defun alexott/cedet-hook ()
-;; (local-set-key [(control return)] 'semantic-ia-complete-symbol-menu)
(local-set-key "\C-c?" 'semantic-ia-complete-symbol)
;;
(local-set-key "\C-c>" 'semantic-complete-analyze-inline)
@@ -41,6 +40,8 @@
(local-set-key "\C-cp" 'semantic-analyze-proto-impl-toggle)
(local-set-key (kbd "C-c <left>") 'semantic-tag-folding-fold-block)
(local-set-key (kbd "C-c <right>") 'semantic-tag-folding-show-block)
+
+ (add-to-list 'ac-sources 'ac-source-semantic)
)
;; (add-hook 'semantic-init-hooks 'alexott/cedet-hook)
(add-hook 'c-mode-common-hook 'alexott/cedet-hook)
@@ -56,21 +57,16 @@
(local-set-key "\C-xt" 'eassist-switch-h-cpp)
(local-set-key "\C-ce" 'eassist-list-methods)
(local-set-key "\C-c\C-r" 'semantic-symref)
+
+ (add-to-list 'ac-sources 'ac-source-etags)
)
(add-hook 'c-mode-common-hook 'alexott/c-mode-cedet-hook)
-;; gnu global support
-;(when (cedet-gnu-global-version-check t)
- (require 'semantic/db-global)
- (semanticdb-enable-gnu-global-databases 'c-mode)
- (semanticdb-enable-gnu-global-databases 'c++-mode)
-;)
+(semanticdb-enable-gnu-global-databases 'c-mode t)
+(semanticdb-enable-gnu-global-databases 'c++-mode t)
-;; ctags
-;(when (cedet-ectag-version-check t)
- (require 'semantic/ectags/db)
- (semantic-load-enable-primary-exuberent-ctags-support)
-;)
+(when (cedet-ectag-version-check t)
+ (semantic-load-enable-primary-ectags-support))
;; SRecode
(global-srecode-minor-mode 1)
@@ -79,10 +75,6 @@
(global-ede-mode 1)
(ede-enable-generic-projects)
-;;
-;;(semantic-add-system-include "~/exp/include" 'c++-mode)
-;;(semantic-add-system-include "~/exp/include" 'c-mode)
-
(defun recur-list-files (dir re)
"Returns list of files in directory matching to given regex"
(when (file-accessible-directory-p dir)
View
@@ -28,9 +28,6 @@
;; clojure-test-mode
(clojure-test-maybe-enable)
)
-(add-hook 'clojure-mode-hook 'alexott/common-hook)
-(add-hook 'clojure-mode-hook 'alexott/common-prog-hook)
-(add-hook 'clojure-mode-hook 'alexott/show-prog-keywords)
(add-hook 'clojure-mode-hook 'alexott/clojure-mode-hook)
(setq clojure-home (expand-file-name "~/emacs/clojure/"))
View
@@ -12,7 +12,5 @@
(add-to-list 'auto-mode-alist '("CMakeLists\\.txt\\'" . cmake-mode))
(add-to-list 'auto-mode-alist '("\\.cmake\\'" . cmake-mode))
-(add-hook 'cmake-mode-hook 'alexott/common-hook)
-(add-hook 'cmake-mode-hook 'alexott/common-prog-hook)
;;; emacs-rc-cmake.el ends here
@@ -14,6 +14,7 @@
(local-set-key "\C-c\C-c" 'comment-region)
(font-lock-mode 1)
)
+(add-hook 'prog-mode-hook 'alexott/common-hook)
;; show FIXME/TODO/BUG keywords
(defun alexott/show-prog-keywords ()
@@ -28,6 +29,7 @@
(subword-mode 1)
(alexott/show-prog-keywords)
)
+(add-hook 'prog-mode-hook 'alexott/common-prog-hook)
;; clean trailing whitespaces automatically
(setq alexott/trailing-whitespace-modes '(haskell-mode lisp-mode scheme-mode erlang-mode))
@@ -38,11 +40,12 @@
(add-hook 'before-save-hook 'alexott/trailing-whitespace-hook)
;; untabify some modes
-(setq alexott/untabify-modes '(haskell-mode lisp-mode scheme-mode erlang-mode clojure-mode))
-(defun alexott/untabify-hook ()
- (when (member major-mode alexott/untabify-modes)
- (untabify (point-min) (point-max))))
-(add-hook 'before-save-hook 'alexott/untabify-hook)
+;; (setq alexott/untabify-modes '(haskell-mode lisp-mode scheme-mode erlang-mode clojure-mode))
+;; (defun alexott/untabify-hook ()
+;; (when (member major-mode alexott/untabify-modes)
+;; (untabify (point-min) (point-max))))
+;; (add-hook 'before-save-hook 'alexott/untabify-hook)
+
;;; emacs-rc-common-hooks.el ends here
View
@@ -12,6 +12,17 @@
;;(require 'cl)
;;(require 'ecb)
+(setq ecb-version-check nil) ; to prevent ecb failing to start up
+
+(defadvice ecb-check-requirements (around no-version-check activate compile)
+ "ECB version checking code is very old so that it thinks that the latest
+cedet/emacs is not new enough when in fact it is years newer than the latest
+version that it is aware of. So simply bypass the version check."
+ (if (or (< emacs-major-version 23)
+ (and (= emacs-major-version 23)
+ (< emacs-minor-version 3)))
+ ad-do-it))
+
(setq-default ecb-tip-of-the-day nil)
View
@@ -19,10 +19,10 @@
(local-set-key "\C-c5f" 'find-function-other-frame)
(local-set-key "\C-ck" 'find-function-on-key)
(local-set-key [(control c) /] 'semantic-ia-complete-symbol)
+
+ (add-to-list 'ac-sources 'ac-source-ac-source-emacs-lisp-features)
)
(add-hook 'emacs-lisp-mode-hook 'alexott/elisp-mode-hook)
-(add-hook 'emacs-lisp-mode-hook 'alexott/common-hook)
-(add-hook 'emacs-lisp-mode-hook 'alexott/common-prog-hook)
;;
;; (add-to-list 'auto-mode-alist '("\\.el" . emacs-lisp-mode))
View
@@ -22,8 +22,6 @@
(local-set-key [return] 'newline-and-indent)
)
(add-hook 'erlang-mode-hook 'alexott/erlang-mode-hook)
-(add-hook 'erlang-mode-hook 'alexott/common-hook)
-(add-hook 'erlang-mode-hook 'alexott/common-prog-hook)
(eval-after-load "erlang-skels"
(progn
View
@@ -8,6 +8,8 @@
(custom-set-variables
'(magit-save-some-buffers (quote dontask)))
+(add-hook 'magit-mode-hook 'turn-on-magit-svn)
+
(setq magit-process-connection-type nil)
(define-key magit-mode-map "q" 'bury-buffer)
View
@@ -16,13 +16,16 @@
(add-to-list 'auto-mode-alist '("\\.hsc$" . haskell-mode))
+(autoload 'ghc-init "ghc" nil t)
+
(custom-set-variables
'(haskell-program-name "ghci")
'(inferior-haskell-wait-and-jump t)
; '(hs-lint-replace-with-suggestions t)
)
(defun alexott/haskell-mode-hook ()
+ (ghc-init)
(turn-on-haskell-doc-mode)
(turn-on-haskell-indent)
(turn-on-haskell-ghci)
@@ -34,11 +37,21 @@
(local-set-key "\C-c\C-h" 'haskell-hayoo)
(setq tab-width 4)
;; (turn-on-haskell-simple-indent)
- (setq haskell-font-lock-symbols t))
-(add-hook 'haskell-mode-hook 'alexott/common-hook)
-(add-hook 'haskell-mode-hook 'alexott/common-prog-hook)
+ (setq haskell-font-lock-symbols t)
+
+ (add-to-list 'ac-sources 'ac-source-ghc-mod)
+ )
(add-hook 'haskell-mode-hook 'alexott/haskell-mode-hook)
+(require 'haskell-interactive-mode)
+(defun alexott/hs-interactive-hook ()
+ (local-set-key (kbd "C-<up>")
+ '(lambda () (haskell-interactive-mode-history-toggle 1)))
+ (local-set-key (kbd "C-<down>")
+ '(lambda () (haskell-interactive-mode-history-toggle -1)))
+ )
+(add-hook 'haskell-interactive-mode-hook 'alexott/hs-interactive-hook)
+
;;
(add-to-list 'exec-path "~/.cabal/bin")
View
@@ -19,8 +19,6 @@
(list (assoc 'sbcl slime-lisp-implementations)))
)
(add-hook 'lisp-mode-hook 'alexott/lisp-mode-hook)
-(add-hook 'lisp-mode-hook 'alexott/common-hook)
-(add-hook 'lisp-mode-hook 'alexott/common-prog-hook)
(defun alexott/lisp-interact-mode-hook ()
(paredit-mode 1)
@@ -21,10 +21,9 @@
'(tab-always-indent t)
'(indent-tabs-mode nil)
'(tab-width 8)
- '(next-line-add-newlines t))
-
-;; unmark some function
-(put 'upcase-region 'disabled nil)
+ '(next-line-add-newlines t)
+ '(disabled-command-function nil)
+ )
;; set safe-local varaibles
(custom-set-variables
Oops, something went wrong.

0 comments on commit e8ece07

Please sign in to comment.