lisp/cedet/semantic/analyze.el: Add local vars for autoloading.
authorChong Yidong <cyd@stupidchicken.com>
Thu, 3 Sep 2009 03:58:13 +0000 (03:58 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Thu, 3 Sep 2009 03:58:13 +0000 (03:58 +0000)
(semantic-analyze-current-context): Autoload.

lisp/cedet/semantic/ctxt.el: Add local vars for autoloading.
Don't eval-when-compile semantic/db
(semantic-ctxt-current-mode): Autoload.
(semantic-up-context): Require semantic/find.

lisp/cedet/semantic/find.el (semantic-current-tag-parent)
(semantic-find-tags-by-scope-protection): Autoload.

lisp/cedet/semantic/format.el (semantic-format-tag-prototype)
(semantic-format-tag-summarize): Autoload.

lisp/cedet/semantic/idle.el: Declare external functions.
(semantic-idle-work-for-one-buffer, semantic-idle-work-core-handler):
Require semantic/db-mode.
(semantic-idle-work-core-handler): Synch to upstream.
(semantic-idle-scheduler-refresh-tags): Require semantic/decorate/mode.
(semantic-idle-summary-find-current-symbol-tag): Require semantic/db-find.
(semantic-idle-summary-current-symbol-info-context): Require
semantic/analyze.
(semantic-idle-summary-maybe-highlight, semantic-idle-tag-highlight):
Require pulse.
(semantic-idle-completion-list-default): Require semantic/complete.

lisp/cedet/semantic/lex-spp.el: Require semantic.
(semantic-lex-spp-analyzer-push-tokens-for-symbol): Synch to upstream.
(semantic-lex-spp-first-token-arg-list): Use split-string.

lisp/cedet/semantic/lex.el: Declare semantic-elapsed-time.
Add local vars for autoloading.
(semantic-lex-test): Require semantic.
(semantic-lex): Autoload.
(semantic-flex): Use semantic-lex-keyword-p to avoid compiler warning.

lisp/cedet/semantic/sb.el: Require semantic/sort.
Declare semanticdb-minor-mode-p.
(semantic-sb-fetch-tag-table): Require semantic/db-mode.

lisp/cedet/semantic/scope.el: eval-when-compile semantic/find.
Declare external functions.
(semantic-analyze-scope-nested-tags-default): Require semantic/analyze.
(semantic-analyze-show): Require semantic/analyze.
(semantic-calculate-scope): Require semantic/db-typecache.

lisp/cedet/semantic/sort.el: Add local vars for autoloading.
Declare semanticdb-find-tags-external-children-of-type.
(semantic-flatten-tags-table, semantic-tag-external-member-parent):
Autoload.
(semantic-tag-external-member-children-default): Require semantic/db-find.

lisp/cedet/semantic/symref.el: Require semantic.
Declare data-debug-new-buffer and data-debug-insert-object-slots.
(semantic-symref-data-debug-last-result): Require eieio-datadebug.

lisp/cedet/semantic/tag-file.el: Declare external functions.
(semantic-go-to-tag): Call semanticdb-table-child-p only if
semantic/db is loaded.
(semantic-dependency-tag-file): Require semantic/dep.

lisp/cedet/semantic/tag-ls.el: Require semantic.
Add local variables for autoloading.
(semantic-tag-prototype-p): Autoload.

lisp/cedet/semantic/tag-write.el: Require semantic.

lisp/cedet/semantic/tag.el: Update external function declarations and
requirements, removing autoloaded functions.
Add local vars for autoloading.
(semantic-tag-components): Autoload.

lisp/cedet/semantic/texi.el: Declare lookup-words.
eval-when-compile semantic/find.

lisp/cedet/semantic/util.el: Update file header.

lisp/cedet/semantic/analyze/complete.el: Add local variables for autoloading.
(semantic-analyze-possible-completions, semantic-analyze-type-constants):
Autoload.

18 files changed:
lisp/cedet/semantic/analyze.el
lisp/cedet/semantic/analyze/complete.el
lisp/cedet/semantic/ctxt.el
lisp/cedet/semantic/find.el
lisp/cedet/semantic/format.el
lisp/cedet/semantic/idle.el
lisp/cedet/semantic/lex-spp.el
lisp/cedet/semantic/lex.el
lisp/cedet/semantic/sb.el
lisp/cedet/semantic/scope.el
lisp/cedet/semantic/sort.el
lisp/cedet/semantic/symref.el
lisp/cedet/semantic/tag-file.el
lisp/cedet/semantic/tag-ls.el
lisp/cedet/semantic/tag-write.el
lisp/cedet/semantic/tag.el
lisp/cedet/semantic/texi.el
lisp/cedet/semantic/util.el

index 23c6169..933e0b2 100644 (file)
@@ -466,6 +466,7 @@ to provide a large number of non-cached analysis for filtering symbols."
 ;;
 ;; Create a full-up context analysis.
 ;;
+;;;###autoload
 (define-overloadable-function semantic-analyze-current-context (&optional position)
   "Analyze the current context at optional POSITION.
 If called interactively, display interesting information about POSITION
@@ -765,4 +766,9 @@ CONTEXT's content is described in `semantic-analyze-current-context'."
 
 (provide 'semantic/analyze)
 
+;; Local variables:
+;; generated-autoload-file: "loaddefs.el"
+;; generated-autoload-feature: semantic/loaddefs
+;; End:
+
 ;;; semantic/analyze.el ends here
index ee0a807..a44100b 100644 (file)
@@ -37,6 +37,7 @@
 ;;; Helper Fcns
 ;;
 ;;
+;;;###autoload
 (define-overloadable-function semantic-analyze-type-constants (type)
   "For the tag TYPE, return any constant symbols of TYPE.
 Used as options when completing.")
index 852bd24..3aac514 100644 (file)
@@ -576,6 +576,7 @@ Assume a functional typed language.  Uses very simple rules."
        '(type)
        ))))
 
+;;;###autoload
 (define-overloadable-function semantic-ctxt-current-mode (&optional point)
   "Return the major mode active at POINT.
 POINT defaults to the value of point in current buffer.
@@ -611,4 +612,9 @@ overriden."
 
 (provide 'semantic/ctxt)
 
+;; Local variables:
+;; generated-autoload-file: "loaddefs.el"
+;; generated-autoload-feature: semantic/loaddefs
+;; End:
+
 ;;; semantic/ctxt.el ends here
index a8351ba..3d14303 100644 (file)
@@ -175,6 +175,7 @@ If there are more than one in the same location, return the
 smallest tag.  Return nil if there is no tag here."
   (car (nreverse (semantic-find-tag-by-overlay))))
 
+;;;###autoload
 (defun semantic-current-tag-parent ()
   "Return the current tags parent in the current buffer.
 A tag's parent would be a containing structure, such as a type
@@ -329,6 +330,7 @@ Used in completion."
     (semantic-tag-type-compound-p (car tags))
     ,table))
 
+;;;###autoload
 (define-overloadable-function semantic-find-tags-by-scope-protection (scopeprotection parent &optional table)
   "Find all tags accessable by SCOPEPROTECTION.
 SCOPEPROTECTION is a symbol which can be returned by the method
index 52cd0f8..d6d6625 100644 (file)
@@ -104,6 +104,7 @@ 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.")
 
+;;;###autoload
 (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.
@@ -420,6 +421,7 @@ This is a simple C like default."
 (semantic-alias-obsolete
  'semantic-summerize-nonterminal 'semantic-format-tag-summarize)
 
+;;;###autoload
 (define-overloadable-function semantic-format-tag-summarize (tag &optional parent color)
   "Summarize TAG in a reasonable way.
 Optional argument PARENT is the parent type if TAG is a detail.
index 51f4f88..49cd38c 100644 (file)
 ;; For the semantic-find-tags-by-name macro.
 (eval-when-compile (require 'semantic/find))
 
-(declare-function semanticdb-typecache-refresh-for-buffer "semantic/db-typecache")
 (declare-function eldoc-message "eldoc")
+(declare-function semantic-analyze-interesting-tag "semantic/analyze")
+(declare-function semantic-complete-analyze-inline-idle "semantic/complete")
+(declare-function semanticdb-deep-find-tags-by-name "semantic/db-find")
+(declare-function semanticdb-minor-mode-p "semantic/db-mode")
+(declare-function semanticdb-save-all-db-idle "semantic/db")
+(declare-function semanticdb-typecache-refresh-for-buffer "semantic/db-typecache")
+(declare-function semantic-decorate-flush-pending-decorations
+                 "semantic/decorate/mode")
+(declare-function pulse-momentary-highlight-region "pulse")
+(declare-function pulse-momentary-highlight-overlay "pulse")
 
 ;;; Code:
 
@@ -358,6 +367,7 @@ Returns t of all processing succeeded."
          (semantic-safe "Idle Work Including Error: %S"
            ;; Get the include related path.
            (when (and (featurep 'semantic/db)
+                      (require 'semantic/db-mode)
                       (semanticdb-minor-mode-p))
              (require 'semantic/db-find)
              (semanticdb-find-translate-path buffer nil)
@@ -408,21 +418,22 @@ Uses `semantic-idle-work-for-on-buffer' to do the work."
                   ))
               )
 
-            ;; Save everything.
-            (semanticdb-save-all-db-idle)
+            (when (and (featurep 'semantic/db)
+                       (require 'semantic/db-mode)
+                       (semanticdb-minor-mode-p))
+              ;; Save everything.
+              (semanticdb-save-all-db-idle)
 
-            ;; Parse up files near our active buffer
-            (when semantic-idle-work-parse-neighboring-files-flag
-              (semantic-safe "Idle Work Parse Neighboring Files: %S"
-                (when (and (featurep 'semantic/db)
-                           (semanticdb-minor-mode-p))
+              ;; Parse up files near our active buffer
+              (when semantic-idle-work-parse-neighboring-files-flag
+                (semantic-safe "Idle Work Parse Neighboring Files: %S"
                   (set-buffer cb)
                   (semantic-idle-scheduler-work-parse-neighboring-files))
                 t)
-              )
 
-            ;; Save everything... again
-            (semanticdb-save-all-db-idle)
+              ;; Save everything... again
+              (semanticdb-save-all-db-idle)
+              )
 
             ;; Done w/ processing
             nil))))
@@ -582,6 +593,7 @@ Does nothing if the current buffer doesn't need reparsing."
 
     ;; After updating the tags, handle any pending decorations for this
     ;; buffer.
+    (require 'semantic/decorate/mode)
     (semantic-decorate-flush-pending-decorations (current-buffer))
     ))
 
@@ -716,7 +728,9 @@ Some useful functions are found in `semantic-format-tag-functions'."
   "Search for a semantic tag with name SYM in database tables.
 Return the tag found or nil if not found.
 If semanticdb is not in use, use the current buffer only."
-  (car (if (and (featurep 'semantic/db) semanticdb-current-database)
+  (car (if (and (featurep 'semantic/db)
+               semanticdb-current-database
+               (require 'semantic/db-find))
            (cdar (semanticdb-deep-find-tags-by-name sym))
          (semantic-deep-find-tags-by-name sym (current-buffer)))))
 
@@ -744,6 +758,7 @@ Use the semantic analyzer to find the symbol information."
                      (semantic-analyze-current-context (point))
                    (error nil))))
     (when analysis
+      (require 'semantic/analyze)
       (semantic-analyze-interesting-tag analysis))))
 
 (defun semantic-idle-summary-current-symbol-info-default ()
@@ -844,6 +859,7 @@ current tag to display information."
   "Perhaps add highlighting onto TAG.
 TAG was found as the thing under point.  If it happens to be
 visible, then highlight it."
+  (require 'pulse)
   (let* ((region (when (and (semantic-tag-p tag)
                            (semantic-tag-with-position-p tag))
                   (semantic-tag-overlay tag)))
@@ -896,6 +912,7 @@ visible, then highlight it."
   "Highlight the tag, and references of the symbol under point.
 Call `semantic-analyze-current-context' to find the reference tag.
 Call `semantic-symref-hits-in-region' to identify local references."
+  (require 'pulse)
   (when (semantic-idle-summary-useful-context-p)
     (let* ((ctxt (semantic-analyze-current-context))
           (Hbounds (when ctxt (oref ctxt bounds)))
@@ -945,6 +962,7 @@ Call `semantic-symref-hits-in-region' to identify local references."
                 nil))
              )
          ;; Use idle version.
+         (require 'semantic/complete)
          (semantic-complete-analyze-inline-idle)
          )
       (error nil))
index b25a344..39258f5 100644 (file)
@@ -67,6 +67,7 @@
 ;; NN_END
 ;;
 
+(require 'semantic)
 (require 'semantic/lex)
 
 ;;; Code:
@@ -719,7 +720,7 @@ Disable this only to prevent recursive expansion issues.")
 (defun semantic-lex-spp-analyzer-push-tokens-for-symbol (str beg end)
   "Push lexical tokens for the symbol or keyword STR.
 STR occurs in the current buffer between BEG and END."
-  (let (sym val)
+  (let (sym val count)
     (cond
      ;;
      ;; It is a macro.  Prepare for a replacement.
@@ -785,8 +786,8 @@ STR occurs in the current buffer between BEG and END."
             (symbolp (car token))
             (eq 'semantic-list (car token)))
     ;; Convert TOKEN in place.
-    (let ((argsplit (cedet-split-string (semantic-lex-token-text token)
-                                       "[(), ]" t)))
+    (let ((argsplit (split-string (semantic-lex-token-text token)
+                                 "[(), ]" t)))
       (setcar token 'spp-arg-list)
       (setcar (nthcdr 1 token) argsplit))
     ))
index 9768a1e..09b31b7 100644 (file)
@@ -672,10 +672,13 @@ when finding unterminated syntax.")
 
 ;;; Interactive testing commands
 
+(declare-function semantic-elapsed-time "semantic")
+
 (defun semantic-lex-test (arg)
   "Test the semantic lexer in the current buffer.
 If universal argument ARG, then try the whole buffer."
   (interactive "P")
+  (require 'semantic)
   (let* ((start (current-time))
         (result (semantic-lex
                  (if arg (point-min) (point))
@@ -996,6 +999,8 @@ This is an exhaustively robust check."
        (numberp (nth 2 thing)))
   )
 
+(eval-and-compile
+
 (defun semantic-lex-expand-block-specs (specs)
   "Expand block specifications SPECS into a Lisp form.
 SPECS is a list of (BLOCK BEGIN END) elements where BLOCK, BEGIN, and
@@ -1024,6 +1029,7 @@ an END token class is encountered."
                        (car semantic-lex-token-stream))))
           (cond ,@(nreverse form))))
       )))
+)
 
 (defmacro semantic-lex-push-token (token &rest blockspecs)
   "Push TOKEN in the lexical analyzer token stream.
@@ -1070,6 +1076,7 @@ See also the function `semantic-lex-token'."
     (modify-syntax-entry
      (car mod) (nth 1 mod) semantic-lex-syntax-table)))
 
+;;;###autoload
 (define-overloadable-function semantic-lex (start end &optional depth length)
   "Lexically analyze text in the current buffer between START and END.
 Optional argument DEPTH indicates at what level to scan over entire
@@ -1975,7 +1982,7 @@ return LENGTH tokens."
          ((looking-at "\\(\\sw\\|\\s_\\)+")
           (setq ts (cons (cons
                           ;; Get info on if this is a keyword or not
-                          (or (semantic-flex-keyword-p (match-string 0))
+                          (or (semantic-lex-keyword-p (match-string 0))
                               'symbol)
                           (cons (match-beginning 0) (match-end 0)))
                          ts)))
@@ -2092,4 +2099,9 @@ return LENGTH tokens."
 
 (provide 'semantic/lex)
 
+;; Local variables:
+;; generated-autoload-file: "loaddefs.el"
+;; generated-autoload-feature: semantic/loaddefs
+;; End:
+
 ;;; semantic-lex.el ends here
index f1a6beb..3bbe9f9 100644 (file)
@@ -34,9 +34,9 @@
 (require 'semantic)
 (require 'semantic/util)
 (require 'speedbar)
-;; (require 'inversion)
-;; (eval-and-compile
-;;   (inversion-require 'speedbar "0.15beta1"))
+(require 'semantic/sort)
+
+(declare-function semanticdb-minor-mode-p "semantic/db-mode")
 
 (defcustom semantic-sb-autoexpand-length 1
   "*Length of a semantic bucket to autoexpand in place.
@@ -382,7 +382,9 @@ to create much wiser decisions about how to sort and group these items."
   "Load FILE into a buffer, and generate tags using the Semantic parser.
 Returns the tag list, or t for an error."
   (let ((out nil))
-    (if (and (featurep 'semanticdb) (semanticdb-minor-mode-p)
+    (if (and (featurep 'semantic/db)
+            (require 'semantic/db-mode)
+            (semanticdb-minor-mode-p)
             (not speedbar-power-click)
             ;; If the database is loaded and running, try to get
             ;; tokens from it.
index c89bd79..603fdc2 100644 (file)
 (require 'semantic/analyze/fcn)
 (require 'semantic/ctxt)
 
+(eval-when-compile (require 'semantic/find)) ; For semantic-find-* macros
+
+(declare-function data-debug-show "eieio-datadebug")
+(declare-function semantic-analyze-find-tag "semantic/analyze")
+(declare-function semantic-analyze-princ-sequence "semantic/analyze")
+(declare-function semanticdb-typecache-merge-streams "semantic/db-typecache")
+(declare-function semanticdb-typecache-add-dependant "semantic/db-typecache")
 
 ;;; Code:
 
@@ -175,6 +182,7 @@ types available.")
 (defun semantic-analyze-scoped-types-default (position)
   "Return a list of types currently in scope at POSITION.
 Use `semantic-ctxt-scoped-types' to find types."
+  (require 'semantic/db-typecache)
   (save-excursion
     (goto-char position)
     (let ((code-scoped-types nil))
@@ -221,6 +229,7 @@ Optional SCOPETYPES are additional scoped entities in which our parent might
 be found.
 This only finds ONE immediate parent by name.  All other parents returned
 are from nesting data types."
+  (require 'semantic/analyze)
   (save-excursion
     (if position (goto-char position))
     (let* ((stack (reverse (semantic-find-tag-by-overlay (point))))
@@ -576,6 +585,7 @@ type."
   "Map all parents of TYPE to FCN.  Return tags of all the types.
 Argument SCOPE specify additional tags that are in scope
 whose tags can be searched when needed, OR it may be a scope object."
+  (require 'semantic/analyze)
   (let* (;; PARENTS specifies only the superclasses and not
         ;; interfaces.  Inheriting from an interfaces implies
         ;; you have a copy of all methods locally.  I think.
@@ -647,8 +657,9 @@ If POINT is not provided, then use the current location of point.
 The class returned from the scope calculation is variable
 `semantic-scope-cache'."
   (interactive)
-  (if (not (and (featurep 'semanticdb) semanticdb-current-database))
+  (if (not (and (featurep 'semantic/db) semanticdb-current-database))
       nil ;; Don't do anything...
+    (require 'semantic/db-typecache)
     (if (not point) (setq point (point)))
     (when (interactive-p)
       (semantic-fetch-tags)
@@ -714,6 +725,7 @@ The class returned from the scope calculation is variable
        (semanticdb-typecache-add-dependant scopecache)
        ;; Handy debug output.
        (when (interactive-p)
+         (require 'eieio-datadebug)
          (data-debug-show scopecache)
          )
        ;; Return ourselves
@@ -783,6 +795,7 @@ hits in order, with the first tag being in the closest scope."
 ;;
 (defmethod semantic-analyze-show ((context semantic-scope-cache))
   "Insert CONTEXT into the current buffer in a nice way."
+  (require 'semantic-analyze)
   (semantic-analyze-princ-sequence (oref context scopetypes) "-> ScopeTypes: " )
   (semantic-analyze-princ-sequence (oref context parents) "-> Parents: " )
   (semantic-analyze-princ-sequence (oref context scope) "-> Scope: " )
index 39ebda7..df4374c 100644 (file)
 (require 'semantic)
 (require 'semantic/db)
 (eval-when-compile
-  (require 'semantic/find)
-  (require 'semantic/db-find))
+  (require 'semantic/find))
+
+(declare-function semanticdb-find-tags-external-children-of-type
+                 "semantic/db-find")
 
 ;;; Alphanumeric sorting
 ;;
@@ -547,7 +549,8 @@ Optional argument USEDB specifies if the semantic database is used.
 See `semantic-tag-external-member-children' for details."
   (if (and usedb
           (fboundp 'semanticdb-minor-mode-p)
-          (semanticdb-minor-mode-p))
+          (semanticdb-minor-mode-p)
+          (require 'semantic/db-find))
       (let ((m (semanticdb-find-tags-external-children-of-type
                (semantic-tag-name tag))))
        (if m (apply #'append (mapcar #'cdr m))))
index f3a2d90..98bc7dd 100644 (file)
 ;;
 ;; Your tool should then create an instance of `semantic-symref-result'.
 
-(require 'semantic/fw)
+(require 'semantic)
 ;; (require 'ede)
-(eval-when-compile (require 'data-debug)
-                  (require 'eieio-datadebug))
+
+(declare-function data-debug-new-buffer "data-debug")
+(declare-function data-debug-insert-object-slots "eieio-datadebug")
 
 ;;; Code:
 (defvar semantic-symref-tool 'detect
@@ -134,6 +135,7 @@ ARGS are the initialization arguments to pass to the created class."
 (defun semantic-symref-data-debug-last-result ()
   "Run the last symref data result in Data Debug."
   (interactive)
+  (require 'eieio-datadebug)
   (if semantic-symref-last-result
       (progn
        (data-debug-new-buffer "*Symbol Reference ADEBUG*")
index cd2d073..5dd3c0f 100644 (file)
@@ -1,4 +1,4 @@
-;;; tag-file.el --- Routines that find files based on tags.
+;;; semantic/tag-file.el --- Routines that find files based on tags.
 
 ;;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007,
 ;;; 2008, 2009 Free Software Foundation, Inc.
 
 (require 'semantic/tag)
 
+(declare-function semanticdb-table-child-p "semantic/db")
+(declare-function semanticdb-get-buffer "semantic/db")
+(declare-function semantic-dependency-find-file-on-path "semantic/dep")
+
 ;;; Code:
 
 ;;; Location a TAG came from.
@@ -55,7 +59,8 @@ PARENT can also be a `semanticdb-table' object."
          ;; Tag had nothing, and the parent only has a file-name, then
          ;; find that file, and switch to that buffer.
          (set-buffer (find-file-noselect (semantic-tag-file-name parent))))
-        ((and parent (semanticdb-table-child-p parent))
+        ((and parent (featurep 'semantic/db)
+              (semanticdb-table-child-p parent))
          (set-buffer (semanticdb-get-buffer parent)))
         (t
          ;; Well, just assume things are in the current buffer.
@@ -151,6 +156,7 @@ Depends on `semantic-dependency-include-path' for searching.  Always searches
                ;;  (semantic--tag-get-property tag 'dependency-file)
                (:override
                 (save-excursion
+                  (require 'semantic/dep)
                   (semantic-dependency-find-file-on-path
                    tag-fname (semantic-tag-include-system-p tag))))
                ;; )
@@ -206,4 +212,4 @@ file prototypes belong in."
 ;; generated-autoload-feature: semantic/loaddefs
 ;; End:
 
-;;; semantic-tag-file.el ends here
+;;; semantic/tag-file.el ends here
index b80ed46..272c64f 100644 (file)
@@ -1,4 +1,4 @@
-;;; tag-ls.el --- Language Specific override functions for tags
+;;; semantic/tag-ls.el --- Language Specific override functions for tags
 
 ;;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2007, 2008
 ;;; Free Software Foundation, Inc.
@@ -30,7 +30,7 @@
 ;; itself.  These are the functions that languages can use to derive
 ;; the information.
 
-(require 'semantic/tag)
+(require 'semantic)
 
 ;;; Code:
 
@@ -278,4 +278,4 @@ Return the name of TAG found in the toplevel STREAM."
 ;; generated-autoload-feature: semantic/loaddefs
 ;; End:
 
-;;; semantic-tag-ls.el ends here
+;;; semantic/tag-ls.el ends here
index fb27e54..2f83677 100644 (file)
@@ -1,4 +1,4 @@
-;;; tag-write.el --- Write tags to a text stream
+;;; semantic/tag-write.el --- Write tags to a text stream
 
 ;; Copyright (C) 2008, 2009 Free Software Foundation, Inc.
 
@@ -31,7 +31,7 @@
 ;; that they conform to good semantic tag hygene.
 ;;
 
-(require 'semantic/tag)
+(require 'semantic)
 
 ;;; Code:
 (defun semantic-tag-write-one-tag (tag &optional indent)
@@ -183,4 +183,4 @@ The VALUE is a list of tags."
 
 
 (provide 'semantic/tag-write)
-;;; semantic-tag-write.el ends here
+;;; semantic/tag-write.el ends here
index 13232ec..fa920df 100644 (file)
 (require 'semantic/fw)
 (require 'semantic/lex)
 
-(declare-function semantic-ctxt-current-mode "semantic/ctxt")
 (declare-function semantic-analyze-split-name "semantic/analyze/fcn")
 (declare-function semantic-fetch-tags "semantic")
 (declare-function semantic-clear-toplevel-cache "semantic")
-(declare-function semantic-documentation-for-tag "semantic/doc")
-(declare-function semantic-format-tag-prototype "semantic/format")
-(declare-function semantic-format-tag-summarize "semantic/format")
-(declare-function semantic-format-tag-name "semantic/format")
 
 (defconst semantic-tag-version "2.0pre7"
   "Version string of semantic tags made with this code.")
@@ -217,7 +212,6 @@ If TAG has a :mode property return it.
 If point is inside TAG bounds, return the major mode active at point.
 Return the major mode active at beginning of TAG otherwise.
 See also the function `semantic-ctxt-current-mode'."
-  (require 'semantic/find)
   (or tag (setq tag (semantic-current-tag)))
   (or (semantic--tag-get-property tag :mode)
       (let ((buffer (semantic-tag-buffer tag))
@@ -229,7 +223,6 @@ See also the function `semantic-ctxt-current-mode'."
           ;; beginning of TAG.
           (or (and (>= (point) start) (< (point) end))
               (goto-char start))
-          (require 'semantic/ctxt)
           (semantic-ctxt-current-mode)))))
 
 (defsubst semantic--tag-attributes-cdr (tag)
@@ -968,6 +961,7 @@ Return nil if TAG is not of class 'alias."
 
 ;;; Language Specific Tag access via overload
 ;;
+;;;###autoload
 (define-overloadable-function semantic-tag-components (tag)
   "Return a list of components for TAG.
 A Component is a part of TAG which itself may be a TAG.
@@ -1297,7 +1291,6 @@ Signal an error if not."
   "Return a copy of TAG as a foreign tag, or nil if it can't be done.
 TAG defaults to the tag at point in current buffer.
 See also `semantic-foreign-tag-p'."
-  (require 'semantic/doc)
   (or tag (setq tag (semantic-current-tag)))
   (when (semantic-tag-p tag)
     (let ((ftag (semantic-tag-copy tag nil t))
@@ -1326,14 +1319,12 @@ The default behavior assumes the current buffer is a language file,
 and attempts to insert a prototype/function call."
   ;; Long term goal: Have a mechanism for a tempo-like template insert
   ;; for the given tag.
-  (require 'semantic/format)
   (insert (semantic-format-tag-prototype foreign-tag)))
 
 (define-overloadable-function semantic-insert-foreign-tag (foreign-tag)
   "Insert FOREIGN-TAG into the current buffer.
 Signal an error if FOREIGN-TAG is not a valid foreign tag.
 This function is overridable with the symbol `insert-foreign-tag'."
-  (require 'semantic/format)
   (semantic-foreign-tag-check foreign-tag)
   (:override)
   (message (semantic-format-tag-summarize foreign-tag)))
@@ -1342,13 +1333,11 @@ This function is overridable with the symbol `insert-foreign-tag'."
 (define-mode-local-override semantic-insert-foreign-tag
   log-edit-mode (foreign-tag)
   "Insert foreign tags into log-edit mode."
-  (require 'semantic/format)
   (insert (concat "(" (semantic-format-tag-name foreign-tag) "): ")))
 
 (define-mode-local-override semantic-insert-foreign-tag
   change-log-mode (foreign-tag)
   "Insert foreign tags into log-edit mode."
-  (require 'semantic/format)
   (insert (concat "(" (semantic-format-tag-name foreign-tag) "): ")))
 
 \f
@@ -1576,4 +1565,9 @@ and `semantic-tag-type-interfaces' instead")
 
 (provide 'semantic/tag)
 
+;; Local variables:
+;; generated-autoload-file: "loaddefs.el"
+;; generated-autoload-feature: semantic/loaddefs
+;; End:
+
 ;;; semantic-tag.el ends here
index 798c02f..2248e4e 100644 (file)
@@ -1,4 +1,4 @@
-;;; texi.el --- Semantic details for Texinfo files
+;;; semantic/texi.el --- Semantic details for Texinfo files
 
 ;;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009
 ;;; Free Software Foundation, Inc.
   (require 'semantic/db)
   (require 'semantic/db-find)
   (require 'semantic/ctxt)
+  (require 'semantic/find)
 ;;  (require 'semantic/imenu)
   (require 'semantic/doc)
 ;;  (require 'senator)
 )
 
+(declare-function lookup-words "ispell")
+
 (defvar semantic-texi-super-regex
   "^@\\(top\\|chapter\\|\\(sub\\)*section\\|unnumbered\\(\\(sub\\)*sec\\)?\\|\
 \\(chap\\|\\(sub\\)+\\|major\\)?heading\\|appendix\\(\\(sub\\)*sec\\)?\\|\
@@ -379,7 +382,7 @@ Optional argument POINT is where to look for the environment."
         (prefixclass (semantic-ctxt-current-class-list))
         )
     (when prefix
-      (require 'semantic-analyze)
+      (require 'semantic/analyze)
       (semantic-analyze-context
        "Context-for-texinfo"
        :buffer (current-buffer)
@@ -487,7 +490,7 @@ that start with that symbol."
           ;; When EDE is active, ask it.
           (ede-documentation-files)
           )
-         ((and (featurep 'semanticdb) (semanticdb-minor-mode-p))
+         ((and (featurep 'semantic/db) (semanticdb-minor-mode-p))
           ;; See what texinfo files we have loaded in the database
           (let ((tabs (semanticdb-get-database-tables
                        semanticdb-current-database))
@@ -528,7 +531,7 @@ Note: TYPE not yet implemented."
 The current buffer must be a texinfo file containing TAG.
 If TAG is nil, determine a tag based on the current position."
   (interactive)
-  (unless (or (featurep 'semanticdb) (semanticdb-minor-mode-p))
+  (unless (or (featurep 'semantic/db) (semanticdb-minor-mode-p))
     (error "Texinfo updating only works when `semanticdb' is being used"))
   (semantic-fetch-tags)
   (unless tag
@@ -645,7 +648,7 @@ manual, and update that."
   "Jump to the source for the definition in the texinfo file TAG.
 If TAG is nil, it is derived from the deffn under POINT."
   (interactive)
-  (unless (or (featurep 'semanticdb) (semanticdb-minor-mode-p))
+  (unless (or (featurep 'semantic/db) (semanticdb-minor-mode-p))
     (error "Texinfo updating only works when `semanticdb' is being used"))
   (semantic-fetch-tags)
   (unless tag
@@ -675,4 +678,4 @@ If TAG is nil, it is derived from the deffn under POINT."
 
 (provide 'semantic/texi)
 
-;;; semantic-texi.el ends here
+;;; semantic/texi.el ends here
index 5a6755f..37bb562 100644 (file)
@@ -1,4 +1,4 @@
-;;; util.el --- Utilities for use with semantic tag tables
+;;; semantic/util.el --- Utilities for use with semantic tag tables
 
 ;;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007,
 ;;; 2008, 2009 Free Software Foundation, Inc.
@@ -434,4 +434,4 @@ NOTFIRST indicates that this was not the first call in the recursive use."
 ;;
 (require 'semantic/util-modes)
 
-;;; semantic-util.el ends here
+;;; semantic/util.el ends here