Semantic/wxWidgets problem
Jacek Głowacz MERITUM <[email protected]> Sun, 7 Dec 2014 22:50:52 +0100
| Newsgroups | gmane.emacs.semantic |
|---|---|
| Message-ID | <CAPC1izOpWGO+OGRNRdTu0PToETstLRQDQ=Jhg=qQ_oHOxz3xOw@mail.gmail.com> |
Hi All
I'm trying to use Semantic with wxWidgets 2.8, with no luck... I have
latest bzr checkout of CEDET, and my Emacs is 24.3.1. Here is my
.emacs content:
(setq inhibit-startup-message t)
(setq make-backup-files nil)
(setq indent-tabs-mode nil)
(setq tab-width 4)
(global-linum-mode t)
(setq linum-format "%d ")
(defvar wx-base-dir "/usr/include/wx-2.8/wx")
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(tool-bar-mode nil))
'(tab-stop-list (quote (4 8 12 16 20 24 28 32 36 40 44 48 52 56 60 64
68 72 76 80 84 88 92 96 100 104 108 112 116 120)))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(default ((t (:family "DejaVu Sans Mono" :foundry "unknown" :slant
normal :weight normal :height 99 :width normal)))))
;; 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))))
(setq cedet-root-path (file-name-as-directory "~/.emacs.d/cedet-bzr/"))
(load-file (concat cedet-root-path "cedet-devel-load.el"))
(add-to-list 'load-path (concat cedet-root-path "contrib"))
(require 'ede)
(global-ede-mode t)
;; 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-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-cedet-m3-minor-mode)
(add-to-list 'semantic-default-submodes 'global-semantic-highlight-func-mode)
(add-to-list 'semantic-default-submodes 'global-semanticdb-minor-mode)
;; Activate semantic
(semantic-mode 1)
(semantic-load-enable-excessive-code-helpers)
(semanticdb-enable-gnu-global-databases 'c-mode t)
(semanticdb-enable-gnu-global-databases 'c++-mode t)
(require 'semantic/ia)
(require 'semantic/bovine/gcc)
(semantic-add-system-include wx-base-dir 'c++-mode)
(semantic-add-system-include wx-base-dir 'c-mode)
;; preprocessor macro
(add-to-list 'semantic-lex-c-preprocessor-symbol-map '("WXDLLEXPORT" . ""))
(add-to-list 'semantic-lex-c-preprocessor-symbol-map '("WXDLLIMPEXP_CORE" . ""))
(add-to-list 'semantic-lex-c-preprocessor-symbol-map
'("WXDLLIMPEXP_FWD_CORE" . ""))
(add-to-list 'semantic-lex-c-preprocessor-symbol-map '("WXDLLIMPEXP_BASE" . ""))
(add-to-list 'semantic-lex-c-preprocessor-symbol-map
'("WXDLLIMPEXP_FWD_BASE" . ""))
(add-to-list 'semantic-lex-c-preprocessor-symbol-map
'("WXDLLIMPEXP_FWD_XML" . ""))
(add-to-list 'semantic-lex-c-preprocessor-symbol-map '("WXDLLIMPEXP_ADV" . ""))
;; load contrib library
(require 'eassist)
;; 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)
(when (cedet-ectag-version-check t)
(semantic-load-enable-primary-ectags-support))
;; include files for wxwidgets
(semantic-add-system-include "/usr/include/wx-2.8" 'c++-mode)
;; Implicitly adding the header files to get completion working
;; Adding all include files in gtk directory
(DE-imply-includes-in-directory "/usr/include/wx-2.8/wx/gtk")
;; SRecode
(global-srecode-minor-mode 1)
And the problem is the following:
Debugger entered--Lisp error: (void-variable
semantic-lex-c-preprocessor-symbol-map)
add-to-list(semantic-lex-c-preprocessor-symbol-map ("WXDLLEXPORT" . ""))
eval-buffer(#<buffer *load*> nil "/home/piotr/.emacs" nil t) ;
Reading at buffer position 2829
load-with-code-conversion("/home/piotr/.emacs" "/home/piotr/.emacs" t t)
load("~/.emacs" t t)
W/o add-to-list 'semantic-lex-c-preprocessor-symbol-map directives,
everything is working OK... Any ideas?
TIA,
Piotr
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk