summaryrefslogtreecommitdiff
path: root/lisp/cedet/semantic
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/cedet/semantic')
-rw-r--r--lisp/cedet/semantic/analyze.el2
-rw-r--r--lisp/cedet/semantic/analyze/refs.el2
-rw-r--r--lisp/cedet/semantic/bovine/c.el12
-rw-r--r--lisp/cedet/semantic/bovine/el.el6
-rw-r--r--lisp/cedet/semantic/bovine/make.el10
-rw-r--r--lisp/cedet/semantic/bovine/scm.el2
-rw-r--r--lisp/cedet/semantic/chart.el8
-rw-r--r--lisp/cedet/semantic/complete.el1
-rw-r--r--lisp/cedet/semantic/db-find.el2
-rw-r--r--lisp/cedet/semantic/db-javascript.el1
-rw-r--r--lisp/cedet/semantic/db-ref.el5
-rw-r--r--lisp/cedet/semantic/db-typecache.el3
-rw-r--r--lisp/cedet/semantic/db.el7
-rw-r--r--lisp/cedet/semantic/debug.el12
-rw-r--r--lisp/cedet/semantic/decorate/include.el2
-rw-r--r--lisp/cedet/semantic/format.el32
-rw-r--r--lisp/cedet/semantic/html.el8
-rw-r--r--lisp/cedet/semantic/idle.el1
-rw-r--r--lisp/cedet/semantic/scope.el2
-rw-r--r--lisp/cedet/semantic/tag.el19
20 files changed, 75 insertions, 62 deletions
diff --git a/lisp/cedet/semantic/analyze.el b/lisp/cedet/semantic/analyze.el
index 63c196af487..2beb41319ea 100644
--- a/lisp/cedet/semantic/analyze.el
+++ b/lisp/cedet/semantic/analyze.el
@@ -64,14 +64,12 @@
;; constant. These need to be returned as there would be no
;; other possible completions.
;;
-(require 'eieio)
(require 'semantic)
(require 'semantic/format)
(require 'semantic/ctxt)
(require 'semantic/sort)
(eval-when-compile (require 'semantic/find))
(require 'semantic/scope)
-(require 'semantic/tag)
(require 'semantic/analyze/fcn)
;;; Code:
diff --git a/lisp/cedet/semantic/analyze/refs.el b/lisp/cedet/semantic/analyze/refs.el
index 62e68775d14..8e2f2120d69 100644
--- a/lisp/cedet/semantic/analyze/refs.el
+++ b/lisp/cedet/semantic/analyze/refs.el
@@ -321,8 +321,6 @@ Only works for tags in the global namespace."
(semantic-momentary-highlight-tag target))
)
-
-
(provide 'semantic/analyze/refs)
;; Local variables:
diff --git a/lisp/cedet/semantic/bovine/c.el b/lisp/cedet/semantic/bovine/c.el
index efcbfd351ce..3f5994369e9 100644
--- a/lisp/cedet/semantic/bovine/c.el
+++ b/lisp/cedet/semantic/bovine/c.el
@@ -122,7 +122,7 @@ part of the preprocessor map.")
(defun semantic-c-reset-preprocessor-symbol-map ()
"Reset the C preprocessor symbol map based on all input variables."
- (when (featurep 'semantic-c)
+ (when (featurep 'semantic/bovine/c)
(let ((filemap nil)
)
(when (and (not semantic-c-in-reset-preprocessor-table)
@@ -1592,6 +1592,7 @@ DO NOT return the list of tags encompassing point."
(defvar-mode-local c-mode senator-step-at-tag-classes '(function variable)
"Tag classes where senator will stop at the end.")
+;;;###autoload
(defun semantic-default-c-setup ()
"Set up a buffer for semantic parsing of the C language."
(semantic-c-by--install-parser)
@@ -1604,6 +1605,7 @@ DO NOT return the list of tags encompassing point."
(add-hook 'semantic-lex-reset-hooks 'semantic-lex-spp-reset-hook nil t)
)
+;;;###autoload
(defun semantic-c-add-preprocessor-symbol (sym replacement)
"Add a preprocessor symbol SYM with a REPLACEMENT value."
(interactive "sSymbol: \nsReplacement: ")
@@ -1619,7 +1621,9 @@ DO NOT return the list of tags encompassing point."
(semantic-c-reset-preprocessor-symbol-map)
)
+;;;###autoload
(add-hook 'c-mode-hook 'semantic-default-c-setup)
+;;;###autoload
(add-hook 'c++-mode-hook 'semantic-default-c-setup)
;;; SETUP QUERY
@@ -1712,4 +1716,10 @@ DO NOT return the list of tags encompassing point."
(semantic-c-reset-preprocessor-symbol-map)
+;; Local variables:
+;; generated-autoload-file: "../loaddefs.el"
+;; generated-autoload-feature: semantic/loaddefs
+;; generated-autoload-load-name: "semantic/bovine/c"
+;; End:
+
;;; semantic/bovine/c.el ends here
diff --git a/lisp/cedet/semantic/bovine/el.el b/lisp/cedet/semantic/bovine/el.el
index 5770d33d00a..596e29228f9 100644
--- a/lisp/cedet/semantic/bovine/el.el
+++ b/lisp/cedet/semantic/bovine/el.el
@@ -463,7 +463,7 @@ Return a bovination list to use."
(condition-case nil
;; Try an Emacs 22 fcn. This throws errors.
(find-library-name (semantic-tag-name tag))
- (error
+ (error
(message "semantic: connot find source file %s"
(semantic-tag-name tag))))
;; No handy function available. (Older Emacsen)
@@ -533,14 +533,14 @@ Optional argument NOSNARF is ignored."
(cond ((eq (semantic-tag-class tag) 'function)
(setq d (documentation sym)))
(t
- (setq d (documentation-property
+ (setq d (documentation-property
sym 'variable-documentation)))))
;; Label it as system doc.. perhaps just for debugging
;; purposes.
(if d (setq d (concat "Sytem Doc: \n" d)))
))
)
-
+
(when d
(concat
(substitute-command-keys
diff --git a/lisp/cedet/semantic/bovine/make.el b/lisp/cedet/semantic/bovine/make.el
index c6f6e88ca30..1686ef2aa15 100644
--- a/lisp/cedet/semantic/bovine/make.el
+++ b/lisp/cedet/semantic/bovine/make.el
@@ -153,7 +153,7 @@ We never have local variables in Makefiles."
)
(cond ((eq class 'function)
(concat name ": "
- (semantic--format-tag-arguments
+ (semantic--format-tag-arguments
(semantic-tag-function-arguments tag)
#'semantic-format-tag-prototype
color)))
@@ -205,6 +205,7 @@ Uses default implementation, and also gets a list of filenames."
nil
"The system include path used by Makefiles langauge.")
+;;;###autoload
(defun semantic-default-make-setup ()
"Set up a Makefile buffer for parsing with semantic."
(semantic-make-by--install-parser)
@@ -229,8 +230,15 @@ Uses default implementation, and also gets a list of filenames."
(setq semantic-lex-analyzer #'semantic-make-lexer)
)
+;;;###autoload
(add-hook 'makefile-mode-hook 'semantic-default-make-setup)
(provide 'semantic/bovine/make)
+;; Local variables:
+;; generated-autoload-file: "../loaddefs.el"
+;; generated-autoload-feature: semantic/loaddefs
+;; generated-autoload-load-name: "semantic/bovine/make"
+;; End:
+
;;; semantic/bovine/make.el ends here
diff --git a/lisp/cedet/semantic/bovine/scm.el b/lisp/cedet/semantic/bovine/scm.el
index 2b351534cb4..e57390157ce 100644
--- a/lisp/cedet/semantic/bovine/scm.el
+++ b/lisp/cedet/semantic/bovine/scm.el
@@ -95,6 +95,7 @@ syntax as specified by the syntax table."
semantic-lex-number
semantic-lex-default-action)
+;;;###autoload
(defun semantic-default-scheme-setup ()
"Setup hook function for Emacs Lisp files and Semantic."
(semantic-scm-by--install-parser)
@@ -109,6 +110,7 @@ syntax as specified by the syntax table."
(setq semantic-lex-analyzer #'semantic-scheme-lexer)
)
+;;;###autoload
(add-hook 'scheme-mode-hook 'semantic-default-scheme-setup)
(provide 'semantic/bovine/scm)
diff --git a/lisp/cedet/semantic/chart.el b/lisp/cedet/semantic/chart.el
index ec7685916ce..7efe4e6dfae 100644
--- a/lisp/cedet/semantic/chart.el
+++ b/lisp/cedet/semantic/chart.el
@@ -26,17 +26,13 @@
;; the output of the semantic parser.
;;
-(require 'chart)
(require 'semantic)
+(require 'chart)
(require 'semantic/db)
(require 'semantic/tag)
(eval-when-compile (require 'semantic/find))
-;; (require 'semantic/db-mode)
-;; (require 'semantic/db-typecache)
-;; (require 'semantic/scope)
-
;;; Code:
(defun semantic-chart-tags-by-class (&optional tagtable)
@@ -173,8 +169,6 @@ items are charted. TAGTABLE is passedto
"Number of tags")
))
-
-
(provide 'semantic/chart)
;;; semantic/chart.el ends here
diff --git a/lisp/cedet/semantic/complete.el b/lisp/cedet/semantic/complete.el
index c29cb1de77a..1f08599221e 100644
--- a/lisp/cedet/semantic/complete.el
+++ b/lisp/cedet/semantic/complete.el
@@ -114,7 +114,6 @@
(require 'semantic/ctxt)
(require 'semantic/decorate)
(require 'semantic/format)
-(require 'semantic/tag)
(eval-when-compile
;; For the semantic-find-tags-for-completion macro.
diff --git a/lisp/cedet/semantic/db-find.el b/lisp/cedet/semantic/db-find.el
index 5746441852c..1066ffd642f 100644
--- a/lisp/cedet/semantic/db-find.el
+++ b/lisp/cedet/semantic/db-find.el
@@ -748,7 +748,7 @@ for details on how this list is derived."
(semantic-fetch-tags)
(require 'data-debug)
(let* ((semanticdb-find-default-throttle
- (if (featurep 'semanticdb-find)
+ (if (featurep 'semantic/db-find)
(remq 'unloaded semanticdb-find-default-throttle)
nil))
(start (current-time))
diff --git a/lisp/cedet/semantic/db-javascript.el b/lisp/cedet/semantic/db-javascript.el
index 02c089e6ee9..42203806fd4 100644
--- a/lisp/cedet/semantic/db-javascript.el
+++ b/lisp/cedet/semantic/db-javascript.el
@@ -306,7 +306,6 @@ Return a list of tags."
;; function encodeURI (uri){}
;; function encodeURIComponent (uriComponent){}
-
(provide 'semantic/db-javascript)
;;; semantic/db-javascript.el ends here
diff --git a/lisp/cedet/semantic/db-ref.el b/lisp/cedet/semantic/db-ref.el
index 97da206abff..d7e01d88db9 100644
--- a/lisp/cedet/semantic/db-ref.el
+++ b/lisp/cedet/semantic/db-ref.el
@@ -41,13 +41,9 @@
(require 'semantic/db)
(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)
include-tag)
"Add a reference for the database table DBT based on INCLUDE-TAG.
@@ -149,7 +145,6 @@ DBT, the second argument is DBT."
(i-include :initarg :i-include))
"Simple class to allow ADEBUG to show a nice list.")
-(defvar semanticdb-current-table)
(declare-function data-debug-new-buffer "data-debug")
(declare-function data-debug-insert-object-slots "eieio-datadebug")
diff --git a/lisp/cedet/semantic/db-typecache.el b/lisp/cedet/semantic/db-typecache.el
index 20d8851d90c..9f5b8dadc69 100644
--- a/lisp/cedet/semantic/db-typecache.el
+++ b/lisp/cedet/semantic/db-typecache.el
@@ -31,14 +31,11 @@
(require 'semantic)
(require 'semantic/db)
(require 'semantic/db-find)
-(require 'semantic/tag)
(require 'semantic/analyze/fcn)
;; 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")
diff --git a/lisp/cedet/semantic/db.el b/lisp/cedet/semantic/db.el
index 6fe79516b20..22c474cc0b2 100644
--- a/lisp/cedet/semantic/db.el
+++ b/lisp/cedet/semantic/db.el
@@ -30,9 +30,6 @@
;;
(require 'eieio)
-;; (require 'inversion)
-;; (eval-and-compile
-;; (inversion-require 'eieio "1.0"))
(require 'eieio-base)
(require 'semantic)
(eval-when-compile
@@ -590,7 +587,7 @@ The file associated with OBJ does not need to be in a buffer."
;; Assume it is now up to date.
(oset table unmatched-syntax semantic-unmatched-syntax-cache)
;; The lexical table should be good too.
- (when (featurep 'semantic-lex-spp)
+ (when (featurep 'semantic/lex-spp)
(oset table lexical-table (semantic-lex-spp-save-table)))
;; this implies dirtyness
(semanticdb-set-dirty table)
@@ -619,7 +616,7 @@ The file associated with OBJ does not need to be in a buffer."
(semanticdb-set-dirty table)
;; The lexical table may be modified.
- (when (featurep 'semantic-lex-spp)
+ (when (featurep 'semantic/lex-spp)
(oset table lexical-table (semantic-lex-spp-save-table)))
;; Incremental parser doesn't mokey around with this.
diff --git a/lisp/cedet/semantic/debug.el b/lisp/cedet/semantic/debug.el
index 31100e075c2..c805a2c8e9a 100644
--- a/lisp/cedet/semantic/debug.el
+++ b/lisp/cedet/semantic/debug.el
@@ -38,16 +38,22 @@
(require 'semantic)
(require 'eieio)
+(eval-when-compile (require 'semantic/find))
;;; Code:
+
+;;;###autoload
(defvar semantic-debug-parser-source nil
"For any buffer, the file name (no path) of the parser.
This would be a parser for a specific language, not the source
to one of the parser generators.")
+;;;###autoload
(make-variable-buffer-local 'semantic-debug-parser-source)
+;;;###autoload
(defvar semantic-debug-parser-class nil
"Class to create when building a debug parser object.")
+;;;###autoload
(make-variable-buffer-local 'semantic-debug-parser-class)
(defvar semantic-debug-enabled nil
@@ -561,4 +567,10 @@ A frame is of the form:
(provide 'semantic/debug)
+;; Local variables:
+;; generated-autoload-file: "loaddefs.el"
+;; generated-autoload-feature: semantic/loaddefs
+;; generated-autoload-load-name: "semantic/debug"
+;; End:
+
;;; semantic/debug.el ends here
diff --git a/lisp/cedet/semantic/decorate/include.el b/lisp/cedet/semantic/decorate/include.el
index c641dc74e1d..7acae52a58d 100644
--- a/lisp/cedet/semantic/decorate/include.el
+++ b/lisp/cedet/semantic/decorate/include.el
@@ -668,7 +668,7 @@ Argument EVENT describes the event that caused this function to be called."
))
(let* ((semanticdb-find-default-throttle
- (if (featurep 'semanticdb-find)
+ (if (featurep 'semantic/db-find)
(remq 'unloaded semanticdb-find-default-throttle)
nil))
(path (semanticdb-find-translate-path nil nil)))
diff --git a/lisp/cedet/semantic/format.el b/lisp/cedet/semantic/format.el
index 9f5256134a4..f967740ad2b 100644
--- a/lisp/cedet/semantic/format.el
+++ b/lisp/cedet/semantic/format.el
@@ -34,7 +34,6 @@
;;; Code:
(require 'semantic)
-(require 'semantic/tag)
(require 'semantic/tag-ls)
(require 'ezimage)
@@ -103,6 +102,20 @@ The name is the shortest possible representation.
Optional argument PARENT is the parent type if TAG is a detail.
Optional argument COLOR means highlight the prototype with font-lock colors.")
+(defun semantic-format-tag-name-default (tag &optional parent color)
+ "Return an abbreviated string describing TAG.
+Optional argument PARENT is the parent type if TAG is a detail.
+Optional argument COLOR means highlight the prototype with font-lock colors."
+ (let ((name (semantic-tag-name tag))
+ (destructor
+ (if (eq (semantic-tag-class tag) 'function)
+ (semantic-tag-function-destructor-p tag))))
+ (when destructor
+ (setq name (concat "~" name)))
+ (if color
+ (setq name (semantic--format-colorize-text name (semantic-tag-class tag))))
+ name))
+
;;;###autoload
(define-overloadable-function semantic-format-tag-prototype (tag &optional parent color)
"Return a prototype for TAG.
@@ -298,20 +311,6 @@ of FACE-CLASS for which this is used."
(stringp (car anything)))
(semantic--format-colorize-text (car anything) colorhint))))
-(defun semantic-format-tag-name-default (tag &optional parent color)
- "Return an abbreviated string describing TAG.
-Optional argument PARENT is the parent type if TAG is a detail.
-Optional argument COLOR means highlight the prototype with font-lock colors."
- (let ((name (semantic-tag-name tag))
- (destructor
- (if (eq (semantic-tag-class tag) 'function)
- (semantic-tag-function-destructor-p tag))))
- (when destructor
- (setq name (concat "~" name)))
- (if color
- (setq name (semantic--format-colorize-text name (semantic-tag-class tag))))
- name))
-
(declare-function semantic-go-to-tag "semantic/tag-file")
(defun semantic--format-tag-parent-tree (tag parent)
@@ -477,7 +476,6 @@ Optional argument COLOR means highlight the prototype with font-lock colors.")
"Display a short form of TAG's documentation. (Comments, or docstring.)
Optional argument PARENT is the parent type if TAG is a detail.
Optional argument COLOR means highlight the prototype with font-lock colors."
-
(let* ((fname (or (semantic-tag-file-name tag)
(when parent (semantic-tag-file-name parent))))
(buf (or (semantic-tag-buffer tag)
@@ -507,7 +505,7 @@ Optional argument COLOR means highlight the prototype with font-lock colors."
))
;;; Prototype generation
-;;
+
(defun semantic-format-tag-prototype-default (tag &optional parent color)
"Default method for returning a prototype for TAG.
This will work for C like languages.
diff --git a/lisp/cedet/semantic/html.el b/lisp/cedet/semantic/html.el
index a815792c648..5ed7908f893 100644
--- a/lisp/cedet/semantic/html.el
+++ b/lisp/cedet/semantic/html.el
@@ -230,6 +230,7 @@ tag with greater section value than LEVEL is found."
"The children TAG expands to."
(semantic-html-components tag))
+;;;###autoload
(defun semantic-default-html-setup ()
"Set up a buffer for parsing of HTML files."
;; This will use our parser.
@@ -253,6 +254,7 @@ tag with greater section value than LEVEL is found."
t)
)
+;;;###autoload
(add-hook 'html-mode-hook 'semantic-default-html-setup)
(define-child-mode html-helper-mode html-mode
@@ -260,4 +262,10 @@ tag with greater section value than LEVEL is found."
(provide 'semantic/html)
+;; Local variables:
+;; generated-autoload-file: "loaddefs.el"
+;; generated-autoload-feature: semantic/loaddefs
+;; generated-autoload-load-name: "semantic/html"
+;; End:
+
;;; semantic/html.el ends here
diff --git a/lisp/cedet/semantic/idle.el b/lisp/cedet/semantic/idle.el
index af96b26a9c5..dedeb465099 100644
--- a/lisp/cedet/semantic/idle.el
+++ b/lisp/cedet/semantic/idle.el
@@ -41,7 +41,6 @@
(require 'semantic/ctxt)
(require 'semantic/format)
(require 'semantic/tag)
-;(require 'semantic/util-modes)
(require 'timer)
;; For the semantic-find-tags-by-name macro.
diff --git a/lisp/cedet/semantic/scope.el b/lisp/cedet/semantic/scope.el
index 5a90b1095c8..a8654e90c07 100644
--- a/lisp/cedet/semantic/scope.el
+++ b/lisp/cedet/semantic/scope.el
@@ -49,7 +49,7 @@
(require 'semantic/analyze/fcn)
(require 'semantic/ctxt)
-(eval-when-compile (require 'semantic/find)) ; For semantic-find-* macros
+(eval-when-compile (require 'semantic/find))
(declare-function data-debug-show "eieio-datadebug")
(declare-function semantic-analyze-find-tag "semantic/analyze")
diff --git a/lisp/cedet/semantic/tag.el b/lisp/cedet/semantic/tag.el
index cf4967d3ffc..febe4046f84 100644
--- a/lisp/cedet/semantic/tag.el
+++ b/lisp/cedet/semantic/tag.el
@@ -333,6 +333,14 @@ If TAG is unlinked, but has a :filename property, then that is used."
That is the value of the `:members' attribute."
(semantic-tag-get-attribute tag :members))
+(defsubst semantic-tag-type (tag)
+ "Return the value of the `:type' attribute of TAG.
+For a function it would be the data type of the return value.
+For a variable, it is the storage type of that variable.
+For a data type, the type is the style of datatype, such as
+struct or union."
+ (semantic-tag-get-attribute tag :type))
+
(defun semantic-tag-with-position-p (tag)
"Return non-nil if TAG has positional information."
(and (semantic-tag-p tag)
@@ -356,14 +364,6 @@ of different cons cells."
(equal (semantic-tag-bounds tag1)
(semantic-tag-bounds tag2))))))
-(defsubst semantic-tag-type (tag)
- "Return the value of the `:type' attribute of TAG.
-For a function it would be the data type of the return value.
-For a variable, it is the storage type of that variable.
-For a data type, the type is the style of datatype, such as
-struct or union."
- (semantic-tag-get-attribute tag :type))
-
(defun semantic-tag-similar-p (tag1 tag2 &rest ignorable-attributes)
"Test to see if TAG1 and TAG2 are similar.
Two tags are similar if their name, datatype, and various attributes
@@ -752,7 +752,6 @@ It is safe for FILTER to modify the input tag and return it."
;;; Common
;;
-
(defsubst semantic-tag-modifiers (tag)
"Return the value of the `:typemodifiers' attribute of TAG."
(semantic-tag-get-attribute tag :typemodifiers))
@@ -814,6 +813,7 @@ If a simple search doesn't do it, try splitting up the names
in SUPERS."
(let ((stag nil))
(setq stag (semantic-find-first-tag-by-name name supers))
+
(when (not stag)
(require 'semantic/analyze/fcn)
(dolist (S supers)
@@ -1112,7 +1112,6 @@ For any given situation, additional ARGS may be passed."
;; Overlays are used so that we can quickly identify tags from
;; buffer positions and regions using built in Emacs commands.
;;
-
(defsubst semantic--tag-unlink-list-from-buffer (tags)
"Convert TAGS from using an overlay to using an overlay proxy.
This function is for internal use only."