Function: semantic-get-local-variables-c++-mode
semantic-get-local-variables-c++-mode is a byte-compiled function
defined in c.el.gz.
Signature
(semantic-get-local-variables-c++-mode)
Documentation
Do what semantic-get-local-variables does, plus add this if needed.
Override semantic-get-local-variables in c++-mode buffers.
Source Code
;; Defined in /usr/src/emacs/lisp/cedet/semantic/bovine/c.el.gz
(define-mode-local-override semantic-get-local-variables c++-mode ()
"Do what `semantic-get-local-variables' does, plus add `this' if needed."
(let* ((origvar (semantic-get-local-variables-default))
(ct (semantic-current-tag))
(p (when (semantic-tag-of-class-p ct 'function)
(or (semantic-tag-function-parent ct)
(car-safe (semantic-find-tags-by-type
"class" (semantic-find-tag-by-overlay)))))))
;; If we have a function parent, then that implies we can
(if p
;; Append a new tag THIS into our space.
(cons (semantic-tag-new-variable "this" p nil :pointer 1)
origvar)
;; No parent, just return the usual
origvar)))