summaryrefslogtreecommitdiff
path: root/lisp/cedet/semantic/ia.el
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2009-09-02 04:37:10 +0000
committerChong Yidong <cyd@stupidchicken.com>2009-09-02 04:37:10 +0000
commit3d9d848682f41fff87e19103f8b12968e9ba14e3 (patch)
tree539829ab1ccb272794f923ef0ec5538d4d789a55 /lisp/cedet/semantic/ia.el
parent5fcb5c7e2aa0e7f2ade1228fe17ae06d554894dc (diff)
downloademacs-3d9d848682f41fff87e19103f8b12968e9ba14e3.tar.gz
lisp/Makefile.in: Ignore CEDET subdirectories when making subdirs.el.
lisp/emacs-lisp/autoload.el (generated-autoload-feature): New var. (autoload-rubric): Use it. lisp/cedet/semantic/adebug.el (data-debug-insert-find-results-button): Require db-find. lisp/cedet/semantic/analyze.el: Require semantic/tag. Don't declare autoloaded functions. lisp/cedet/semantic/chart.el: Don't declare autoloaded functions. lisp/cedet/semantic/complete.el: eval-when-compile semantic/find for macro. (semantic-collector-calculate-completions-raw): Require semantic/db-find. lisp/cedet/semantic/ctxt.el (semantic-up-context): Require semantic/find. Don't require it at top-level. lisp/cedet/semantic/db-ebrowse.el (semanticdb-ebrowse-dump): Require data-debug. Don't require it at top-level. Don't require semantic/sort. lisp/cedet/semantic/db-find.el: Add local vars for autoloading. Don't require semantic/tag-file and semantic/sort. (semanticdb-find-default-throttle, semanticdb-find-result-length) (semanticdb-find-result-nth, semanticdb-find-result-nth-in-buffer) (semanticdb-find-tags-by-name, semanticdb-find-tags-for-completion) (semanticdb-find-translate-path, semanticdb-find-table-for-include): Autoload. lisp/cedet/semantic/db-ref.el: Require semantic and semantic/tag. (semanticdb-ref-test): Require data-debug. Don't require it at top-level. lisp/cedet/semantic/db-typecache.el: Require semantic and semantic/tag. Declare semantic-sort-tags-by-name-then-type-increasing and semantic-scope-tag-clone-with-scope. eval-when-compile semantic/find for semantic-find-tags-by-* macros. Add local vars for autoloading. (semanticdb-typecache-find): Autoload. lisp/cedet/semantic/db.el: Add local vars for autoloading. (semanticdb-current-database, semanticdb-current-table) (semanticdb-file-table-object): Autoload. lisp/cedet/semantic/decorate.el: Don't requirements for autoloaded functions. lisp/cedet/semantic/doc.el: Add local vars for autoloading. (semantic-documentation-for-tag): Autoload. lisp/cedet/semantic/edit.el: Drop requirements for autoloaded functions. lisp/cedet/semantic/find.el: Add local vars for autoloading. (semantic-current-tag, semantic-find-tag-by-overlay) (semantic-find-first-tag-by-name): Autoload. lisp/cedet/semantic/format.el: Add local vars for autoloading. (semantic-format-tag-name, semantic-format-tag-custom-list) (semantic-format-tag-functions): Autoload. lisp/cedet/semantic/fw.el: Require semantic/loaddefs. lisp/cedet/semantic/html.el (semantic-html-recursive-combobulate-list): Use assoc-string instead of assoc-case. lisp/cedet/semantic/ia.el (semantic-ia-insert-tag): Move up to avoid compiler error. (semantic-ia-complete-symbol-menu): Require imenu. (semantic-ia-fast-jump): Require semantic/decorate/include. lisp/cedet/semantic/idle.el: Require semantic and semantic/tag. Declare semanticdb-typecache-refresh-for-buffer and eldoc-message. eval-when-compile semantic/find for semantic-find-tags-by-name macro. lisp/cedet/semantic/sort.el: Add local vars for autoloading. (semantic-flatten-tags-table, semantic-tag-external-member-parent): Autoload. lisp/cedet/semantic/tag-file.el: Add local vars for autoloading. (semantic-go-to-tag, semantic-dependency-tag-file): Autoload. lisp/cedet/semantic/tag-ls.el: Add local vars for autoloading. (semantic-tag-prototype-p): Autoload. lisp/cedet/semantic/tag.el: Don't declare autoloaded functions. lisp/cedet/semantic/analyze/complete.el: Add local variables for autoloading. (semantic-analyze-possible-completions): Autoload. lisp/cedet/semantic/analyze/fcn.el: Require mode-local.
Diffstat (limited to 'lisp/cedet/semantic/ia.el')
-rw-r--r--lisp/cedet/semantic/ia.el51
1 files changed, 30 insertions, 21 deletions
diff --git a/lisp/cedet/semantic/ia.el b/lisp/cedet/semantic/ia.el
index 5db798685e2..d060f478424 100644
--- a/lisp/cedet/semantic/ia.el
+++ b/lisp/cedet/semantic/ia.el
@@ -42,6 +42,8 @@
(require 'semantic/analyze)
(require 'semantic/analyze/refs))
+(declare-function imenu--mouse-menu "imenu")
+
;;; Code:
;;; COMPLETION
@@ -63,6 +65,30 @@ of semantic tag names that provide logical completions from that
location.")
(make-variable-buffer-local 'semantic-ia-cache)
+;;; COMPLETION HELPER
+;;
+;; This overload function handles inserting a tag
+;; into a buffer for these local completion routines.
+;;
+;; By creating the functions as overloadable, it can be
+;; customized. For example, the default will put a paren "("
+;; character after function names. For Lisp, it might check
+;; to put a "(" in front of a function name.
+
+(define-overloadable-function semantic-ia-insert-tag (tag)
+ "Insert TAG into the current buffer based on completion.")
+
+(defun semantic-ia-insert-tag-default (tag)
+ "Insert TAG into the current buffer based on completion."
+ (insert (semantic-tag-name tag))
+ (let ((tt (semantic-tag-class tag)))
+ (cond ((eq tt 'function)
+ (insert "("))
+ (t nil))))
+
+(declare-function semantic-analyze-possible-completions
+ "semantic/analyze/complete")
+
(defun semantic-ia-get-completions (context point)
"Fetch the completion of CONTEXT at POINT.
Supports caching."
@@ -143,6 +169,7 @@ Completion options are calculated with `semantic-analyze-possible-completions'."
"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))
)
@@ -176,27 +203,6 @@ Completion options are calculated with `semantic-analyze-possible-completions'."
(semantic-ia-insert-tag ans))
))))
-;;; COMPLETION HELPER
-;;
-;; This overload function handles inserting a tag
-;; into a buffer for these local completion routines.
-;;
-;; By creating the functions as overloadable, it can be
-;; customized. For example, the default will put a paren "("
-;; character after function names. For Lisp, it might check
-;; to put a "(" in front of a function name.
-
-(define-overloadable-function semantic-ia-insert-tag (tag)
- "Insert TAG into the current buffer based on completion.")
-
-(defun semantic-ia-insert-tag-default (tag)
- "Insert TAG into the current buffer based on completion."
- (insert (semantic-tag-name tag))
- (let ((tt (semantic-tag-class tag)))
- (cond ((eq tt 'function)
- (insert "("))
- (t nil))))
-
;;; Completions Tip
;;
;; This functions shows how to get the list of completions,
@@ -290,6 +296,8 @@ This helper manages the mark, buffer switching, and pulsing."
(pulse-momentary-highlight-one-line (point))
)
+(declare-function semantic-decoration-include-visit "semantic/decorate/include")
+
(defun semantic-ia-fast-jump (point)
"Jump to the tag referred to by the code at POINT.
Uses `semantic-analyze-current-context' output to identify an accurate
@@ -338,6 +346,7 @@ origin of the code at point."
((semantic-tag-of-class-p (semantic-current-tag) 'include)
;; Just borrow this cool fcn.
+ (require 'semantic/decorate/include)
(semantic-decoration-include-visit)
)