changeset 104522:2a2b8ae24b17

* cedet/semantic/symref/list.el: Require semantic/complete. (semantic-symref-symbol): Use semantic-complete-read-tag-buffer-deep. * cedet/semantic/ia.el (semantic-ia-complete-symbol-menu): Remove. (semantic-ia-complete-symbol): Use semantic-complete-symbol.
author Chong Yidong <cyd@stupidchicken.com>
date Sun, 27 Sep 2009 03:59:51 +0000
parents 6d72a8365359
children 18ae68cd64bd
files lisp/ChangeLog lisp/cedet/semantic/ia.el lisp/cedet/semantic/symref/list.el
diffstat 3 files changed, 11 insertions(+), 44 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Sun Sep 27 03:42:03 2009 +0000
+++ b/lisp/ChangeLog	Sun Sep 27 03:59:51 2009 +0000
@@ -1,5 +1,12 @@
 2009-09-27  Chong Yidong  <cyd@stupidchicken.com>
 
+	* cedet/semantic/symref/list.el: Require semantic/complete.
+	(semantic-symref-symbol): Use
+	semantic-complete-read-tag-buffer-deep.
+
+	* cedet/semantic/ia.el (semantic-ia-complete-symbol-menu): Remove.
+	(semantic-ia-complete-symbol): Use semantic-complete-symbol.
+
 	* cedet/semantic/idle.el (semantic-idle-scheduler-work-timer):
 	Change timeout to 1.  Doc fix.
 
--- a/lisp/cedet/semantic/ia.el	Sun Sep 27 03:42:03 2009 +0000
+++ b/lisp/cedet/semantic/ia.el	Sun Sep 27 03:59:51 2009 +0000
@@ -35,7 +35,6 @@
 ;; fast-jump.  For a virtual method, offer some of the possible
 ;; implementations in various sub-classes.
 
-;; (require 'senator)
 (require 'semantic/analyze)
 (require 'semantic/format)
 (require 'pulse)
@@ -137,8 +136,7 @@
 	      ;;
 	      ;; This is a way of making this fcn more useful since the
 	      ;; smart completion engine sometimes failes.
-	      (senator-complete-symbol)
-	      ))
+	      (semantic-complete-symbol)))
       ;; Use try completion to seek a common substring.
       (let ((tc (try-completion (or pre "")  syms)))
 	(if (and (stringp tc) (not (string= tc (or pre ""))))
@@ -167,45 +165,6 @@
   :group 'semantic
   :type semantic-format-tag-custom-list)
 
-;;;###autoload
-(defun semantic-ia-complete-symbol-menu (point)
-  "Complete the current symbol via a menu based at POINT.
-Completion options are calculated with `semantic-analyze-possible-completions'."
-  (interactive "d")
-  (require 'imenu)
-  (let* ((a (semantic-analyze-current-context point))
-	 (syms (semantic-ia-get-completions a point))
-	 )
-    ;; Complete this symbol.
-    (if (not syms)
-	(progn
-	  (message "No smart completions found.  Trying Senator.")
-	  (when (semantic-analyze-context-p a)
-	    ;; This is a quick way of getting a nice completion list
-	    ;; in the menu if the regular context mechanism fails.
-	    (senator-completion-menu-popup)))
-
-      (let* ((menu
-	      (mapcar
-	       (lambda (tag)
-		 (cons
-		  (funcall semantic-ia-completion-menu-format-tag-function tag)
-		  (vector tag)))
-	       syms))
-	     (ans
-	      (imenu--mouse-menu
-	       ;; XEmacs needs that the menu has at least 2 items.  So,
-	       ;; include a nil item that will be ignored by imenu.
-	       (cons nil menu)
-	       (senator-completion-menu-point-as-event)
-	       "Completions")))
-	(when ans
-	  (if (not (semantic-tag-p ans))
-	      (setq ans (aref (cdr ans) 0)))
-	  (delete-region (car (oref a bounds)) (cdr (oref a bounds)))
-	  (semantic-ia-insert-tag ans))
-	))))
-
 ;;; Completions Tip
 ;;
 ;; This functions shows how to get the list of completions,
--- a/lisp/cedet/semantic/symref/list.el	Sun Sep 27 03:42:03 2009 +0000
+++ b/lisp/cedet/semantic/symref/list.el	Sun Sep 27 03:59:51 2009 +0000
@@ -34,6 +34,7 @@
 ;; NOTE: Need to add some refactoring tools.
 
 (require 'semantic/symref)
+(require 'semantic/complete)
 (require 'pulse)
 
 ;;; Code:
@@ -69,8 +70,8 @@
 references are the organized by file and the name of the function
 they are used in.
 Display the references in`semantic-symref-results-mode'"
-  (interactive (list (car (senator-jump-interactive "Symrefs for: " nil nil t)))
-	       )
+  (interactive (list (semantic-tag-name (semantic-complete-read-tag-buffer-deep
+					 "Symrefs for: "))))
   (semantic-fetch-tags)
   (let ((res nil)
 	)