From 9a594ee6eadd63fbf9daa69b701401c86aeddf01 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 5 Dec 2009 22:01:00 +0000 Subject: * bindings.el (complete-symbol): Call semantic-ia-complete-symbol if possible. * cedet/semantic/ia.el (semantic-ia-complete-symbol): Make argument optional. --- lisp/cedet/semantic/ia.el | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'lisp/cedet/semantic') 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 -- cgit v1.2.1