]> code.delx.au - gnu-emacs/commitdiff
cedet/semantic/chart.el: Don't require semantic/find.
authorChong Yidong <cyd@stupidchicken.com>
Mon, 31 Aug 2009 02:16:34 +0000 (02:16 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Mon, 31 Aug 2009 02:16:34 +0000 (02:16 +0000)
cedet/semantic/complete.el: Don't require semantic/find.

cedet/semantic/decorate.el: Require semantic/tag-file.
(semantic-set-tag-folded-isearch): Require semantic/find.

cedet/semantic/dep.el: Change semantic--dependency-find-file-on-path
into a macro, to avoid compiler warning.
Defvar ede-minor-mode and ede-object.
Declare ede-system-include-path.

cedet/semantic/doc.el: Require semantic/tag-file and semantic/find.

cedet/semantic/edit.el: Require semantic/find and semantic/format.

cedet/semantic/find.el: Defvar semantic-case-fold.
Require semantic.
(semantic-find-tags-external-children-of-type): Require semantic/sort.
(semantic-find-tags-by-scope-protection-default): Require semantic/tag-ls.

cedet/semantic/format.el: Require semantic/tag-ls.
eval-when-compile semantic/find.
(semantic-format-tag-name): Move up to avoid compiler error.
(semantic-format-tag-prototype): Move up to avoid compiler error.
(semantic--format-tag-parent-tree): Require semantic/tag-file.
(semantic-format-tag-short-doc-default): Require semantic/doc.

lisp/cedet/semantic/chart.el
lisp/cedet/semantic/complete.el
lisp/cedet/semantic/db-find.el
lisp/cedet/semantic/decorate.el
lisp/cedet/semantic/dep.el
lisp/cedet/semantic/doc.el
lisp/cedet/semantic/edit.el
lisp/cedet/semantic/find.el
lisp/cedet/semantic/format.el

index 124227d7782d7e8c36971a41a84800814dba0a50..d92012128625285dea8afaa0845ee4fc1d79061d 100644 (file)
@@ -28,7 +28,6 @@
 
 (require 'chart)
 (require 'semantic)
-(require 'semantic/find)
 (require 'semantic/db-mode)
 (require 'semantic/db-typecache)
 (require 'semantic/scope)
index c721d42c888a7af004aceebaa1c599b2f5605d64..f0fd80e088721b72e4be150becad4d254f272481 100644 (file)
 (require 'eieio)
 (require 'eieio-opt)
 (require 'semantic/tag-file)
-(require 'semantic/find)
 (require 'semantic/analyze)
 (require 'semantic/format)
 (require 'semantic/ctxt)
index d81d5c1cadd3112aa67c04b02708be5e864dba50..65028545ed030301c02dc1cf1081fac3e34f362d 100644 (file)
 (require 'semantic/db-ref)
 (eval-when-compile
   (require 'eieio)
-  )
-
-(require 'semantic/find)
+  (require 'semantic/find))
 
 (require 'semantic/tag-file)
 (require 'semantic/sort)
index 18fd6b599ed14e83cab252eb923b3050fceab720..ba86176f000249de00e2cfe2cfa9947fbd94bf63 100644 (file)
@@ -29,6 +29,7 @@
 ;;
 
 (require 'semantic)
+(require 'semantic/tag-file)
 (require 'pulse)
 
 ;;; Code:
@@ -304,9 +305,12 @@ nil implies the tag should be fully shown."
                       'semantic-set-tag-folded-isearch)))
          ))
 
+(declare-function semantic-current-tag "semantic/find")
+
 (defun semantic-set-tag-folded-isearch (overlay)
   "Called by isearch if it discovers text in the folded region.
 OVERLAY is passed in by isearch."
+  (require 'semantic/find)
   (semantic-set-tag-folded (semantic-current-tag) nil)
   )
 
index 4c67c6674f28cf454038f6a23dc0dab7bc248bd0..aa860c13764f5f1183534550de5ffce8abf546c2 100644 (file)
@@ -1,4 +1,4 @@
-;;; dep.el --- Methods for tracking dependencies (include files)
+;;; semantic/dep.el --- Methods for tracking dependencies (include files)
 
 ;;; Copyright (C) 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
 
@@ -178,25 +178,21 @@ macro `defcustom-mode-local-semantic-dependency-system-include-path'."
 ;;; PATH SEARCH
 ;;
 ;; methods for finding files on a provided path.
-(if (fboundp 'locate-file)
-    (defsubst semantic--dependency-find-file-on-path (file path)
-      "Return an expanded file name for FILE on PATH."
-      (locate-file file path))
-
-  ;; Else, older version of Emacs.
-
-  (defsubst semantic--dependency-find-file-on-path (file path)
-    "Return an expanded file name for FILE on PATH."
-    (let ((p path)
-         (found nil))
-      (while (and p (not found))
-        (let ((f (expand-file-name file (car p))))
-         (if (file-exists-p f)
-             (setq found f)))
-        (setq p (cdr p)))
-      found))
-
-  )
+(defmacro semantic--dependency-find-file-on-path (file path)
+  (if (fboundp 'locate-file)
+      `(locate-file ,file ,path)
+    `(let ((p ,path)
+          (found nil))
+       (while (and p (not found))
+        (let ((f (expand-file-name ,file (car p))))
+          (if (file-exists-p f)
+              (setq found f)))
+        (setq p (cdr p)))
+       found)))
+
+(defvar ede-minor-mode)
+(defvar ede-object)
+(declare-function ede-system-include-path "ede")
 
 (defun semantic-dependency-find-file-on-path (file systemp &optional mode)
   "Return an expanded file name for FILE on available paths.
@@ -225,4 +221,4 @@ provided mode, not from the current major mode."
 
 (provide 'semantic/dep)
 
-;;; semantic-dep.el ends here
+;;; semantic/dep.el ends here
index 9018449721f2c0df844404c33e7ed89179b88d29..b5574548abce93f16a1ac2570fcd5c0e2dcb633e 100644 (file)
@@ -1,4 +1,4 @@
-;;; doc.el --- Routines for documentation strings
+;;; semantic/doc.el --- Routines for documentation strings
 
 ;;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2005, 2008, 2009
 ;;; Free Software Foundation, Inc.
@@ -30,6 +30,8 @@
 ;; the symbol on the same line.
 
 (require 'semantic/tag)
+(require 'semantic/tag-file)
+(require 'semantic/find)
 
 ;;; Code:
 
@@ -125,4 +127,4 @@ If NOSNARF is 'lex, then return the lex token."
 
 (provide 'semantic/doc)
 
-;;; semantic-doc.el ends here
+;;; semantic/doc.el ends here
index af3b23a3600137a5ec6f33312595fdbc57b6f101..580d7ba253dea89bcd726748f40d05342f49abba 100644 (file)
@@ -1,4 +1,4 @@
-;;; semantic-edit.el --- Edit Management for Semantic
+;;; semantic/edit.el --- Edit Management for Semantic
 
 ;;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
 ;;; 2007, 2008, 2009 Free Software Foundation, Inc.
@@ -59,7 +59,8 @@
 
 ;;
 (require 'semantic)
-;; (require 'working)
+(require 'semantic/find)
+(require 'semantic/format)
 
 ;;; Code:
 (defvar semantic-after-partial-cache-change-hook nil
@@ -962,4 +963,4 @@ lost if not transferred into NEWTAG."
 
 (provide 'semantic/edit)
 
-;;; semantic-edit.el ends here
+;;; semantic/edit.el ends here
index a01b2ae2b223f3f3d2e60f2c3ad63bf723190ddf..4751c3e1c2afc12b70d7ef6155967644436c811c 100644 (file)
@@ -1,4 +1,4 @@
-;;; find.el --- Search routines for Semantic
+;;; semantic/find.el --- Search routines for Semantic
 
 ;;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009
 ;;; Free Software Foundation, Inc.
@@ -44,6 +44,7 @@
 ;;
 ;; 4) ...
 
+(require 'semantic)
 (require 'semantic/tag)
 
 ;;; Code:
@@ -335,6 +336,8 @@ See `semantic-tag-protected-p' for details on which tags are returned."
                                     semantic-tag-class type))
     (:override)))
 
+(declare-function semantic-tag-protected-p "semantic/tag-ls")
+
 (defun semantic-find-tags-by-scope-protection-default
   (scopeprotection parent &optional table)
   "Find all tags accessable by SCOPEPROTECTION.
@@ -348,6 +351,7 @@ See `semantic-tag-protected-p' for details on which tags are returned."
     (if (not table) (setq table (semantic-tag-type-members parent)))
     (if (null scopeprotection)
        table
+      (require 'semantic/tag-ls)
       (semantic--find-tags-by-macro
        (not (semantic-tag-protected-p (car tags) scopeprotection parent))
        table)))
@@ -389,10 +393,13 @@ attempting to do completions."
 
 ;;; Specialty Searches
 ;;
+(declare-function semantic-tag-external-member-parent "semantic/sort")
+
 (defun semantic-find-tags-external-children-of-type (type &optional table)
   "Find all tags in whose parent is TYPE in TABLE.
 These tags are defined outside the scope of the original TYPE declaration.
 TABLE is a tag table.  See `semantic-something-to-tag-table'."
+  (require 'semantic/sort)
   (semantic--find-tags-by-macro
    (equal (semantic-tag-external-member-parent (car tags))
          type)
@@ -792,4 +799,4 @@ Optional argument ARG is the number of iterations to run."
 
 (provide 'semantic/find)
 
-;;; semantic-find.el ends here
+;;; semantic/find.el ends here
index ad6523f4fa8c6e7f9df4e26663daff3ffa7cb976..2e4f16a509bb5e0352b4bbc266b03f07290410d7 100644 (file)
@@ -1,4 +1,4 @@
-;;; format.el --- Routines for formatting tags
+;;; semantic/format.el --- Routines for formatting tags
 
 ;;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007,
 ;;; 2008, 2009 Free Software Foundation, Inc.
 ;;
 
 ;;; Code:
-(eval-when-compile (require 'font-lock))
+(require 'semantic)
 (require 'semantic/tag)
+(require 'semantic/tag-ls)
 (require 'ezimage)
 
+(eval-when-compile
+  (require 'font-lock)
+  (require 'semantic/find))
+
 ;;; Tag to text overload functions
 ;;
 ;; abbreviations, prototypes, and coloring support.
@@ -90,11 +95,27 @@ Images can be used as icons instead of some types of text strings."
   "Text used to separate names when between namespaces/classes and functions.")
 (make-variable-buffer-local 'semantic-format-parent-separator)
 
+(define-overloadable-function semantic-format-tag-name (tag &optional parent color)
+  "Return the name string describing TAG.
+The name is the shortest possible representation.
+Optional argument PARENT is the parent type if TAG is a detail.
+Optional argument COLOR means highlight the prototype with font-lock colors.")
+
+(define-overloadable-function semantic-format-tag-prototype (tag &optional parent color)
+  "Return a prototype for TAG.
+This function should be overloaded, though it need not be used.
+This is because it can be used to create code by language independent
+tools.
+Optional argument PARENT is the parent type if TAG is a detail.
+Optional argument COLOR means highlight the prototype with font-lock colors.")
+
+
 (defun semantic-test-all-format-tag-functions (&optional arg)
   "Test all outputs from `semantic-format-tag-functions'.
 Output is generated from the function under `point'.
 Optional argument ARG specifies not to use color."
   (interactive "P")
+  (require 'semantic/find)
   (semantic-fetch-tags)
   (let* ((tag (semantic-current-tag))
         (par (semantic-current-tag-parent))
@@ -274,12 +295,6 @@ of FACE-CLASS for which this is used."
              (stringp (car anything)))
         (semantic--format-colorize-text (car anything) colorhint))))
 
-(define-overloadable-function semantic-format-tag-name (tag &optional parent color)
-  "Return the name string describing TAG.
-The name is the shortest possible representation.
-Optional argument PARENT is the parent type if TAG is a detail.
-Optional argument COLOR means highlight the prototype with font-lock colors.")
-
 (defun semantic-format-tag-name-default (tag &optional parent color)
   "Return an abbreviated string describing TAG.
 Optional argument PARENT is the parent type if TAG is a detail.
@@ -294,6 +309,8 @@ Optional argument COLOR means highlight the prototype with font-lock colors."
        (setq name (semantic--format-colorize-text name (semantic-tag-class tag))))
     name))
 
+(declare-function semantic-go-to-tag "semantic/tag-file")
+
 (defun semantic--format-tag-parent-tree (tag parent)
   "Under Consideration.
 
@@ -311,6 +328,7 @@ local definitions."
     ;; is nil because there isn't one.
     (setq parent (or (semantic-tag-function-parent tag)
                     (save-excursion
+                      (require 'semantic/tag-file)
                       (semantic-go-to-tag tag)
                       (semantic-current-tag-parent)))))
   (when (stringp parent)
@@ -449,10 +467,13 @@ Optional argument COLOR means highlight the prototype with font-lock colors."
 Optional argument PARENT is the parent type if TAG is a detail.
 Optional argument COLOR means highlight the prototype with font-lock colors.")
 
+(declare-function semantic-documentation-for-tag "semantic/doc")
+
 (defun semantic-format-tag-short-doc-default (tag &optional parent color)
   "Display a short form of TAG's documentation.  (Comments, or docstring.)
 Optional argument PARENT is the parent type if TAG is a detail.
 Optional argument COLOR means highlight the prototype with font-lock colors."
+
   (let* ((fname (or (semantic-tag-file-name tag)
                    (when parent (semantic-tag-file-name parent))))
         (buf (or (semantic-tag-buffer tag)
@@ -464,6 +485,7 @@ Optional argument COLOR means highlight the prototype with font-lock colors."
       (setq buf (find-file-noselect fname))
       (setq doc (semantic-tag-docstring tag buf)))
     (when (not doc)
+      (require 'semantic/doc)
       (setq doc (semantic-documentation-for-tag tag))
       )
     (setq doc
@@ -482,14 +504,6 @@ Optional argument COLOR means highlight the prototype with font-lock colors."
 
 ;;; Prototype generation
 ;;
-(define-overloadable-function semantic-format-tag-prototype (tag &optional parent color)
-  "Return a prototype for TAG.
-This function should be overloaded, though it need not be used.
-This is because it can be used to create code by language independent
-tools.
-Optional argument PARENT is the parent type if TAG is a detail.
-Optional argument COLOR means highlight the prototype with font-lock colors.")
-
 (defun semantic-format-tag-prototype-default (tag &optional parent color)
   "Default method for returning a prototype for TAG.
 This will work for C like languages.
@@ -771,4 +785,4 @@ Optional argument COLOR means highlight the prototype with font-lock colors."
 
 (provide 'semantic/format)
 
-;;; semantic-format.el ends here
+;;; semantic/format.el ends here