changeset 104444:2bf481006ba4

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.
author Chong Yidong <cyd@stupidchicken.com>
date Wed, 02 Sep 2009 04:37:10 +0000
parents a6c7463e3f20
children 43eb1ff3a976
files lisp/ChangeLog lisp/Makefile.in lisp/cedet/semantic/adebug.el lisp/cedet/semantic/analyze.el lisp/cedet/semantic/analyze/complete.el lisp/cedet/semantic/analyze/fcn.el lisp/cedet/semantic/chart.el lisp/cedet/semantic/complete.el lisp/cedet/semantic/ctxt.el lisp/cedet/semantic/db-ebrowse.el lisp/cedet/semantic/db-find.el lisp/cedet/semantic/db-ref.el lisp/cedet/semantic/db-typecache.el lisp/cedet/semantic/db.el lisp/cedet/semantic/decorate.el lisp/cedet/semantic/doc.el lisp/cedet/semantic/edit.el lisp/cedet/semantic/find.el lisp/cedet/semantic/format.el lisp/cedet/semantic/fw.el lisp/cedet/semantic/html.el lisp/cedet/semantic/ia.el lisp/cedet/semantic/idle.el lisp/cedet/semantic/sort.el lisp/cedet/semantic/tag-file.el lisp/cedet/semantic/tag-ls.el lisp/cedet/semantic/tag.el lisp/emacs-lisp/autoload.el
diffstat 28 files changed, 218 insertions(+), 83 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Mon Aug 31 14:51:12 2009 +0000
+++ b/lisp/ChangeLog	Wed Sep 02 04:37:10 2009 +0000
@@ -1,4 +1,10 @@
-2009-08-22  Chong Yidong  <cyd@stupidchicken.com>
+2009-09-02  Chong Yidong  <cyd@stupidchicken.com>
+
+	* emacs-lisp/autoload.el (generated-autoload-feature): New var.
+	(autoload-rubric): Use it.
+
+	* Makefile.in (setwins): Ignore CEDET subdirectories when making
+	subdirs.el.
 
 	* emacs-lisp/cl-loaddefs.el (deftype): Add autoload for deftype.
 
--- a/lisp/Makefile.in	Mon Aug 31 14:51:12 2009 +0000
+++ b/lisp/Makefile.in	Wed Sep 02 04:37:10 2009 +0000
@@ -91,6 +91,16 @@
 	   esac; \
         done
 
+# Find all subdirectories except `cedet'
+
+setwins_nocedet=subdirs=`(cd $$wd; find . -type d -print)`; \
+	for file in $$subdirs; do \
+	   case $$file in */Old | */RCS | */CVS | */CVS/* | */.* | */.*/* | */=* | */cedet* ) ;; \
+		*) wins="$$wins $$wd/$$file" ;; \
+	   esac; \
+        done
+
+
 # `compile-main' tends to be slower than `recompile' but can be parallelized
 # with "make -j" and results in more deterministic compilation warnings.
 # cus-load and finder-inf are not explicitly requested by anything, so
@@ -143,7 +153,7 @@
 $(lisp)/subdirs.el:
 	$(MAKE) $(MFLAGS) update-subdirs
 update-subdirs: doit
-	wd=$(lisp); $(setwins); \
+	wd=$(lisp); $(setwins_nocedet); \
 	for file in $$wins; do \
 	   $(srcdir)/update-subdirs $$file; \
 	done;
--- a/lisp/cedet/semantic/adebug.el	Mon Aug 31 14:51:12 2009 +0000
+++ b/lisp/cedet/semantic/adebug.el	Wed Sep 02 04:37:10 2009 +0000
@@ -206,10 +206,13 @@
     (goto-char start)
     ))
 
+(declare-function semanticdb-find-result-prin1-to-string "semantic/db-find")
+
 (defun data-debug-insert-find-results-button (findres prefix prebuttontext)
   "Insert a single summary of a find results FINDRES.
 PREFIX is the text that preceeds the button.
 PREBUTTONTEXT is some text between prefix and the find results button."
+  (require 'semantic/db-find)
   (let ((start (point))
 	(end nil)
 	(str (semanticdb-find-result-prin1-to-string findres))
--- a/lisp/cedet/semantic/analyze.el	Mon Aug 31 14:51:12 2009 +0000
+++ b/lisp/cedet/semantic/analyze.el	Wed Sep 02 04:37:10 2009 +0000
@@ -71,13 +71,9 @@
 (require 'semantic/sort)
 (eval-when-compile (require 'semantic/find))
 (require 'semantic/scope)
+(require 'semantic/tag)
 (require 'semantic/analyze/fcn)
 
-;; `semanticdb-typecache-find' autoloads from semantic/db-typecache,
-;; which requires semantic/db-find.
-(declare-function semanticdb-strip-find-results "semantic/db-find")
-(declare-function semanticdb-find-tags-by-name "semantic/db-find")
-
 ;;; Code:
 (defvar semantic-analyze-error-stack nil
   "Collection of any errors thrown during analysis.")
--- a/lisp/cedet/semantic/analyze/complete.el	Mon Aug 31 14:51:12 2009 +0000
+++ b/lisp/cedet/semantic/analyze/complete.el	Wed Sep 02 04:37:10 2009 +0000
@@ -76,7 +76,7 @@
 
 ;;; MAIN completion calculator
 ;;
-;;
+;;;###autoload
 (define-overloadable-function semantic-analyze-possible-completions (context)
   "Return a list of semantic tags which are possible completions.
 CONTEXT is either a position (such as point), or a precalculated
@@ -266,8 +266,11 @@
 
     c))
 
-
-
 (provide 'semantic/analyze/complete)
 
+;; Local variables:
+;; generated-autoload-file: "../loaddefs.el"
+;; generated-autoload-feature: semantic/loaddefs
+;; End:
+
 ;;; semantic/analyze/complete.el ends here
--- a/lisp/cedet/semantic/analyze/fcn.el	Mon Aug 31 14:51:12 2009 +0000
+++ b/lisp/cedet/semantic/analyze/fcn.el	Wed Sep 02 04:37:10 2009 +0000
@@ -25,6 +25,8 @@
 
 ;;; Code:
 
+(require 'mode-local)
+
 ;;; Small Mode Specific Options
 ;;
 ;; These queries allow a major mode to help the analyzer make decisions.
--- a/lisp/cedet/semantic/chart.el	Mon Aug 31 14:51:12 2009 +0000
+++ b/lisp/cedet/semantic/chart.el	Wed Sep 02 04:37:10 2009 +0000
@@ -28,9 +28,14 @@
 
 (require 'chart)
 (require 'semantic)
-(require 'semantic/db-mode)
-(require 'semantic/db-typecache)
-(require 'semantic/scope)
+(require 'semantic/db)
+(require 'semantic/tag)
+
+(eval-when-compile (require 'semantic/find))
+
+;; (require 'semantic/db-mode)
+;; (require 'semantic/db-typecache)
+;; (require 'semantic/scope)
 
 ;;; Code:
 
@@ -63,9 +68,9 @@
 exist in each database entry.
 TAGTABLE is passed to `semantic-something-to-tag-table'."
   (interactive)
-  (if (or (not (fboundp 'semanticdb-minor-mode-p))
-	  (not (semanticdb-minor-mode-p)))
-      (error "Semanticdb is not enabled"))
+  (unless (and (fboundp 'semanticdb-minor-mode-p)
+	       (semanticdb-minor-mode-p))
+    (error "Semanticdb is not enabled"))
   (let* ((db semanticdb-current-database)
 	 (dbt (semanticdb-get-database-tables db))
 	 (names (mapcar 'car
@@ -142,9 +147,14 @@
 		       nums "Complexity (Lines of code)")
     ))
 
+(declare-function semanticdb-get-typecache "semantic/db-typecache")
+(declare-function semantic-calculate-scope "semantic/scope")
+
 (defun semantic-chart-analyzer ()
   "Chart the extent of the context analysis."
   (interactive)
+  (require 'semantic/db-typecache)
+  (require 'semantic/scope)
   (let* ((p (semanticdb-find-translate-path nil nil))
 	 (plen (length p))
 	 (tab semanticdb-current-table)
--- a/lisp/cedet/semantic/complete.el	Mon Aug 31 14:51:12 2009 +0000
+++ b/lisp/cedet/semantic/complete.el	Wed Sep 02 04:37:10 2009 +0000
@@ -109,17 +109,16 @@
 
 (require 'eieio)
 (require 'eieio-opt)
-(require 'semantic/tag-file)
+(require 'semantic)
 (require 'semantic/analyze)
-(require 'semantic/format)
 (require 'semantic/ctxt)
-;; Keep semanticdb optional.
-;; (eval-when-compile
-;;   (require 'semantic/db)
-;;   (require 'semantic/db-find))
 (require 'semantic/decorate)
-(require 'semantic/analyze/complete)
+(require 'semantic/format)
+(require 'semantic/tag)
 
+(eval-when-compile
+  ;; For the semantic-find-tags-for-completion macro.
+  (require 'semantic/find))
 
 (eval-when-compile
   (condition-case nil
@@ -1211,9 +1210,13 @@
   ()
   "Completion engine for tags in a project.")
 
+(declare-function semanticdb-brute-deep-find-tags-for-completion
+		  "semantic/db-find")
+
 (defmethod semantic-collector-calculate-completions-raw
   ((obj semantic-collector-project-brutish) prefix completionlist)
   "Calculate the completions for prefix from completionlist."
+  (require 'semantic/db-find)
   (semanticdb-brute-deep-find-tags-for-completion prefix (oref obj path)))
 
 (defclass semantic-collector-analyze-completions (semantic-collector-abstract)
--- a/lisp/cedet/semantic/ctxt.el	Mon Aug 31 14:51:12 2009 +0000
+++ b/lisp/cedet/semantic/ctxt.el	Wed Sep 02 04:37:10 2009 +0000
@@ -31,7 +31,6 @@
 ;; the current context is calculated.
 ;;
 (require 'semantic)
-(require 'semantic/find)
 
 ;;; Code:
 (defvar semantic-command-separation-character
@@ -50,6 +49,8 @@
 ;;
 ;; These context are nested blocks of code, such as code in an
 ;; if clause
+(declare-function semantic-current-tag-of-class "semantic/find")
+
 (define-overloadable-function semantic-up-context (&optional point bounds-type)
   "Move point up one context from POINT.
 Return non-nil if there are no more context levels.
@@ -59,6 +60,7 @@
 This will find the smallest tag of that class (function, variable,
 type, etc) and make sure non-nil is returned if you cannot
 go up past the bounds of that tag."
+  (require 'semantic/find)
   (if point (goto-char point))
   (let ((nar (semantic-current-tag-of-class (or bounds-type 'function))))
     (if nar
--- a/lisp/cedet/semantic/db-ebrowse.el	Mon Aug 31 14:51:12 2009 +0000
+++ b/lisp/cedet/semantic/db-ebrowse.el	Wed Sep 02 04:37:10 2009 +0000
@@ -57,10 +57,10 @@
   )
 (require 'semantic/db-file)
 (require 'semantic/find)
-(require 'semantic/sort)
-(require 'data-debug)
 
 (declare-function semantic-add-system-include "semantic/dep")
+(declare-function data-debug-new-buffer "data-debug")
+(declare-function data-debug-insert-thing "data-debug")
 
 (eval-and-compile
   ;; Hopefully, this will allow semanticdb-ebrowse to compile under
@@ -698,6 +698,7 @@
 (defun semanticdb-ebrowse-dump ()
   "Find the first loaded ebrowse table, and dump out the contents."
   (interactive)
+  (require 'data-debug)
   (let ((db semanticdb-database-list)
 	(ab nil))
     (while db
--- a/lisp/cedet/semantic/db-find.el	Mon Aug 31 14:51:12 2009 +0000
+++ b/lisp/cedet/semantic/db-find.el	Wed Sep 02 04:37:10 2009 +0000
@@ -121,9 +121,6 @@
   (require 'eieio)
   (require 'semantic/find))
 
-(require 'semantic/tag-file)
-(require 'semantic/sort)
-
 ;;; Code:
 
 (defvar data-debug-thing-alist)
@@ -261,6 +258,7 @@
 ;; These routines needed to be overloaded by specific language modes.
 ;; They are needed for translating an INCLUDE tag into a semanticdb
 ;; TABLE object.
+;;;###autoload
 (define-overloadable-function semanticdb-find-translate-path (path brutish)
   "Translate PATH into a list of semantic tables.
 Path translation involves identifying the PATH input argument
@@ -314,6 +312,7 @@
 	(semanticdb-find-translate-path-brutish-default path)
       (semanticdb-find-translate-path-includes-default path))))
 
+;;;###autoload
 (define-overloadable-function semanticdb-find-table-for-include (includetag &optional table)
   "For a single INCLUDETAG found in TABLE, find a `semanticdb-table' object
 INCLUDETAG is a semantic TAG of class 'include.
@@ -855,6 +854,7 @@
 ;; Once you have a search result, use these routines to operate
 ;; on the search results at a higher level
 
+;;;###autoload
 (defun semanticdb-strip-find-results (results &optional find-file-match)
   "Strip a semanticdb search RESULTS to exclude objects.
 This makes it appear more like the results of a `semantic-find-' call.
@@ -952,6 +952,7 @@
 		      (null tag-to-test))))
 	 )))
 
+;;;###autoload
 (defun semanticdb-find-result-length (result)
   "Number of tags found in RESULT."
   (let ((count 0))
@@ -960,6 +961,7 @@
 	  result)
     count))
 
+;;;###autoload
 (defun semanticdb-find-result-nth (result n)
   "In RESULT, return the Nth search result.
 This is a 0 based search result, with the first match being element 0.
@@ -996,6 +998,7 @@
 	    (error "%d entry is not a tag" i)))
       (setq i (1+ i)))))
 
+;;;###autoload
 (defun semanticdb-find-result-nth-in-buffer (result n)
   "In RESULT, return the Nth search result.
 Like `semanticdb-find-result-nth', except that only the TAG
@@ -1160,6 +1163,7 @@
     ;; It must be reversed.
     (nreverse found)))
 
+;;;###autoload
 (defun semanticdb-find-tags-by-name (name &optional path find-file-match)
   "Search for all tags matching NAME on PATH.
 See `semanticdb-find-translate-path' for details on PATH.
@@ -1170,6 +1174,7 @@
      (semanticdb-find-tags-by-name-method table name tags))
    path find-file-match))
 
+;;;###autoload
 (defun semanticdb-find-tags-by-name-regexp (regexp &optional path find-file-match)
   "Search for all tags matching REGEXP on PATH.
 See `semanticdb-find-translate-path' for details on PATH.
@@ -1180,6 +1185,7 @@
      (semanticdb-find-tags-by-name-regexp-method table regexp tags))
    path find-file-match))
 
+;;;###autoload
 (defun semanticdb-find-tags-for-completion (prefix &optional path find-file-match)
   "Search for all tags matching PREFIX on PATH.
 See `semanticdb-find-translate-path' for details on PATH.
@@ -1190,6 +1196,7 @@
      (semanticdb-find-tags-for-completion-method table prefix tags))
    path find-file-match))
 
+;;;###autoload
 (defun semanticdb-find-tags-by-class (class &optional path find-file-match)
   "Search for all tags of CLASS on PATH.
 See `semanticdb-find-translate-path' for details on PATH.
@@ -1235,6 +1242,7 @@
    path find-file-match))
 
 ;;; Brutish Search Routines
+;;
 (defun semanticdb-brute-deep-find-tags-by-name (name &optional path find-file-match)
   "Search for all tags matching NAME on PATH.
 See `semanticdb-find-translate-path' for details on PATH.
@@ -1363,4 +1371,9 @@
 
 (provide 'semantic/db-find)
 
+;; Local variables:
+;; generated-autoload-file: "loaddefs.el"
+;; generated-autoload-feature: semantic/loaddefs
+;; End:
+
 ;;; semantic/db-find.el ends here
--- a/lisp/cedet/semantic/db-ref.el	Mon Aug 31 14:51:12 2009 +0000
+++ b/lisp/cedet/semantic/db-ref.el	Wed Sep 02 04:37:10 2009 +0000
@@ -37,13 +37,14 @@
 
 ;;; Code:
 (require 'eieio)
-(require 'semantic/db)
-(require 'semantic/util)
+(require 'semantic)
+(require 'semantic/tag)
 
 (defvar semanticdb-find-default-throttle)
 
 ;; For the semantic-find-tags-by-name-regexp macro.
 (eval-when-compile (require 'semantic/find))
+
 (defvar semantic-case-fold)
 
 (defmethod semanticdb-add-reference ((dbt semanticdb-abstract-table)
@@ -157,7 +158,6 @@
 refreshed before dumping the result."
   (interactive "p")
   (require 'data-debug)
-  (require 'semantic/db)
   ;; If we need to refresh... then do so.
   (when refresh
     (semanticdb-refresh-references semanticdb-current-table))
--- a/lisp/cedet/semantic/db-typecache.el	Mon Aug 31 14:51:12 2009 +0000
+++ b/lisp/cedet/semantic/db-typecache.el	Wed Sep 02 04:37:10 2009 +0000
@@ -28,14 +28,21 @@
 ;;
 ;; It is likely this feature will only be needed for C/C++.
 
+(require 'semantic)
 (require 'semantic/db)
 (require 'semantic/db-find)
-(require 'semantic/tag-ls)
+(require 'semantic/tag)
 (require 'semantic/analyze/fcn)
-(require 'semantic/scope)
+
+;; For semantic-find-tags-by-* macros
+(eval-when-compile (require 'semantic/find))
+
+;; (require 'semantic/scope)
 
 (declare-function data-debug-insert-thing "data-debug")
 (declare-function data-debug-new-buffer "data-debug")
+(declare-function semantic-sort-tags-by-name-then-type-increasing "semantic/sort")
+(declare-function semantic-scope-tag-clone-with-scope "semantic/scope")
 
 ;;; Code:
 
@@ -225,6 +232,7 @@
 
     ;; Assume we always have datatypes, as this typecache isn't really
     ;; useful without a typed language.
+    (require 'semantic/sort)
     (let ((S (semantic-sort-tags-by-name-then-type-increasing
 	      ;; I used to use append, but it copied cache1 but not cache2.
 	      ;; Since sort was permuting cache2, I already had to make sure
@@ -365,7 +373,7 @@
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 ;;; Search Routines
-;;
+;;;###autoload
 (define-overloadable-function semanticdb-typecache-find (type &optional path find-file-match)
   "Search the typecache for TYPE in PATH.
 If type is a string, split the string, and search for the parts.
@@ -496,8 +504,10 @@
       (if (and lastans calculated-scope)
 
 	  ;; Put our discovered scope into the tag if we have a tag
-	  (semantic-scope-tag-clone-with-scope
-	   lastans (reverse (cdr calculated-scope)))
+	  (progn
+	    (require 'semantic/scope)
+	    (semantic-scope-tag-clone-with-scope
+	     lastans (reverse (cdr calculated-scope))))
 
 	;; Else, just return
 	lastans
@@ -586,6 +596,11 @@
 
     ))
 
+(provide 'semantic/db-typecache)
 
-(provide 'semantic/db-typecache)
+;; Local variables:
+;; generated-autoload-file: "loaddefs.el"
+;; generated-autoload-feature: semantic/loaddefs
+;; End:
+
 ;;; semanticdb-typecache.el ends here
--- a/lisp/cedet/semantic/db.el	Mon Aug 31 14:51:12 2009 +0000
+++ b/lisp/cedet/semantic/db.el	Wed Sep 02 04:37:10 2009 +0000
@@ -59,10 +59,12 @@
 This can be changed to try out new types of search indicies.")
 (make-variable-buffer-local 'semanticdb-default-find=index-class)
 
+;;;###autoload
 (defvar semanticdb-current-database nil
   "For a given buffer, this is the currently active database.")
 (make-variable-buffer-local 'semanticdb-current-database)
 
+;;;###autoload
 (defvar semanticdb-current-table nil
   "For a given buffer, this is the currently active database table.")
 (make-variable-buffer-local 'semanticdb-current-table)
@@ -849,6 +851,7 @@
   "For FILE, associate DBTABLE in the hash table."
   (puthash file dbtable semanticdb-file-table-hash))
 
+;;;###autoload
 (defun semanticdb-file-table-object (file &optional dontload)
   "Return a semanticdb table belonging to FILE, make it up to date.
 If file has database tags available in the database, return it.
@@ -1010,4 +1013,9 @@
 
 (provide 'semantic/db)
 
+;; Local variables:
+;; generated-autoload-file: "loaddefs.el"
+;; generated-autoload-feature: semantic/loaddefs
+;; End:
+
 ;;; semantic/db.el ends here
--- a/lisp/cedet/semantic/decorate.el	Mon Aug 31 14:51:12 2009 +0000
+++ b/lisp/cedet/semantic/decorate.el	Wed Sep 02 04:37:10 2009 +0000
@@ -29,7 +29,6 @@
 ;;
 
 (require 'semantic)
-(require 'semantic/tag-file)
 (require 'pulse)
 
 ;;; Code:
@@ -310,7 +309,6 @@
 (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)
   )
 
--- a/lisp/cedet/semantic/doc.el	Mon Aug 31 14:51:12 2009 +0000
+++ b/lisp/cedet/semantic/doc.el	Wed Sep 02 04:37:10 2009 +0000
@@ -30,11 +30,10 @@
 ;; the symbol on the same line.
 
 (require 'semantic/tag)
-(require 'semantic/tag-file)
-(require 'semantic/find)
 
 ;;; Code:
 
+;;;###autoload
 (define-overloadable-function semantic-documentation-for-tag (&optional tag nosnarf)
   "Find documentation from TAG and return it as a clean string.
 TAG might have DOCUMENTATION set in it already.  If not, there may be
@@ -127,4 +126,9 @@
 
 (provide 'semantic/doc)
 
+;; Local variables:
+;; generated-autoload-file: "loaddefs.el"
+;; generated-autoload-feature: semantic/loaddefs
+;; End:
+
 ;;; semantic/doc.el ends here
--- a/lisp/cedet/semantic/edit.el	Mon Aug 31 14:51:12 2009 +0000
+++ b/lisp/cedet/semantic/edit.el	Wed Sep 02 04:37:10 2009 +0000
@@ -59,8 +59,6 @@
 
 ;;
 (require 'semantic)
-(require 'semantic/find)
-(require 'semantic/format)
 
 ;;; Code:
 (defvar semantic-after-partial-cache-change-hook nil
--- a/lisp/cedet/semantic/find.el	Mon Aug 31 14:51:12 2009 +0000
+++ b/lisp/cedet/semantic/find.el	Wed Sep 02 04:37:10 2009 +0000
@@ -53,6 +53,8 @@
 ;;
 ;; These routines provide fast access to tokens based on a buffer that
 ;; has parsed tokens in it.  Uses overlays to perform the hard work.
+
+;;;###autoload
 (defun semantic-find-tag-by-overlay (&optional positionormarker buffer)
   "Find all tags covering POSITIONORMARKER by using overlays.
 If POSITIONORMARKER is nil, use the current point.
@@ -79,6 +81,7 @@
       (sort ret (lambda (a b) (< (semantic-tag-start a)
 				 (semantic-tag-start b)))))))
 
+;;;###autoload
 (defun semantic-find-tag-by-overlay-in-region (start end &optional buffer)
   "Find all tags which exist in whole or in part between START and END.
 Uses overlays to determine positin.
@@ -97,6 +100,7 @@
       (sort ret (lambda (a b) (< (semantic-tag-start a)
 				 (semantic-tag-start b)))))))
 
+;;;###autoload
 (defun semantic-find-tag-by-overlay-next (&optional start buffer)
   "Find the next tag after START in BUFFER.
 If START is in an overlay, find the tag which starts next,
@@ -123,6 +127,7 @@
       (when (and ol (semantic-tag-p (semantic-overlay-get ol 'semantic)))
 	(semantic-overlay-get ol 'semantic)))))
 
+;;;###autoload
 (defun semantic-find-tag-by-overlay-prev (&optional start buffer)
   "Find the next tag before START in BUFFER.
 If START is in an overlay, find the tag which starts next,
@@ -152,6 +157,7 @@
 		 (semantic-tag-p (semantic-overlay-get ol 'semantic)))
 	(semantic-overlay-get ol 'semantic)))))
 
+;;;###autoload
 (defun semantic-find-tag-parent-by-overlay (tag)
   "Find the parent of TAG by overlays.
 Overlays are a fast way of finding this information for active buffers."
@@ -162,6 +168,7 @@
     ;; the same start unless they are siblings.
     (car (cdr tag))))
 
+;;;###autoload
 (defun semantic-current-tag ()
   "Return the current tag in the current buffer.
 If there are more than one in the same location, return the
@@ -249,8 +256,9 @@
      (nreverse result)))
 
 ;;; Top level Searches
-;;
-(defsubst semantic-find-first-tag-by-name (name &optional table)
+
+;;;###autoload
+(defun semantic-find-first-tag-by-name (name &optional table)
   "Find the first tag with NAME in TABLE.
 NAME is a string.
 TABLE is a semantic tags table.  See `semantic-something-to-tag-table'.
@@ -399,7 +407,6 @@
   "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)
@@ -796,7 +803,11 @@
 	     (car b-comp))
   ))
 
-
 (provide 'semantic/find)
 
+;; Local variables:
+;; generated-autoload-file: "loaddefs.el"
+;; generated-autoload-feature: semantic/loaddefs
+;; End:
+
 ;;; semantic/find.el ends here
--- a/lisp/cedet/semantic/format.el	Mon Aug 31 14:51:12 2009 +0000
+++ b/lisp/cedet/semantic/format.el	Wed Sep 02 04:37:10 2009 +0000
@@ -45,6 +45,7 @@
 ;;; Tag to text overload functions
 ;;
 ;; abbreviations, prototypes, and coloring support.
+;;;###autoload
 (defvar semantic-format-tag-functions
   '(semantic-format-tag-name
     semantic-format-tag-canonical-name
@@ -70,6 +71,7 @@
 
 (semantic-varalias-obsolete 'semantic-token->text-functions
                             'semantic-format-tag-functions)
+;;;###autoload
 (defvar semantic-format-tag-custom-list
   (append '(radio)
 	  (mapcar (lambda (f) (list 'const f))
@@ -95,6 +97,7 @@
   "Text used to separate names when between namespaces/classes and functions.")
 (make-variable-buffer-local 'semantic-format-parent-separator)
 
+;;;###autoload
 (define-overloadable-function semantic-format-tag-name (tag &optional parent color)
   "Return the name string describing TAG.
 The name is the shortest possible representation.
@@ -785,4 +788,9 @@
 
 (provide 'semantic/format)
 
+;; Local variables:
+;; generated-autoload-file: "loaddefs.el"
+;; generated-autoload-feature: semantic/loaddefs
+;; End:
+
 ;;; semantic/format.el ends here
--- a/lisp/cedet/semantic/fw.el	Mon Aug 31 14:51:12 2009 +0000
+++ b/lisp/cedet/semantic/fw.el	Wed Sep 02 04:37:10 2009 +0000
@@ -31,6 +31,7 @@
 ;;
 (require 'mode-local)
 (require 'eieio)
+(require 'semantic/loaddefs)
 
 ;;; Compatibility
 ;;
--- a/lisp/cedet/semantic/html.el	Mon Aug 31 14:51:12 2009 +0000
+++ b/lisp/cedet/semantic/html.el	Wed Sep 02 04:37:10 2009 +0000
@@ -1,4 +1,4 @@
-;;; html.el --- Semantic details for html files
+;;; semantic/html.el --- Semantic details for html files
 
 ;;; Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
 
@@ -184,8 +184,8 @@
 	  (goto-char (car oldl))
 	  (if (looking-at "<\\(\\w+\\)")
 	      (let* ((word (match-string 1))
-		     (levelmatch (assoc-ignore-case
-                                  word semantic-html-section-list))
+		     (levelmatch (assoc-string
+                                  word semantic-html-section-list t))
 		     text begin tmp
 		     )
 		(when (not levelmatch)
@@ -260,4 +260,4 @@
 
 (provide 'semantic/html)
 
-;;; semantic-html.el ends here
+;;; semantic/html.el ends here
--- a/lisp/cedet/semantic/ia.el	Mon Aug 31 14:51:12 2009 +0000
+++ b/lisp/cedet/semantic/ia.el	Wed Sep 02 04:37:10 2009 +0000
@@ -42,6 +42,8 @@
   (require 'semantic/analyze)
   (require 'semantic/analyze/refs))
 
+(declare-function imenu--mouse-menu "imenu")
+
 ;;; Code:
 
 ;;; COMPLETION
@@ -63,6 +65,30 @@
 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 @@
   "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 @@
 	  (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 @@
   (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 @@
 
      ((semantic-tag-of-class-p (semantic-current-tag) 'include)
       ;; Just borrow this cool fcn.
+      (require 'semantic/decorate/include)
       (semantic-decoration-include-visit)
       )
 
--- a/lisp/cedet/semantic/idle.el	Mon Aug 31 14:51:12 2009 +0000
+++ b/lisp/cedet/semantic/idle.el	Wed Sep 02 04:37:10 2009 +0000
@@ -37,9 +37,18 @@
 ;; automatically caches the created context, so it is shared amongst
 ;; all idle modes that will need it.
 
-(require 'semantic/util-modes)
+(require 'semantic)
+(require 'semantic/ctxt)
+(require 'semantic/tag)
+;(require 'semantic/util-modes)
 (require 'timer)
 
+;; 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")
+
 ;;; Code:
 
 ;;; TIMER RELATED FUNCTIONS
@@ -152,7 +161,8 @@
 idle-scheduler is disabled when debugging or if the buffer size
 exceeds the `semantic-idle-scheduler-max-buffer-size' threshold."
   (and semantic-idle-scheduler-mode
-       (not semantic-debug-enabled)
+       (not (and (boundp 'semantic-debug-enabled)
+		 semantic-debug-enabled))
        (not semantic-lex-debug)
        (or (<= semantic-idle-scheduler-max-buffer-size 0)
 	   (< (buffer-size) semantic-idle-scheduler-max-buffer-size))))
@@ -694,7 +704,6 @@
 ;;; SUMMARY MODE
 ;;
 ;; A mode similar to eldoc using semantic
-(require 'semantic/ctxt)
 
 (defcustom semantic-idle-summary-function
   'semantic-format-tag-summarize-with-file
--- a/lisp/cedet/semantic/sort.el	Mon Aug 31 14:51:12 2009 +0000
+++ b/lisp/cedet/semantic/sort.el	Wed Sep 02 04:37:10 2009 +0000
@@ -236,6 +236,7 @@
 ;; of commands would be better off with a flattened list, where all
 ;; tags appear at the top level.
 
+;;;###autoload
 (defun semantic-flatten-tags-table (&optional table)
   "Flatten the tags table TABLE.
 All tags in TABLE, and all components of top level tags
@@ -463,7 +464,8 @@
 ;;
 ;; In order to adopt external children, we need a few overload methods
 ;; to enable the feature.
-;;
+
+;;;###autoload
 (define-overloadable-function semantic-tag-external-member-parent (tag)
   "Return a parent for TAG when TAG is an external member.
 TAG is an external member if it is defined at a toplevel and
@@ -589,4 +591,9 @@
 
 (provide 'semantic/sort)
 
+;; Local variables:
+;; generated-autoload-file: "loaddefs.el"
+;; generated-autoload-feature: semantic/loaddefs
+;; End:
+
 ;;; semantic-sort.el ends here
--- a/lisp/cedet/semantic/tag-file.el	Mon Aug 31 14:51:12 2009 +0000
+++ b/lisp/cedet/semantic/tag-file.el	Wed Sep 02 04:37:10 2009 +0000
@@ -32,6 +32,7 @@
 
 ;;; Location a TAG came from.
 ;;
+;;;###autoload
 (define-overloadable-function semantic-go-to-tag (tag &optional parent)
   "Go to the location of TAG.
 TAG may be a stripped element, in which case PARENT specifies a
@@ -101,6 +102,7 @@
 ;; Dependencies usually represent a file of some sort.
 ;; Find the file described by a dependency.
 
+;;;###autoload
 (define-overloadable-function semantic-dependency-tag-file (&optional tag)
   "Find the filename represented from TAG.
 Depends on `semantic-dependency-include-path' for searching.  Always searches
@@ -199,4 +201,9 @@
 
 (provide 'semantic/tag-file)
 
+;; Local variables:
+;; generated-autoload-file: "loaddefs.el"
+;; generated-autoload-feature: semantic/loaddefs
+;; End:
+
 ;;; semantic-tag-file.el ends here
--- a/lisp/cedet/semantic/tag-ls.el	Mon Aug 31 14:51:12 2009 +0000
+++ b/lisp/cedet/semantic/tag-ls.el	Wed Sep 02 04:37:10 2009 +0000
@@ -194,6 +194,7 @@
       (setq mods (cdr mods)))
     static))
 
+;;;###autoload
 (define-overloadable-function semantic-tag-prototype-p (tag)
   "Return non nil if TAG is a prototype.
 For some laguages, such as C, a prototype is a declaration of
@@ -270,7 +271,11 @@
 (semantic-alias-obsolete 'semantic-tag-leaf 'semantic-tag-leaf-p)
 (semantic-alias-obsolete 'semantic-tag-abstract 'semantic-tag-abstract-p)
 
-
 (provide 'semantic/tag-ls)
 
+;; Local variables:
+;; generated-autoload-file: "loaddefs.el"
+;; generated-autoload-feature: semantic/loaddefs
+;; End:
+
 ;;; semantic-tag-ls.el ends here
--- a/lisp/cedet/semantic/tag.el	Mon Aug 31 14:51:12 2009 +0000
+++ b/lisp/cedet/semantic/tag.el	Wed Sep 02 04:37:10 2009 +0000
@@ -52,8 +52,6 @@
 (require 'semantic/fw)
 (require 'semantic/lex)
 
-(declare-function semantic-current-tag "semantic/find")
-(declare-function semantic-find-first-tag-by-name "semantic/find")
 (declare-function semantic-ctxt-current-mode "semantic/ctxt")
 (declare-function semantic-analyze-split-name "semantic/analyze/fcn")
 (declare-function semantic-fetch-tags "semantic")
@@ -821,10 +819,8 @@
   "Find the superclass NAME in the list of SUPERS.
 If a simple search doesn't do it, try splitting up the names
 in SUPERS."
-  (require 'semantic/find)
   (let ((stag nil))
     (setq stag (semantic-find-first-tag-by-name name supers))
-
     (when (not stag)
       (require 'semantic/analyze/fcn)
       (dolist (S supers)
--- a/lisp/emacs-lisp/autoload.el	Mon Aug 31 14:51:12 2009 +0000
+++ b/lisp/emacs-lisp/autoload.el	Wed Sep 02 04:37:10 2009 +0000
@@ -42,6 +42,12 @@
 ;;;###autoload
 (put 'generated-autoload-file 'safe-local-variable 'stringp)
 
+(defvar generated-autoload-feature nil
+   "*Feature that `generated-autoload-file' should provide.
+If nil, this defaults to `generated-autoload-file', sans extension.")
+;;;###autoload
+(put 'generated-autoload-feature 'safe-local-variable 'symbolp)
+
 ;; This feels like it should be a defconst, but MH-E sets it to
 ;; ";;;###mh-autoload" for the autoloads that are to go into mh-loaddefs.el.
 (defvar generate-autoload-cookie ";;;###autoload"
@@ -245,7 +251,11 @@
 	    ";;\n"
 	    ";;; Code:\n\n"
 	    "\n"
-	    "(provide '" (file-name-sans-extension basename) ")\n"
+	    "(provide '"
+	    (if (symbolp generated-autoload-feature)
+		(format "%s" generated-autoload-feature)
+	      (file-name-sans-extension basename))
+	    ")\n"
 	    ";; Local Variables:\n"
 	    ";; version-control: never\n"
 	    ";; no-byte-compile: t\n"