summaryrefslogtreecommitdiff
path: root/lisp/cedet/semantic
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2009-09-05 01:00:36 +0000
committerChong Yidong <cyd@stupidchicken.com>2009-09-05 01:00:36 +0000
commit996bc9bf73f16625e00df0bb58ea98b2ca3ba317 (patch)
treee49ee958cca5804242f25423e251424d3f9553af /lisp/cedet/semantic
parent55b522b2eb02de72ce207a04aef15ed7f193b568 (diff)
downloademacs-996bc9bf73f16625e00df0bb58ea98b2ca3ba317.tar.gz
* 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.
Diffstat (limited to 'lisp/cedet/semantic')
-rw-r--r--lisp/cedet/semantic/analyze.el1
-rw-r--r--lisp/cedet/semantic/ctxt.el1
-rw-r--r--lisp/cedet/semantic/db-find.el1
-rw-r--r--lisp/cedet/semantic/db-mode.el7
-rw-r--r--lisp/cedet/semantic/db-typecache.el1
-rw-r--r--lisp/cedet/semantic/db.el1
-rw-r--r--lisp/cedet/semantic/doc.el1
-rw-r--r--lisp/cedet/semantic/find.el1
-rw-r--r--lisp/cedet/semantic/format.el5
-rw-r--r--lisp/cedet/semantic/ia.el1
-rw-r--r--lisp/cedet/semantic/idle.el10
-rw-r--r--lisp/cedet/semantic/lex.el1
-rw-r--r--lisp/cedet/semantic/sb.el6
-rw-r--r--lisp/cedet/semantic/sort.el1
-rw-r--r--lisp/cedet/semantic/tag-file.el1
-rw-r--r--lisp/cedet/semantic/tag-ls.el1
-rw-r--r--lisp/cedet/semantic/tag.el5
-rw-r--r--lisp/cedet/semantic/texi.el238
-rw-r--r--lisp/cedet/semantic/util.el27
19 files changed, 167 insertions, 143 deletions
diff --git a/lisp/cedet/semantic/analyze.el b/lisp/cedet/semantic/analyze.el
index 933e0b2996e..63c196af487 100644
--- a/lisp/cedet/semantic/analyze.el
+++ b/lisp/cedet/semantic/analyze.el
@@ -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
diff --git a/lisp/cedet/semantic/ctxt.el b/lisp/cedet/semantic/ctxt.el
index 3aac514488b..ab72f4d4e7f 100644
--- a/lisp/cedet/semantic/ctxt.el
+++ b/lisp/cedet/semantic/ctxt.el
@@ -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
diff --git a/lisp/cedet/semantic/db-find.el b/lisp/cedet/semantic/db-find.el
index 6d4fdc1fcc5..9cfd45397f5 100644
--- a/lisp/cedet/semantic/db-find.el
+++ b/lisp/cedet/semantic/db-find.el
@@ -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
diff --git a/lisp/cedet/semantic/db-mode.el b/lisp/cedet/semantic/db-mode.el
index b34fd0b99a5..cc7feb7a88d 100644
--- a/lisp/cedet/semantic/db-mode.el
+++ b/lisp/cedet/semantic/db-mode.el
@@ -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
diff --git a/lisp/cedet/semantic/db-typecache.el b/lisp/cedet/semantic/db-typecache.el
index db2f260d5d0..20d8851d90c 100644
--- a/lisp/cedet/semantic/db-typecache.el
+++ b/lisp/cedet/semantic/db-typecache.el
@@ -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
diff --git a/lisp/cedet/semantic/db.el b/lisp/cedet/semantic/db.el
index 352d3d0cf1a..6fe79516b20 100644
--- a/lisp/cedet/semantic/db.el
+++ b/lisp/cedet/semantic/db.el
@@ -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
diff --git a/lisp/cedet/semantic/doc.el b/lisp/cedet/semantic/doc.el
index c9037ba83e8..0eaf41c06e9 100644
--- a/lisp/cedet/semantic/doc.el
+++ b/lisp/cedet/semantic/doc.el
@@ -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
diff --git a/lisp/cedet/semantic/find.el b/lisp/cedet/semantic/find.el
index 3d14303061c..4ab6a8d8a62 100644
--- a/lisp/cedet/semantic/find.el
+++ b/lisp/cedet/semantic/find.el
@@ -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
diff --git a/lisp/cedet/semantic/format.el b/lisp/cedet/semantic/format.el
index d6d66259946..9f5256134a4 100644
--- a/lisp/cedet/semantic/format.el
+++ b/lisp/cedet/semantic/format.el
@@ -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
diff --git a/lisp/cedet/semantic/ia.el b/lisp/cedet/semantic/ia.el
index d060f478424..b2446e75029 100644
--- a/lisp/cedet/semantic/ia.el
+++ b/lisp/cedet/semantic/ia.el
@@ -37,6 +37,7 @@
;; (require 'senator)
(require 'semantic/analyze)
+(require 'semantic/format)
(require 'pulse)
(eval-when-compile
(require 'semantic/analyze)
diff --git a/lisp/cedet/semantic/idle.el b/lisp/cedet/semantic/idle.el
index 49cd38c6d85..6451a32a858 100644
--- a/lisp/cedet/semantic/idle.el
+++ b/lisp/cedet/semantic/idle.el
@@ -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)
diff --git a/lisp/cedet/semantic/lex.el b/lisp/cedet/semantic/lex.el
index 09b31b7ff2d..c4335d9e197 100644
--- a/lisp/cedet/semantic/lex.el
+++ b/lisp/cedet/semantic/lex.el
@@ -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
diff --git a/lisp/cedet/semantic/sb.el b/lisp/cedet/semantic/sb.el
index 3bbe9f94d9a..aaee9f905bc 100644
--- a/lisp/cedet/semantic/sb.el
+++ b/lisp/cedet/semantic/sb.el
@@ -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 @@ 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
diff --git a/lisp/cedet/semantic/sort.el b/lisp/cedet/semantic/sort.el
index df4374c46ea..a4448a8415b 100644
--- a/lisp/cedet/semantic/sort.el
+++ b/lisp/cedet/semantic/sort.el
@@ -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
diff --git a/lisp/cedet/semantic/tag-file.el b/lisp/cedet/semantic/tag-file.el
index 5dd3c0f5db1..58c0aaeec63 100644
--- a/lisp/cedet/semantic/tag-file.el
+++ b/lisp/cedet/semantic/tag-file.el
@@ -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
diff --git a/lisp/cedet/semantic/tag-ls.el b/lisp/cedet/semantic/tag-ls.el
index 272c64f30af..9e430aca800 100644
--- a/lisp/cedet/semantic/tag-ls.el
+++ b/lisp/cedet/semantic/tag-ls.el
@@ -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
diff --git a/lisp/cedet/semantic/tag.el b/lisp/cedet/semantic/tag.el
index fa920df42c3..cf4967d3ffc 100644
--- a/lisp/cedet/semantic/tag.el
+++ b/lisp/cedet/semantic/tag.el
@@ -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
diff --git a/lisp/cedet/semantic/texi.el b/lisp/cedet/semantic/texi.el
index 2248e4ee9fa..3190bf1d5ec 100644
--- a/lisp/cedet/semantic/texi.el
+++ b/lisp/cedet/semantic/texi.el
@@ -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.
diff --git a/lisp/cedet/semantic/util.el b/lisp/cedet/semantic/util.el
index 37bb5629335..dfb899e5941 100644
--- a/lisp/cedet/semantic/util.el
+++ b/lisp/cedet/semantic/util.el
@@ -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 @@ 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)))