Function: semantic-ia-sb-complete
semantic-ia-sb-complete is a byte-compiled function defined in
ia-sb.el.gz.
Signature
(semantic-ia-sb-complete TEXT TAG INDENT)
Documentation
At point in the attached buffer, complete the symbol clicked on.
TEXT TAG and INDENT are the details.
Source Code
;; Defined in /usr/src/emacs/lisp/cedet/semantic/ia-sb.el.gz
(defun semantic-ia-sb-complete (_text tag _indent)
"At point in the attached buffer, complete the symbol clicked on.
TEXT TAG and INDENT are the details."
;; Find the specified bounds from the current analysis.
(speedbar-select-attached-frame)
(unwind-protect
(let* ((a (semantic-analyze-current-context (point)))
(bounds (oref a bounds))
(movepoint nil)
)
(save-excursion
(if (and (<= (point) (cdr bounds)) (>= (point) (car bounds)))
(setq movepoint t))
(goto-char (car bounds))
(delete-region (car bounds) (cdr bounds))
(insert (semantic-tag-name tag))
(if movepoint (setq movepoint (point)))
;; I'd like to use this to add fancy () or what not at the end
;; but we need the parent file which requires an upgrade to the
;; analysis tool.
;;(semantic-insert-foreign-tag tag ??))
)
(if movepoint
(let ((cf (selected-frame)))
(speedbar-select-attached-frame)
(goto-char movepoint)
(select-frame cf))))
(select-frame speedbar-frame)))