Hi,
You need to just
(require 'c++-mode)
before hand, or add your customizations into hook, such as this one:
(defun my-cmode-hook ()
"Setup local quick-complete commands."
(local-set-key "." 'semantic-complete-self-insert)
(local-set-key ">" 'semantic-complete-self-insert))
(add-hook 'c-mode-common-hook 'my-cmode-hook)
which is nice in that it doesn't mess with the mode-map for C++ mode
directly.
Eric
On 07/24/2012 06:52 PM, Manfred Bartz wrote:
> I have two new key bindings in my .emacs _after_ all the standard
> CEDET init and setup.
>
> ;; toggle between .cpp and .h files
> (define-key c++-mode-map (kbd "<f12>") 'eassist-switch-h-cpp)
>
> ;; show list of all possible completions in separate window
> (define-key c++-mode-map (kbd "<f11>") 'semantic-complete-analyze-inline)
>
> The bindings fail with "Symbol's value as variable is void: c++-mode-map".
> However, if I evaluate the key definitions later, they work just fine.
>
> I suspect that c++-mode must be loaded before c++-mode-map is available.
>
> How can I solve this problem?
> Apologies if this is off-topic for CEDET, maybe I need to ask this in c.l.emacs?
>
> --
> Manfred
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> cedet-semantic mailing list
> cedet-semantic@...
> https://lists.sourceforge.net/lists/listinfo/cedet-semantic
>
|