title: I cannot get structure members in auto-completion or tooltips
body: <p>I want autocomplete or company to work with C code and I need structure context level autocomplete i.e if I have a struct:</p>
  
  <pre><code>typefdef struct HOST_ {
  
      IP4_ADDRESS     ip4;
      IP6_ADDRESS     ip6;
      MAC_ADDRESS     mac;    
  } HOST;
  </code></pre>
  
  <p>... and then I have code:</p>
  
  <pre><code>HOST host;
  
  host-&gt;
  </code></pre>
  
  <p>Then if I hit tab then I should get a drop down menu giving me all the (and only the) three options.</p>
  
  <p>This is what I did:</p>
  
  <pre><code>(defun my-tab-del-commands(key-map)
    "This function sets the &lt;tab&gt; and &lt;backspace&gt; keymaps according to the special commands
  that I have set. This needs to be set per mode keymap where it is needed. We cannot 
  use the global keymap because that would override command completion in minibuffer"
  
    ;; Set TAB in  major-mode keymap to "tab-to-tab" stop
    ;; Use tab2tab stop and not just add +4 spaces (tab stop defined by tag-stop-list)
    (define-key key-map (kbd "&lt;tab&gt;")     'tab-to-tab-stop)
  
    ;; Define Key for &lt;backtab&gt;
    (define-key key-map (kbd "&lt;S-tab&gt;")   'backward-move-to-tab-stop)
    (define-key key-map (kbd "&lt;backtab&gt;") 'backward-move-to-tab-stop)
  
    ;; Define C-tab as my-indent-system 
    (define-key key-map (kbd "&lt;C-tab&gt;")   'my-indent-system)
    ;; Also provide a duplicate "\C-ci" in case C-TAB is overridden by any minor mode
    (define-key emacs-lisp-mode-map "\C-ci"   'my-indent-system)
  
    ;; Shift backspace moves by one tab stop till no more whitespace
    (define-key key-map (kbd "&lt;S-backspace&gt;") 'backspace-whitespace-to-tab-stop)
  
    ;; Alt backspace is c-hungry-delete-backwards
    (define-key key-map (kbd "&lt;M-backspace&gt;") 'c-hungry-delete-backwards)
    )
  
  
  ;; Simple Backend of semantic with ede as project manager
  ;; Lets try semantic (CDET) backend for now only.
  ;; Later learn clang or rtags or other big stuff to handle the whole project
  (defun backend:semantic-ede ()
    "Setup for semantic-mode with ede as project management. 
  Simple stuff for starters"
  
    (semantic-mode 1)
  
    (global-semanticdb-minor-mode 1)
    (global-semantic-idle-scheduler-mode 1)
    (setq-mode-local c-mode semanticdb-find-default-throttle
                     '(project unloaded system recursive))
    (semantic-add-system-include my-lp-build-path)
    (semanticdb-enable-gnu-global-databases 'c-mode t)
    (semanticdb-enable-gnu-global-databases 'c++-mode t)
  
    (require 'ede)
    (global-ede-mode)
  
    (let ((makefile (format "%s/Makefile" my-mp-source-path)))
      (when (file-exists-p makefile)
        (ede-cpp-root-project "openflow" :file makefile)))
    )
  
  
  ;; There are two "schools of thought" of intelligent autocomplete
  ;; (a) auto-complete package and (b) company package. 
  
  
  ;; This is auto-complete
  (defun completion:auto-complete ()
    "Setup auto-complete with triggers. We still need to hook with C mode"
  
    ;; Then autocomplete
    (require 'auto-complete)
    (require 'auto-complete-config)
    (global-auto-complete-mode t)
  
    ;; auto complete mod
    ;; should be loaded after yasnippet so that they can work together
  
    (add-to-list 'ac-dictionary-directories "~/.emacs.d/ac-dict")
    (ac-config-default)
  
    (add-hook 'auto-complete-mode-hook 'ac-common-setup)
  
    ;; set the trigger key so that it can work together with yasnippet on tab key,
    ;; if the word exists in yasnippet, pressing tab will cause yasnippet to
    ;; activate, otherwise, auto-complete will
    (ac-set-trigger-key "TAB")
    (ac-set-trigger-key "&lt;tab&gt;")  
    (global-auto-complete-mode t)
  
  )
  
  (defun my-smart-c-auto-complete()
    ;; Now tie up autocomplete with semantic
    ;; Later hook it up to c-mode-hook via c-mode-config func
    (require 'auto-complete-c-headers)
    (add-to-list 'ac-sources 'ac-source-words-in-same-mode-buffers)
    (add-to-list 'ac-sources 'ac-source-dictionary)
    (add-to-list 'ac-sources 'ac-source-abbrev)
  
    (add-to-list 'ac-sources 'ac-source-semantic)
    (add-to-list 'ac-sources 'ac-source-c-headers)
  )
  
  
  ;; This is company
  (defun completion:company ()
      "Setup comany mode"
      (require 'company)
      (add-hook 'after-init-hook 'global-company-mode)
  )
  
  (defun tab-side-story ()
    (interactive)
  
    ;; First load and init Yasnippet - This sets the TAB first to Ysnippet
    ;; This will work on LISP &amp; SHELL SCRIPTS also
  
    ;; (require 'yasnippet)
    ;; (yas-global-mode 1)
  
    ;; Second, use whatever completion mechanism you wanna use auto-complete or company
    ;; This will work on LISP also!
    ;;(completion:auto-complete)
    (completion:company)
  
    ;; Then this function sets tab command 
    (my-tab-del-commands c-mode-base-map)
  
  )
  
  ;; Completion mechanism needs a backend
  (backend:semantic-ede)
  (tab-side-story)
  
  ;; define My Great C style with linux as the parent style (choose google if you wish)
  (c-add-style "my-great-c-style"
               '("linux"              ; use linux as parent style
                 (indent-tabs-mode . nil)     ; tabs are spaces
                 (c-syntactic-indentation . t)    ; auto-syntax
                 (c-syntactic-indentation-in-macros . t) ; ditto for macros
                 (c-tab-always-indent . nil) ; Otherwise our complex TAB will not work!
                 (tab-width   .  4)           ; if there is a &lt;tab&gt; expand to 4 spaces
                 (backward-delete-function . nil)     ; DO NOT expand tabs when deleting
                 (c-continued-statement-offset . 4))) ;continued statement offset 4
  
  
  (defun my-c-mode-config ()
    (c-set-style "my-great-c-style")
    (when (= emacs-major-version 23)
      (gtags-mode 1))
     (when (= emacs-major-version 24)
      (tab-side-story)
      ;; (my-smart-c-auto-complete)
      (ggtags-mode 1)
      (setq ggtags-update-on-save nil))
    (electric-indent-mode)
    (setq c-basic-offset   4)
    (setq c-tab-always-indent nil))
  
  ;; Needs to be hooked - do it here instead of common area 
  (add-hook 'c-mode-hook 'my-c-mode-config)           
  </code></pre>
  
  <p>Sorry for the very long code but most of them are my comments and notes jotted down so far less "code" than it seems. In this I have set it for company mode though I have auto-complete.</p>
  
  <p>Both are not working! Something is clashing with something. </p>