Advertisement
Guest User

semantic-setup

a guest
Nov 4th, 2012
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 1.91 KB | None | 0 0
  1. ;; semantic setup
  2. (defun my-semantic-init-hook ()
  3.   (require 'semantic)
  4.   (require 'semantic/sb)
  5.   (require 'semantic/ia)
  6.   (require 'semantic/bovine/gcc)
  7.   (require 'srecode)
  8.   (global-ede-mode 1)
  9.   (semantic-mode 1)
  10.   (global-semanticdb-minor-mode 1)
  11.   (global-semantic-idle-scheduler-mode 1)
  12.   (global-semantic-idle-completions-mode 1)
  13.   (global-semantic-decoration-mode 1)
  14.   (global-semantic-highlight-func-mode 1)
  15.   (global-semantic-stickyfunc-mode 1)
  16.   (global-semantic-idle-summary-mode 1)
  17.   (global-semantic-mru-bookmark-mode 1)
  18.   (global-semantic-idle-local-symbol-highlight-mode 1)
  19.   (semanticdb-enable-gnu-global-databases 'c-mode)
  20.   (semanticdb-enable-gnu-global-databases 'c++-mode)
  21.   (set-default 'semantic-case-fold t)
  22.  
  23. ;; integration with imenu
  24.   (defun my-semantic-hook ()
  25.     (imenu-add-to-menubar "TAGS"))
  26.   (add-hook 'semantic-init-hooks 'my-semantic-hook)
  27.  
  28.   (local-set-key "." 'semantic-complete-self-insert)
  29.   (local-set-key ">" 'semantic-complete-self-insert)
  30.  
  31.  
  32. ;; semantic system includes
  33. (semantic-add-system-include "/usr/local/root_v5.32.04/include" 'c-mode)
  34. (semantic-add-system-include "/usr/local/root_v5.32.04/include" 'c++-mode)
  35. (semantic-add-system-include "/home/elemakil/HEP/ilcsoft/v01-08-01/lcio/v01-12-02/include" 'c-mode)
  36. (semantic-add-system-include "/home/elemakil/HEP/ilcsoft/v01-08-01/lcio/v01-12-02/include" 'c++-mode)
  37. (semantic-add-system-include "/home/elemakil/HEP/ilcsoft/DEPFETTrackTools/source/include" 'c-mode)
  38. (semantic-add-system-include "/home/elemakil/HEP/ilcsoft/DEPFETTrackTools/source/include" 'c++-mode)
  39. (semantic-add-system-include "/usr/local/CLHEP_2.1.0.1/include" 'c-mode)
  40. (semantic-add-system-include "/usr/local/CLHEP_2.1.0.1/include" 'c++-mode)
  41.   )
  42. (add-hook 'c-mode-hook '(lambda () (my-semantic-init-hook)))
  43. (add-hook 'c++-mode-hook '(lambda () (my-semantic-init-hook)))
  44. (add-hook 'c-mode-common-hook '(lambda () (my-semantic-init-hook)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement