Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (setq cedet-root-path (file-name-as-directory "~/.emacs.d/cedet/"))
- (load-file (concat cedet-root-path "cedet-devel-load.el"))
- (add-to-list 'load-path (concat cedet-root-path "contrib"))
- (require 'cogre)
- (require 'cedet-contrib)
- ;; ------------ select which submodes we want to activate --------------
- (add-to-list 'semantic-default-submodes 'global-semantic-mru-bookmark-mode)
- (add-to-list 'semantic-default-submodes 'global-cedet-m3-minor-mode)
- (add-to-list 'semantic-default-submodes 'global-semanticdb-minor-mode)
- (add-to-list 'semantic-default-submodes 'global-semantic-decoration-mode)
- (add-to-list 'semantic-default-submodes 'global-semantic-highlight-edits-mode)
- (add-to-list 'semantic-default-submodes 'global-semantic-highlight-func-mode)
- (add-to-list 'semantic-default-submodes 'global-semantic-idle-breadcrumbs-mode)
- (add-to-list 'semantic-default-submodes 'global-semantic-idle-local-symbol-highlight-mode)
- (add-to-list 'semantic-default-submodes 'global-semantic-idle-scheduler-mode)
- (add-to-list 'semantic-default-submodes 'global-semantic-idle-completions-mode)
- (add-to-list 'semantic-default-submodes 'global-semantic-idle-summary-mode)
- (add-to-list 'semantic-default-submodes 'global-semantic-mru-bookmark-mode)
- (add-to-list 'semantic-default-submodes 'global-semantic-show-parser-state-mode)
- (add-to-list 'semantic-default-submodes 'global-semantic-show-unmatched-syntax-mode)
- (add-to-list 'semantic-default-submodes 'global-semantic-stickyfunc-mode)
- (add-to-list 'semantic-default-submodes 'global-semanticdb-minor-mode)
- (semantic-load-enable-all-ectags-support)
- (semantic-load-enable-all-exuberent-ctags-support)
- (semantic-load-enable-excessive-code-helpers)
- (semantic-load-enable-semantic-debugging-helpers)
- (load-file "/home/ju/.emacs.d/cedet/contrib/cedet-contrib-load.el")
- (global-semantic-tag-folding-mode 1) ;; tag folding
- ;; --------------------------------------------------------------------------
- ;; Activate semantic
- (semantic-mode 1)
- ;; load contrib library
- (require 'eassist)
- (defun my-c-mode-common-hook ()
- (define-key c-mode-base-map (kbd "M-o") 'eassist-switch-h-cpp)
- (define-key c-mode-base-map (kbd "M-m") 'eassist-list-methods))
- (add-hook 'c-mode-common-hook 'my-c-mode-common-hook)
- ;; 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)
- (local-set-key "\C-c=" 'semantic-decoration-include-visit)
- (local-set-key "\C-cj" 'semantic-ia-fast-jump)
- (local-set-key "\C-cq" 'semantic-ia-show-doc)
- (local-set-key "\C-cs" 'semantic-ia-show-summary)
- (local-set-key "\C-cp" 'semantic-analyze-proto-impl-toggle)
- )
- (add-hook 'c-mode-common-hook 'alexott/cedet-hook)
- (add-hook 'lisp-mode-hook 'alexott/cedet-hook)
- (add-hook 'scheme-mode-hook 'alexott/cedet-hook)
- (add-hook 'emacs-lisp-mode-hook 'alexott/cedet-hook)
- (add-hook 'erlang-mode-hook 'alexott/cedet-hook)
- (defun alexott/c-mode-cedet-hook ()
- (local-set-key "\C-ct" 'eassist-switch-h-cpp)
- (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-hook 'c-mode-common-hook 'alexott/c-mode-cedet-hook)
- (require 'semantic/ia)
- (semanticdb-enable-gnu-global-databases 'c-mode t)
- (semanticdb-enable-gnu-global-databases 'c++-mode t)
- ;; enable ctags for some languages:
- ;; Unix Shell, Perl, Pascal, Tcl, Fortran, Asm
- (when (cedet-ectag-version-check)
- (semantic-load-enable-primary-exuberent-ctags-support))
- ;; SRecode
- (global-srecode-minor-mode 1)
- ;; EDE
- (global-ede-mode 1)
- (ede-enable-generic-projects)
- ;; Setup JAVA....
- (require 'cedet-java)
- (defun my-c-mode-cedet-hook ()
- (local-set-key "." 'semantic-complete-self-insert)
- (local-set-key ">" 'semantic-complete-self-insert))
- (add-hook 'c-mode-common-hook 'my-c-mode-cedet-hook)
- (require 'semantic/bovine/gcc) ;; this is for new version
- (require 'semantic/sb) ;; this is for new version
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement