-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcedet-config.el
33 lines (23 loc) · 967 Bytes
/
cedet-config.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
;; Handles the CEDET configuration
(load-file "~/open_source/cedet/common/cedet.el")
(semantic-load-enable-excessive-code-helpers)
(require 'semantic-ia)
(require 'semantic-gcc)
;; custom key bindings for smart completion
(global-set-key "\C-x\C-m" 'semantic-ia-complete-symbol-menu)
;; For parsing system include files as semantic-gcc not working for me!
(semantic-add-system-include "/usr/include/c++/4.3" 'c++-mode)
;; Loading EDE package
(require 'ede)
(global-ede-mode t)
;; Function to load all include files in the specified directory
(defun DE-imply-includes-in-directory (dir)
"Add all header files in DIR to `semanticdb-implied-include-tags'."
(let ((files (directory-files dir t "^.+\\.h[hp]*$" t)))
(defvar-mode-local c++-mode semanticdb-implied-include-tags
(mapcar (lambda (header)
(semantic-tag-new-include
header
nil
:filename header))
files))))