* emacs-lisp/autoload.el (generated-autoload-load-name): New var.
authorChong Yidong <cyd@stupidchicken.com>
Sat, 5 Sep 2009 01:00:36 +0000 (01:00 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Sat, 5 Sep 2009 01:00:36 +0000 (01:00 +0000)
(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.

22 files changed:
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

index 52aeab3..5fdf4de 100644 (file)
@@ -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.
index 933e0b2..63c196a 100644 (file)
@@ -769,6 +769,7 @@ CONTEXT's content is described in `semantic-analyze-current-context'."
 ;; Local variables:
 ;; generated-autoload-file: "loaddefs.el"
 ;; generated-autoload-feature: semantic/loaddefs
+;; generated-autoload-load-name: "semantic/analyze"
 ;; End:
 
 ;;; semantic/analyze.el ends here
index 3aac514..ab72f4d 100644 (file)
@@ -615,6 +615,7 @@ overriden."
 ;; Local variables:
 ;; generated-autoload-file: "loaddefs.el"
 ;; generated-autoload-feature: semantic/loaddefs
+;; generated-autoload-load-name: "semantic/ctxt"
 ;; End:
 
 ;;; semantic/ctxt.el ends here
index 6d4fdc1..9cfd453 100644 (file)
@@ -1374,6 +1374,7 @@ Return a table of all matching tags."
 ;; 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
index b34fd0b..cc7feb7 100644 (file)
@@ -70,6 +70,7 @@ on or off."
 
 ;;; 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 @@ Argument NEW-TABLE is the new table of tags."
 
 (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
index db2f260..20d8851 100644 (file)
@@ -601,6 +601,7 @@ If there isn't one, create it.
 ;; 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
index 352d3d0..6fe7951 100644 (file)
@@ -1016,6 +1016,7 @@ If file does not have tags available, then load the file, and create them."
 ;; Local variables:
 ;; generated-autoload-file: "loaddefs.el"
 ;; generated-autoload-feature: semantic/loaddefs
+;; generated-autoload-load-name: "semantic/db"
 ;; End:
 
 ;;; semantic/db.el ends here
index c9037ba..0eaf41c 100644 (file)
@@ -129,6 +129,7 @@ If NOSNARF is 'lex, then return the lex token."
 ;; Local variables:
 ;; generated-autoload-file: "loaddefs.el"
 ;; generated-autoload-feature: semantic/loaddefs
+;; generated-autoload-load-name: "semantic/doc"
 ;; End:
 
 ;;; semantic/doc.el ends here
index 3d14303..4ab6a8d 100644 (file)
@@ -810,6 +810,7 @@ Optional argument ARG is the number of iterations to run."
 ;; Local variables:
 ;; generated-autoload-file: "loaddefs.el"
 ;; generated-autoload-feature: semantic/loaddefs
+;; generated-autoload-load-name: "semantic/find"
 ;; End:
 
 ;;; semantic/find.el ends here
index d6d6625..9f52561 100644 (file)
@@ -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 @@ COLOR indicates that the generated text should be colored using
 
 (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 @@ Optional argument COLOR means highlight the prototype with font-lock colors."
            (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 @@ Optional argument COLOR means highlight the prototype with font-lock colors."
 ;; Local variables:
 ;; generated-autoload-file: "loaddefs.el"
 ;; generated-autoload-feature: semantic/loaddefs
+;; generated-autoload-load-name: "semantic/format"
 ;; End:
 
 ;;; semantic/format.el ends here
index d060f47..b2446e7 100644 (file)
@@ -37,6 +37,7 @@
 
 ;; (require 'senator)
 (require 'semantic/analyze)
+(require 'semantic/format)
 (require 'pulse)
 (eval-when-compile
   (require 'semantic/analyze)
index 49cd38c..6451a32 100644 (file)
@@ -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 @@ Returns t of all processing succeeded."
          ;; 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 @@ Uses `semantic-idle-work-for-on-buffer' to do the work."
                   ))
               )
 
-            (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)
 
index 09b31b7..c4335d9 100644 (file)
@@ -2102,6 +2102,7 @@ return LENGTH tokens."
 ;; Local variables:
 ;; generated-autoload-file: "loaddefs.el"
 ;; generated-autoload-feature: semantic/loaddefs
+;; generated-autoload-load-name: "semantic/lex"
 ;; End:
 
 ;;; semantic-lex.el ends here
index 3bbe9f9..aaee9f9 100644 (file)
 ;; 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 @@ to create much wiser decisions about how to sort and group these items."
 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
index df4374c..a4448a8 100644 (file)
@@ -597,6 +597,7 @@ See `semantic-tag-external-class' for details."
 ;; Local variables:
 ;; generated-autoload-file: "loaddefs.el"
 ;; generated-autoload-feature: semantic/loaddefs
+;; generated-autoload-load-name: "semantic/sort"
 ;; End:
 
 ;;; semantic-sort.el ends here
index 5dd3c0f..58c0aae 100644 (file)
@@ -210,6 +210,7 @@ file prototypes belong in."
 ;; 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
index 272c64f..9e430ac 100644 (file)
@@ -276,6 +276,7 @@ Return the name of TAG found in the toplevel STREAM."
 ;; 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
index fa920df..cf4967d 100644 (file)
@@ -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 @@ and `semantic-tag-type-interfaces' instead")
 ;; 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
index 2248e4e..3190bf1 100644 (file)
@@ -469,7 +469,7 @@ that start with that symbol."
        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 @@ Note: TYPE not yet implemented."
        (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-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-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 (&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.
index 37bb562..dfb899e 100644 (file)
 
 (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 @@ buffer, or a filename.  If SOMETHING is nil return nil."
         (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 @@ If TAG is not specified, use the tag at point."
   "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 @@ Argument P is the point to search from in the current buffer."
 (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)))
index 39070b2..8b2a898 100644 (file)
@@ -48,6 +48,12 @@ If nil, this defaults to `generated-autoload-file', sans extension.")
 ;;;###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 @@ or macro definition or a defcustom)."
                   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 @@ Return non-nil if and only if FILE adds no autoloads to OUTFILE
 \(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 @@ Return non-nil if and only if FILE adds no autoloads to OUTFILE
         ;; 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)
index 3360600..1ea0881 100644 (file)
 (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.")