changeset 104447:273e528a9f9b

* emacs-lisp/autoload.el (generated-autoload-load-name): New var. (autoload-generate-file-autoloads): Use it. (make-autoload): Handle define-overloadable-function. * emacs-lisp/lisp-mode.el (define-overloadable-function): Add doc-string-elt property for define-overloadable-function. lisp/cedet/semantic/analyze.el: Add generated-autoload-load-name var. lisp/cedet/semantic/ctxt.el: Add generated-autoload-load-name var. lisp/cedet/semantic/db.el: Add generated-autoload-load-name var. lisp/cedet/semantic/db-file.el: Add generated-autoload-load-name var. lisp/cedet/semantic/db-mode.el: Add generated-autoload-load-name var. lisp/cedet/semantic/db-typecache.el: Add generated-autoload-load-name var. lisp/cedet/semantic/doc.el: Add generated-autoload-load-name var. lisp/cedet/semantic/find.el: Add generated-autoload-load-name var. lisp/cedet/semantic/format.el: Add generated-autoload-load-name var. lisp/cedet/semantic/lex.el: Add generated-autoload-load-name var. lisp/cedet/semantic/sb.el: Require semantic/format. lisp/cedet/semantic/sort.el: Add generated-autoload-load-name var. lisp/cedet/semantic/tag.el: Add generated-autoload-load-name var. lisp/cedet/semantic/tag-file.el: Add generated-autoload-load-name var. lisp/cedet/semantic/tag-ls.el: Add generated-autoload-load-name var.
author Chong Yidong <cyd@stupidchicken.com>
date Sat, 05 Sep 2009 01:00:36 +0000
parents df08b7ab0ba0
children 872396c919ad
files lisp/ChangeLog lisp/cedet/semantic/analyze.el lisp/cedet/semantic/ctxt.el lisp/cedet/semantic/db-find.el lisp/cedet/semantic/db-mode.el lisp/cedet/semantic/db-typecache.el lisp/cedet/semantic/db.el lisp/cedet/semantic/doc.el lisp/cedet/semantic/find.el lisp/cedet/semantic/format.el lisp/cedet/semantic/ia.el lisp/cedet/semantic/idle.el lisp/cedet/semantic/lex.el lisp/cedet/semantic/sb.el lisp/cedet/semantic/sort.el lisp/cedet/semantic/tag-file.el lisp/cedet/semantic/tag-ls.el lisp/cedet/semantic/tag.el lisp/cedet/semantic/texi.el lisp/cedet/semantic/util.el lisp/emacs-lisp/autoload.el lisp/emacs-lisp/lisp-mode.el
diffstat 22 files changed, 189 insertions(+), 144 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Thu Sep 03 03:58:13 2009 +0000
+++ b/lisp/ChangeLog	Sat Sep 05 01:00:36 2009 +0000
@@ -1,3 +1,12 @@
+2009-09-05  Chong Yidong  <cyd@stupidchicken.com>
+
+	* emacs-lisp/autoload.el (generated-autoload-load-name): New var.
+	(autoload-generate-file-autoloads): Use it.
+	(make-autoload): Handle define-overloadable-function.
+
+	* emacs-lisp/lisp-mode.el (define-overloadable-function): Add
+	doc-string-elt property for define-overloadable-function.
+
 2009-09-02  Chong Yidong  <cyd@stupidchicken.com>
 
 	* emacs-lisp/autoload.el (generated-autoload-feature): New var.
--- a/lisp/cedet/semantic/analyze.el	Thu Sep 03 03:58:13 2009 +0000
+++ b/lisp/cedet/semantic/analyze.el	Sat Sep 05 01:00:36 2009 +0000
@@ -769,6 +769,7 @@
 ;; Local variables:
 ;; generated-autoload-file: "loaddefs.el"
 ;; generated-autoload-feature: semantic/loaddefs
+;; generated-autoload-load-name: "semantic/analyze"
 ;; End:
 
 ;;; semantic/analyze.el ends here
--- a/lisp/cedet/semantic/ctxt.el	Thu Sep 03 03:58:13 2009 +0000
+++ b/lisp/cedet/semantic/ctxt.el	Sat Sep 05 01:00:36 2009 +0000
@@ -615,6 +615,7 @@
 ;; Local variables:
 ;; generated-autoload-file: "loaddefs.el"
 ;; generated-autoload-feature: semantic/loaddefs
+;; generated-autoload-load-name: "semantic/ctxt"
 ;; End:
 
 ;;; semantic/ctxt.el ends here
--- a/lisp/cedet/semantic/db-find.el	Thu Sep 03 03:58:13 2009 +0000
+++ b/lisp/cedet/semantic/db-find.el	Sat Sep 05 01:00:36 2009 +0000
@@ -1374,6 +1374,7 @@
 ;; Local variables:
 ;; generated-autoload-file: "loaddefs.el"
 ;; generated-autoload-feature: semantic/loaddefs
+;; generated-autoload-load-name: "semantic/db-find"
 ;; End:
 
 ;;; semantic/db-find.el ends here
--- a/lisp/cedet/semantic/db-mode.el	Thu Sep 03 03:58:13 2009 +0000
+++ b/lisp/cedet/semantic/db-mode.el	Sat Sep 05 01:00:36 2009 +0000
@@ -70,6 +70,7 @@
 
 ;;; SEMANTICDB-MODE
 ;;
+;;;###autoload
 (defun semanticdb-minor-mode-p ()
   "Return non-nil if `semanticdb-minor-mode' is active."
   (member (car (car semanticdb-hooks))
@@ -240,4 +241,10 @@
 
 (provide 'semantic/db-mode)
 
+;; Local variables:
+;; generated-autoload-file: "loaddefs.el"
+;; generated-autoload-feature: semantic/loaddefs
+;; generated-autoload-load-name: "semantic/db-mode"
+;; End:
+
 ;;; semantic/db-mode.el ends here
--- a/lisp/cedet/semantic/db-typecache.el	Thu Sep 03 03:58:13 2009 +0000
+++ b/lisp/cedet/semantic/db-typecache.el	Sat Sep 05 01:00:36 2009 +0000
@@ -601,6 +601,7 @@
 ;; Local variables:
 ;; generated-autoload-file: "loaddefs.el"
 ;; generated-autoload-feature: semantic/loaddefs
+;; generated-autoload-load-name: "semantic/db-typecache"
 ;; End:
 
 ;;; semanticdb-typecache.el ends here
--- a/lisp/cedet/semantic/db.el	Thu Sep 03 03:58:13 2009 +0000
+++ b/lisp/cedet/semantic/db.el	Sat Sep 05 01:00:36 2009 +0000
@@ -1016,6 +1016,7 @@
 ;; Local variables:
 ;; generated-autoload-file: "loaddefs.el"
 ;; generated-autoload-feature: semantic/loaddefs
+;; generated-autoload-load-name: "semantic/db"
 ;; End:
 
 ;;; semantic/db.el ends here
--- a/lisp/cedet/semantic/doc.el	Thu Sep 03 03:58:13 2009 +0000
+++ b/lisp/cedet/semantic/doc.el	Sat Sep 05 01:00:36 2009 +0000
@@ -129,6 +129,7 @@
 ;; Local variables:
 ;; generated-autoload-file: "loaddefs.el"
 ;; generated-autoload-feature: semantic/loaddefs
+;; generated-autoload-load-name: "semantic/doc"
 ;; End:
 
 ;;; semantic/doc.el ends here
--- a/lisp/cedet/semantic/find.el	Thu Sep 03 03:58:13 2009 +0000
+++ b/lisp/cedet/semantic/find.el	Sat Sep 05 01:00:36 2009 +0000
@@ -810,6 +810,7 @@
 ;; Local variables:
 ;; generated-autoload-file: "loaddefs.el"
 ;; generated-autoload-feature: semantic/loaddefs
+;; generated-autoload-load-name: "semantic/find"
 ;; End:
 
 ;;; semantic/find.el ends here
--- a/lisp/cedet/semantic/format.el	Thu Sep 03 03:58:13 2009 +0000
+++ b/lisp/cedet/semantic/format.el	Sat Sep 05 01:00:36 2009 +0000
@@ -45,7 +45,6 @@
 ;;; 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
@@ -71,7 +70,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))
@@ -559,6 +558,7 @@
 	    (or args "")
 	    (or array ""))))
 
+;;;###autoload
 (define-overloadable-function semantic-format-tag-concise-prototype (tag &optional parent color)
   "Return a concise prototype for TAG.
 Optional argument PARENT is the parent type if TAG is a detail.
@@ -793,6 +793,7 @@
 ;; Local variables:
 ;; generated-autoload-file: "loaddefs.el"
 ;; generated-autoload-feature: semantic/loaddefs
+;; generated-autoload-load-name: "semantic/format"
 ;; End:
 
 ;;; semantic/format.el ends here
--- a/lisp/cedet/semantic/ia.el	Thu Sep 03 03:58:13 2009 +0000
+++ b/lisp/cedet/semantic/ia.el	Sat Sep 05 01:00:36 2009 +0000
@@ -37,6 +37,7 @@
 
 ;; (require 'senator)
 (require 'semantic/analyze)
+(require 'semantic/format)
 (require 'pulse)
 (eval-when-compile
   (require 'semantic/analyze)
--- a/lisp/cedet/semantic/idle.el	Thu Sep 03 03:58:13 2009 +0000
+++ b/lisp/cedet/semantic/idle.el	Sat Sep 05 01:00:36 2009 +0000
@@ -39,6 +39,7 @@
 
 (require 'semantic)
 (require 'semantic/ctxt)
+(require 'semantic/format)
 (require 'semantic/tag)
 ;(require 'semantic/util-modes)
 (require 'timer)
@@ -50,7 +51,6 @@
 (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
@@ -366,9 +366,7 @@
 	  ;; summary information
 	  (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))
+	    (when (and (featurep 'semantic/db) (semanticdb-minor-mode-p))
 	      (require 'semantic/db-find)
 	      (semanticdb-find-translate-path buffer nil)
 	      )
@@ -418,9 +416,7 @@
 		   ))
 	       )
 
-	     (when (and (featurep 'semantic/db)
-			(require 'semantic/db-mode)
-			(semanticdb-minor-mode-p))
+	     (when (and (featurep 'semantic/db) (semanticdb-minor-mode-p))
 	       ;; Save everything.
 	       (semanticdb-save-all-db-idle)
 
--- a/lisp/cedet/semantic/lex.el	Thu Sep 03 03:58:13 2009 +0000
+++ b/lisp/cedet/semantic/lex.el	Sat Sep 05 01:00:36 2009 +0000
@@ -2102,6 +2102,7 @@
 ;; Local variables:
 ;; generated-autoload-file: "loaddefs.el"
 ;; generated-autoload-feature: semantic/loaddefs
+;; generated-autoload-load-name: "semantic/lex"
 ;; End:
 
 ;;; semantic-lex.el ends here
--- a/lisp/cedet/semantic/sb.el	Thu Sep 03 03:58:13 2009 +0000
+++ b/lisp/cedet/semantic/sb.el	Sat Sep 05 01:00:36 2009 +0000
@@ -32,11 +32,10 @@
 ;; children with the new `with-mode-local' instead.
 
 (require 'semantic)
+(require 'semantic/format)
+(require 'semantic/sort)
 (require 'semantic/util)
 (require 'speedbar)
-(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.
@@ -383,7 +382,6 @@
 Returns the tag list, or t for an error."
   (let ((out nil))
     (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
--- a/lisp/cedet/semantic/sort.el	Thu Sep 03 03:58:13 2009 +0000
+++ b/lisp/cedet/semantic/sort.el	Sat Sep 05 01:00:36 2009 +0000
@@ -597,6 +597,7 @@
 ;; Local variables:
 ;; generated-autoload-file: "loaddefs.el"
 ;; generated-autoload-feature: semantic/loaddefs
+;; generated-autoload-load-name: "semantic/sort"
 ;; End:
 
 ;;; semantic-sort.el ends here
--- a/lisp/cedet/semantic/tag-file.el	Thu Sep 03 03:58:13 2009 +0000
+++ b/lisp/cedet/semantic/tag-file.el	Sat Sep 05 01:00:36 2009 +0000
@@ -210,6 +210,7 @@
 ;; Local variables:
 ;; generated-autoload-file: "loaddefs.el"
 ;; generated-autoload-feature: semantic/loaddefs
+;; generated-autoload-load-name: "semantic/tag-file"
 ;; End:
 
 ;;; semantic/tag-file.el ends here
--- a/lisp/cedet/semantic/tag-ls.el	Thu Sep 03 03:58:13 2009 +0000
+++ b/lisp/cedet/semantic/tag-ls.el	Sat Sep 05 01:00:36 2009 +0000
@@ -276,6 +276,7 @@
 ;; Local variables:
 ;; generated-autoload-file: "loaddefs.el"
 ;; generated-autoload-feature: semantic/loaddefs
+;; generated-autoload-load-name: "semantic/tag-ls"
 ;; End:
 
 ;;; semantic/tag-ls.el ends here
--- a/lisp/cedet/semantic/tag.el	Thu Sep 03 03:58:13 2009 +0000
+++ b/lisp/cedet/semantic/tag.el	Sat Sep 05 01:00:36 2009 +0000
@@ -1,4 +1,4 @@
-;;; tag.el --- tag creation and access
+;;; semantic/tag.el --- tag creation and access
 
 ;;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007,
 ;;; 2008, 2009 Free Software Foundation, Inc.
@@ -1568,6 +1568,7 @@
 ;; Local variables:
 ;; generated-autoload-file: "loaddefs.el"
 ;; generated-autoload-feature: semantic/loaddefs
+;; generated-autoload-load-name: "semantic/tag"
 ;; End:
 
-;;; semantic-tag.el ends here
+;;; semantic/tag.el ends here
--- a/lisp/cedet/semantic/texi.el	Thu Sep 03 03:58:13 2009 +0000
+++ b/lisp/cedet/semantic/texi.el	Sat Sep 05 01:00:36 2009 +0000
@@ -469,7 +469,7 @@
 	senator-step-at-start-end-tag-classes '(section)
 	semantic-stickyfunc-sticky-classes '(section)
 	)
-  (local-set-key [(f9)] 'semantic-texi-update-doc-from-texi)
+  ;; (local-set-key [(f9)] 'semantic-texi-update-doc-from-texi)
   )
 
 (add-hook 'texinfo-mode-hook 'semantic-default-texi-setup)
@@ -526,123 +526,125 @@
 	(goto-char (semantic-tag-start match)))
       (setq f (cdr f)))))
 
-(defun semantic-texi-update-doc-from-texi (&optional tag)
-  "Update the documentation in the texinfo deffn class tag TAG.
-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 'semantic/db) (semanticdb-minor-mode-p))
-    (error "Texinfo updating only works when `semanticdb' is being used"))
-  (semantic-fetch-tags)
-  (unless tag
-    (beginning-of-line)
-    (setq tag (semantic-current-tag)))
-  (unless (semantic-tag-of-class-p tag 'def)
-    (error "Only deffns (or defun or defvar) can be updated"))
-  (let* ((name (semantic-tag-name tag))
-	 (tags (semanticdb-strip-find-results
-		(semanticdb-with-match-any-mode
-		  (semanticdb-brute-deep-find-tags-by-name name))
-		'name))
-	 (docstring nil)
-	 (docstringproto nil)
-	 (docstringvar nil)
-	 (doctag nil)
-	 (doctagproto nil)
-	 (doctagvar nil)
-	 )
-    (save-excursion
-      (while (and tags (not docstring))
-	(let ((sourcetag (car tags)))
-	  ;; There could be more than one!  Come up with a better
-	  ;; solution someday.
-	  (when (semantic-tag-buffer sourcetag)
-	    (set-buffer (semantic-tag-buffer sourcetag))
-	    (unless (eq major-mode 'texinfo-mode)
-	    (cond ((semantic-tag-get-attribute sourcetag :prototype-flag)
-		   ;; If we found a match with doc that is a prototype, then store
-		   ;; that, but don't exit till we find the real deal.
-		   (setq docstringproto (semantic-documentation-for-tag sourcetag)
-			 doctagproto sourcetag))
-		  ((eq (semantic-tag-class sourcetag) 'variable)
-		   (setq docstringvar (semantic-documentation-for-tag sourcetag)
-			 doctagvar sourcetag))
-		  ((semantic-tag-get-attribute sourcetag :override-function-flag)
-		   nil)
-		  (t
-		   (setq docstring (semantic-documentation-for-tag sourcetag))))
-	    (setq doctag (if docstring sourcetag nil))))
-	  (setq tags (cdr tags)))))
-    ;; If we found a prototype of the function that has some doc, but not the
-    ;; actual function, lets make due with that.
-    (if (not docstring)
-	(cond ((stringp docstringvar)
-	       (setq docstring docstringvar
-		     doctag doctagvar))
-	      ((stringp docstringproto)
-	       (setq docstring docstringproto
-		     doctag doctagproto))))
-    ;; Test for doc string
-    (unless docstring
-      (error "Could not find documentation for %s" (semantic-tag-name tag)))
-    ;; If we have a string, do the replacement.
-    (delete-region (semantic-tag-start tag)
-		   (semantic-tag-end tag))
-    ;; Use useful functions from the docaument library.
-    (require 'document)
-    (document-insert-texinfo doctag (semantic-tag-buffer doctag))
-    ))
+;; (defun semantic-texi-update-doc-from-texi (&optional tag)
+;;   "Update the documentation in the texinfo deffn class tag TAG.
+;; 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 'semantic/db)
+;; 	      (require 'semantic/db-mode)
+;; 	      (semanticdb-minor-mode-p))
+;;     (error "Texinfo updating only works when `semanticdb' is being used"))
+;;   (semantic-fetch-tags)
+;;   (unless tag
+;;     (beginning-of-line)
+;;     (setq tag (semantic-current-tag)))
+;;   (unless (semantic-tag-of-class-p tag 'def)
+;;     (error "Only deffns (or defun or defvar) can be updated"))
+;;   (let* ((name (semantic-tag-name tag))
+;; 	 (tags (semanticdb-strip-find-results
+;; 		(semanticdb-with-match-any-mode
+;; 		  (semanticdb-brute-deep-find-tags-by-name name))
+;; 		'name))
+;; 	 (docstring nil)
+;; 	 (docstringproto nil)
+;; 	 (docstringvar nil)
+;; 	 (doctag nil)
+;; 	 (doctagproto nil)
+;; 	 (doctagvar nil)
+;; 	 )
+;;     (save-excursion
+;;       (while (and tags (not docstring))
+;; 	(let ((sourcetag (car tags)))
+;; 	  ;; There could be more than one!  Come up with a better
+;; 	  ;; solution someday.
+;; 	  (when (semantic-tag-buffer sourcetag)
+;; 	    (set-buffer (semantic-tag-buffer sourcetag))
+;; 	    (unless (eq major-mode 'texinfo-mode)
+;; 	    (cond ((semantic-tag-get-attribute sourcetag :prototype-flag)
+;; 		   ;; If we found a match with doc that is a prototype, then store
+;; 		   ;; that, but don't exit till we find the real deal.
+;; 		   (setq docstringproto (semantic-documentation-for-tag sourcetag)
+;; 			 doctagproto sourcetag))
+;; 		  ((eq (semantic-tag-class sourcetag) 'variable)
+;; 		   (setq docstringvar (semantic-documentation-for-tag sourcetag)
+;; 			 doctagvar sourcetag))
+;; 		  ((semantic-tag-get-attribute sourcetag :override-function-flag)
+;; 		   nil)
+;; 		  (t
+;; 		   (setq docstring (semantic-documentation-for-tag sourcetag))))
+;; 	    (setq doctag (if docstring sourcetag nil))))
+;; 	  (setq tags (cdr tags)))))
+;;     ;; If we found a prototype of the function that has some doc, but not the
+;;     ;; actual function, lets make due with that.
+;;     (if (not docstring)
+;; 	(cond ((stringp docstringvar)
+;; 	       (setq docstring docstringvar
+;; 		     doctag doctagvar))
+;; 	      ((stringp docstringproto)
+;; 	       (setq docstring docstringproto
+;; 		     doctag doctagproto))))
+;;     ;; Test for doc string
+;;     (unless docstring
+;;       (error "Could not find documentation for %s" (semantic-tag-name tag)))
+;;     ;; If we have a string, do the replacement.
+;;     (delete-region (semantic-tag-start tag)
+;; 		   (semantic-tag-end tag))
+;;     ;; Use useful functions from the docaument library.
+;;     (require 'document)
+;;     (document-insert-texinfo doctag (semantic-tag-buffer doctag))
+;;     ))
 
-(defun semantic-texi-update-doc-from-source (&optional tag)
-  "Update the documentation for the source TAG.
-The current buffer must be a non-texinfo source file containing TAG.
-If TAG is nil, determine the tag based on the current position.
-The current buffer must include TAG."
-  (interactive)
-  (when (eq major-mode 'texinfo-mode)
-    (error "Not a source file"))
-  (semantic-fetch-tags)
-  (unless tag
-    (setq tag (semantic-current-tag)))
-  (unless (semantic-documentation-for-tag tag)
-    (error "Cannot find interesting documentation to use for %s"
-	   (semantic-tag-name tag)))
-  (let* ((name (semantic-tag-name tag))
-	 (texi (semantic-texi-associated-files))
-	 (doctag nil)
-	 (docbuff nil))
-    (while (and texi (not doctag))
-      (set-buffer (find-file-noselect (car texi)))
-      (setq doctag (car (semantic-deep-find-tags-by-name
-			 name (semantic-fetch-tags)))
-	    docbuff (if doctag (current-buffer) nil))
-      (setq texi (cdr texi)))
-    (unless doctag
-      (error "Tag %s is not yet documented.  Use the `document' command"
-             name))
-    ;; Ok, we should have everything we need.  Do the deed.
-    (if (get-buffer-window docbuff)
-	(set-buffer docbuff)
-      (switch-to-buffer docbuff))
-    (goto-char (semantic-tag-start doctag))
-    (delete-region (semantic-tag-start doctag)
-		   (semantic-tag-end doctag))
-    ;; Use useful functions from the document library.
-    (require 'document)
-    (document-insert-texinfo tag (semantic-tag-buffer tag))
-    ))
+;; (defun semantic-texi-update-doc-from-source (&optional tag)
+;;   "Update the documentation for the source TAG.
+;; The current buffer must be a non-texinfo source file containing TAG.
+;; If TAG is nil, determine the tag based on the current position.
+;; The current buffer must include TAG."
+;;   (interactive)
+;;   (when (eq major-mode 'texinfo-mode)
+;;     (error "Not a source file"))
+;;   (semantic-fetch-tags)
+;;   (unless tag
+;;     (setq tag (semantic-current-tag)))
+;;   (unless (semantic-documentation-for-tag tag)
+;;     (error "Cannot find interesting documentation to use for %s"
+;; 	   (semantic-tag-name tag)))
+;;   (let* ((name (semantic-tag-name tag))
+;; 	 (texi (semantic-texi-associated-files))
+;; 	 (doctag nil)
+;; 	 (docbuff nil))
+;;     (while (and texi (not doctag))
+;;       (set-buffer (find-file-noselect (car texi)))
+;;       (setq doctag (car (semantic-deep-find-tags-by-name
+;; 			 name (semantic-fetch-tags)))
+;; 	    docbuff (if doctag (current-buffer) nil))
+;;       (setq texi (cdr texi)))
+;;     (unless doctag
+;;       (error "Tag %s is not yet documented.  Use the `document' command"
+;;              name))
+;;     ;; Ok, we should have everything we need.  Do the deed.
+;;     (if (get-buffer-window docbuff)
+;; 	(set-buffer docbuff)
+;;       (switch-to-buffer docbuff))
+;;     (goto-char (semantic-tag-start doctag))
+;;     (delete-region (semantic-tag-start doctag)
+;; 		   (semantic-tag-end doctag))
+;;     ;; Use useful functions from the document library.
+;;     (require 'document)
+;;     (document-insert-texinfo tag (semantic-tag-buffer tag))
+;;     ))
 
-(defun semantic-texi-update-doc (&optional tag)
-  "Update the documentation for TAG.
-If the current buffer is a texinfo file, then find the source doc, and
-update it.  If the current buffer is a source file, then get the
-documentation for this item, find the existing doc in the associated
-manual, and update that."
-  (interactive)
-  (cond ((eq major-mode 'texinfo-mode)
-	 (semantic-texi-update-doc-from-texi tag))
-	(t
-	 (semantic-texi-update-doc-from-source tag))))
+;; (defun semantic-texi-update-doc (&optional tag)
+;;   "Update the documentation for TAG.
+;; If the current buffer is a texinfo file, then find the source doc, and
+;; update it.  If the current buffer is a source file, then get the
+;; documentation for this item, find the existing doc in the associated
+;; manual, and update that."
+;;   (interactive)
+;;   (cond ;;((eq major-mode 'texinfo-mode)
+;; 	;; (semantic-texi-update-doc-from-texi tag))
+;; 	(t
+;; 	 (semantic-texi-update-doc-from-source tag))))
 
 (defun semantic-texi-goto-source (&optional tag)
   "Jump to the source for the definition in the texinfo file TAG.
--- a/lisp/cedet/semantic/util.el	Thu Sep 03 03:58:13 2009 +0000
+++ b/lisp/cedet/semantic/util.el	Sat Sep 05 01:00:36 2009 +0000
@@ -28,14 +28,18 @@
 
 (require 'assoc)
 (require 'semantic)
-(eval-when-compile
-  ;; Emacs 21
-  (condition-case nil
-      (require 'newcomment)
-    (error nil))
-  ;; Semanticdb calls
-  (require 'semantic/db)
-  )
+
+(declare-function data-debug-insert-stuff-list "data-debug")
+(declare-function data-debug-insert-thing "data-debug")
+(declare-function semanticdb-file-stream "semantic/db")
+(declare-function semanticdb-abstract-table-child-p "semantic/db")
+(declare-function semanticdb-refresh-table "semantic/db")
+(declare-function semanticdb-get-tags "semantic/db")
+(declare-function semanticdb-find-results-p "semantic/db-find")
+
+;; For semantic-find-tags-by-class, semantic--find-tags-by-function,
+;; and semantic-brute-find-tag-standard:
+(eval-when-compile (require 'semantic/find))
 
 ;;; Code:
 
@@ -112,14 +116,15 @@
 	 (file-exists-p something))
     (semantic-file-tag-table something))
    ;; A Semanticdb table
-   ((and (featurep 'semanticdb)
+   ((and (featurep 'semantic/db)
 	 (semanticdb-minor-mode-p)
 	 (semanticdb-abstract-table-child-p something))
     (semanticdb-refresh-table something)
     (semanticdb-get-tags something))
    ;; Semanticdb find-results
-   ((and (featurep 'semanticdb)
+   ((and (featurep 'semantic/db)
 	 (semanticdb-minor-mode-p)
+	 (require 'semantic/db-find)
 	 (semanticdb-find-results-p something))
     (semanticdb-strip-find-results something))
    ;; NOTE: This commented out since if a search result returns
@@ -350,6 +355,7 @@
   "Display the current token.
 Argument P is the point to search from in the current buffer."
   (interactive "d")
+  (require 'semantic/find)
   (let ((tok (semantic-brute-find-innermost-tag-by-position
 	      p (current-buffer))))
     (message (mapconcat 'semantic-abbreviate-nonterminal tok ","))
@@ -359,6 +365,7 @@
 (defun semantic-hack-search ()
   "Display info about something under the cursor using generic methods."
   (interactive)
+  (require 'semantic/find)
   (let (
 	;(name (thing-at-point 'symbol))
 	(strm (cdr (semantic-fetch-tags)))
--- a/lisp/emacs-lisp/autoload.el	Thu Sep 03 03:58:13 2009 +0000
+++ b/lisp/emacs-lisp/autoload.el	Sat Sep 05 01:00:36 2009 +0000
@@ -48,6 +48,12 @@
 ;;;###autoload
 (put 'generated-autoload-feature 'safe-local-variable 'symbolp)
 
+(defvar generated-autoload-load-name nil
+  "Load name for `autoload' statements generated from autoload cookies.
+If nil, this defaults to the file name, sans extension.")
+;;;###autoload
+(put 'generated-autoload-load-name 'safe-local-variable 'stringp)
+
 ;; 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"
@@ -101,11 +107,12 @@
 		   easy-mmode-define-global-mode define-global-minor-mode
 		   define-globalized-minor-mode
 		   easy-mmode-define-minor-mode define-minor-mode
-		   defun* defmacro*))
+		   defun* defmacro* define-overloadable-function))
       (let* ((macrop (memq car '(defmacro defmacro*)))
 	     (name (nth 1 form))
 	     (args (case car
-		    ((defun defmacro defun* defmacro*) (nth 2 form))
+		    ((defun defmacro defun* defmacro*
+		       define-overloadable-function) (nth 2 form))
 		    ((define-skeleton) '(&optional str arg))
 		    ((define-generic-mode define-derived-mode
                        define-compilation-mode) nil)
@@ -347,7 +354,7 @@
 \(or OUTBUF if OUTFILE is nil)."
   (catch 'done
     (let ((autoloads-done '())
-          (load-name (autoload-file-load-name file))
+	  load-name
           (print-length nil)
 	  (print-level nil)
           (print-readably t)           ; This does something in Lucid Emacs.
@@ -365,6 +372,10 @@
         ;; Obey the no-update-autoloads file local variable.
         (unless no-update-autoloads
           (message "Generating autoloads for %s..." file)
+	  (setq load-name
+		(if (stringp generated-autoload-load-name)
+		    generated-autoload-load-name
+		  (autoload-file-load-name file)))
           (save-excursion
             (save-restriction
               (widen)
--- a/lisp/emacs-lisp/lisp-mode.el	Thu Sep 03 03:58:13 2009 +0000
+++ b/lisp/emacs-lisp/lisp-mode.el	Sat Sep 05 01:00:36 2009 +0000
@@ -154,6 +154,7 @@
 (put 'defalias 'doc-string-elt 3)
 (put 'defvaralias 'doc-string-elt 3)
 (put 'define-category 'doc-string-elt 2)
+(put 'define-overloadable-function 'doc-string-elt 3)
 
 (defvar lisp-doc-string-elt-property 'doc-string-elt
   "The symbol property that holds the docstring position info.")