summaryrefslogtreecommitdiff
path: root/lisp/cedet/semantic/ia.el
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2009-12-05 22:01:00 +0000
committerChong Yidong <cyd@stupidchicken.com>2009-12-05 22:01:00 +0000
commit9a594ee6eadd63fbf9daa69b701401c86aeddf01 (patch)
treef8f4ee76e4aa4232def6190e45fa7d475882cedc /lisp/cedet/semantic/ia.el
parent212c5aef95f68f8fb8af05df2af19374f0ab7867 (diff)
downloademacs-9a594ee6eadd63fbf9daa69b701401c86aeddf01.tar.gz
* bindings.el (complete-symbol): Call semantic-ia-complete-symbol if
possible. * cedet/semantic/ia.el (semantic-ia-complete-symbol): Make argument optional.
Diffstat (limited to 'lisp/cedet/semantic/ia.el')
-rw-r--r--lisp/cedet/semantic/ia.el12
1 files changed, 7 insertions, 5 deletions
diff --git a/lisp/cedet/semantic/ia.el b/lisp/cedet/semantic/ia.el
index 573f9fa867f..b0ae6301185 100644
--- a/lisp/cedet/semantic/ia.el
+++ b/lisp/cedet/semantic/ia.el
@@ -105,19 +105,21 @@ Supports caching."
symbols))
;;;###autoload
-(defun semantic-ia-complete-symbol (point)
- "Complete the current symbol at POINT.
+(defun semantic-ia-complete-symbol (&optional pos)
+ "Complete the current symbol at POS.
+If POS is nil, default to point.
Completion options are calculated with `semantic-analyze-possible-completions'."
(interactive "d")
+ (or pos (setq pos (point)))
;; Calculating completions is a two step process.
;;
;; The first analyzer the current context, which finds tags
;; for all the stuff that may be references by the code around
- ;; POINT.
+ ;; POS.
;;
;; The second step derives completions from that context.
- (let* ((a (semantic-analyze-current-context point))
- (syms (semantic-ia-get-completions a point))
+ (let* ((a (semantic-analyze-current-context pos))
+ (syms (semantic-ia-get-completions a pos))
(pre (car (reverse (oref a prefix))))
)
;; If PRE was actually an already completed symbol, it doesn't