summaryrefslogtreecommitdiff
path: root/lisp/cedet/semantic
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2009-09-05 23:04:46 +0000
committerChong Yidong <cyd@stupidchicken.com>2009-09-05 23:04:46 +0000
commit1fe1547aeee1f09d8c921c0d58424370b6cd539f (patch)
tree513a2e7750f9d1ad4d70f52082db19ba8f2510d8 /lisp/cedet/semantic
parenta4556861cd40d9e472ad951f11d778591a818d42 (diff)
downloademacs-1fe1547aeee1f09d8c921c0d58424370b6cd539f.tar.gz
lisp/cedet/semantic/db-ref.el: Require semantic/db.
(semanticdb-add-reference): Fix feature name. (semanticdb-ref-test): Require eieio-datadebug instead of data-debug. lisp/cedet/semantic/analyze/debug.el: Fix file header. lisp/cedet/semantic/analyze/refs.el: Add local vars for autoloading. Require semantic, semantic/analyze, and semantic/db-find. Declare external functions. (semantic-analyze-proto-impl-toggle): Autoload. Require semantic/decorate. (semantic-analyze-current-tag): Autoload. lisp/cedet/semantic/bovine/c.el: Declare external function. lisp/cedet/semantic/bovine/gcc.el: Add local vars for autoloading. (semantic-gcc-setup): Autoload. lisp/cedet/semantic/decorate/include.el: Declare external functions. lisp/cedet/semantic/symref/cscope.el: Declare external functions. lisp/cedet/semantic/symref/filter.el: Declare external functions. lisp/cedet/semantic/symref/list.el (semantic-symref-rb-goto-file) (semantic-symref-rb-goto-tag, semantic-symref-rb-goto-match): Use last-command-event. (semantic-symref, semantic-symref-symbol): Autoload.
Diffstat (limited to 'lisp/cedet/semantic')
-rw-r--r--lisp/cedet/semantic/analyze/debug.el9
-rw-r--r--lisp/cedet/semantic/analyze/refs.el19
-rw-r--r--lisp/cedet/semantic/bovine/c.el3
-rw-r--r--lisp/cedet/semantic/bovine/gcc.el10
-rw-r--r--lisp/cedet/semantic/db-ref.el7
-rw-r--r--lisp/cedet/semantic/decorate/include.el6
-rw-r--r--lisp/cedet/semantic/symref/cscope.el4
-rw-r--r--lisp/cedet/semantic/symref/filter.el7
-rw-r--r--lisp/cedet/semantic/symref/list.el16
9 files changed, 68 insertions, 13 deletions
diff --git a/lisp/cedet/semantic/analyze/debug.el b/lisp/cedet/semantic/analyze/debug.el
index db89f66e300..e482f074b31 100644
--- a/lisp/cedet/semantic/analyze/debug.el
+++ b/lisp/cedet/semantic/analyze/debug.el
@@ -32,6 +32,8 @@
;; For semantic-find-tags-by-class:
(eval-when-compile (require 'semantic/find))
+(declare-function ede-get-locator-object "ede/files")
+
;;; Code:
(defun semantic-analyze-debug-assist ()
@@ -399,12 +401,13 @@ or implementing a version specific to ")
(edeobj
(save-excursion
(set-buffer (semanticdb-get-buffer table))
- ede-object))
+ (and (boundp 'ede-object)
+ ede-object)))
(edeproj
(save-excursion
(set-buffer (semanticdb-get-buffer table))
- ede-object-project))
- )
+ (and (boundp 'ede-object-project)
+ ede-object-project))))
(princ "\n\nInclude Path Summary:")
(when edeobj
diff --git a/lisp/cedet/semantic/analyze/refs.el b/lisp/cedet/semantic/analyze/refs.el
index 653a682070d..62e68775d14 100644
--- a/lisp/cedet/semantic/analyze/refs.el
+++ b/lisp/cedet/semantic/analyze/refs.el
@@ -34,6 +34,15 @@
;; Once the raw data is available, queries for impl, prototype, or
;; perhaps other things become cheap.
+(require 'semantic)
+(require 'semantic/analyze)
+(require 'semantic/db-find)
+(eval-when-compile (require 'semantic/find))
+
+(declare-function data-debug-new-buffer "data-debug")
+(declare-function data-debug-insert-object-slots "eieio-datadebug")
+(declare-function semantic-momentary-highlight-tag "semantic/decorate")
+
;;; Code:
(defclass semantic-analyze-references ()
((tag :initarg :tag
@@ -270,6 +279,7 @@ Only works for tags in the global namespace."
;;; USER COMMANDS
;;
+;;;###autoload
(defun semantic-analyze-current-tag ()
"Analyze the tag under point."
(interactive)
@@ -281,13 +291,16 @@ Only works for tags in the global namespace."
(message "Analysis took %.2f seconds." (semantic-elapsed-time start end))
(if sac
(progn
+ (require 'eieio-datadebug)
(data-debug-new-buffer "*Analyzer Reference ADEBUG*")
(data-debug-insert-object-slots sac "]"))
(message "No Context to analyze here."))))
+;;;###autoload
(defun semantic-analyze-proto-impl-toggle ()
"Toggle between the implementation, and a prototype of tag under point."
(interactive)
+ (require 'semantic/decorate)
(semantic-fetch-tags)
(let* ((tag (semantic-current-tag))
(sar (if tag
@@ -312,4 +325,10 @@ Only works for tags in the global namespace."
(provide 'semantic/analyze/refs)
+;; Local variables:
+;; generated-autoload-file: "../loaddefs.el"
+;; generated-autoload-feature: semantic/loaddefs
+;; generated-autoload-load-name: "semantic/analyze/refs"
+;; End:
+
;;; semantic/analyze/refs.el ends here
diff --git a/lisp/cedet/semantic/bovine/c.el b/lisp/cedet/semantic/bovine/c.el
index 3ce198fa5c6..efcbfd351ce 100644
--- a/lisp/cedet/semantic/bovine/c.el
+++ b/lisp/cedet/semantic/bovine/c.el
@@ -44,6 +44,7 @@
(declare-function semanticdb-file-table-object "semantic/db")
(declare-function semanticdb-needs-refresh-p "semantic/db")
(declare-function c-forward-conditional "cc-cmds")
+(declare-function ede-system-include-path "ede")
;;; Compatibility
;;
@@ -1645,7 +1646,7 @@ DO NOT return the list of tags encompassing point."
)
(princ "\n\nInclude Path Summary:\n")
- (when ede-object
+ (when (and (boundp 'ede-object) ede-object)
(princ "\n This file's project include is handled by:\n")
(princ " ")
(princ (object-print ede-object))
diff --git a/lisp/cedet/semantic/bovine/gcc.el b/lisp/cedet/semantic/bovine/gcc.el
index 60a5924f1f7..a2217795b67 100644
--- a/lisp/cedet/semantic/bovine/gcc.el
+++ b/lisp/cedet/semantic/bovine/gcc.el
@@ -26,6 +26,8 @@
(require 'semantic/dep)
+(defvar semantic-lex-c-preprocessor-symbol-file)
+(defvar semantic-lex-c-preprocessor-symbol-map)
(declare-function semantic-c-reset-preprocessor-symbol-map
"semantic/bovine/gcc")
@@ -142,6 +144,7 @@ This is an alist, and should include keys of:
'--prefix - Where GCC was installed.
It should also include other symbols GCC was compiled with.")
+;;;###autoload
(defun semantic-gcc-setup ()
"Setup Semantic C/C++ parsing based on GCC output."
(interactive)
@@ -316,4 +319,11 @@ gcc version 2.95.2 19991024 (release)"
)
(provide 'semantic/bovine/gcc)
+
+;; Local variables:
+;; generated-autoload-file: "../loaddefs.el"
+;; generated-autoload-feature: semantic/loaddefs
+;; generated-autoload-load-name: "semantic/bovine/gcc"
+;; End:
+
;;; semantic/bovine/gcc.el ends here
diff --git a/lisp/cedet/semantic/db-ref.el b/lisp/cedet/semantic/db-ref.el
index 09286686519..97da206abff 100644
--- a/lisp/cedet/semantic/db-ref.el
+++ b/lisp/cedet/semantic/db-ref.el
@@ -38,6 +38,7 @@
;;; Code:
(require 'eieio)
(require 'semantic)
+(require 'semantic/db)
(require 'semantic/tag)
(defvar semanticdb-find-default-throttle)
@@ -55,7 +56,7 @@ will be added to the database that INCLUDE-TAG refers to."
;; NOTE: I should add a check to make sure include-tag is in DB.
;; but I'm too lazy.
(let* ((semanticdb-find-default-throttle
- (if (featurep 'semanticdb-find)
+ (if (featurep 'semantic/db-find)
(remq 'unloaded semanticdb-find-default-throttle)
nil))
(refdbt (semanticdb-find-table-for-include include-tag dbt))
@@ -150,14 +151,14 @@ DBT, the second argument is DBT."
(defvar semanticdb-current-table)
(declare-function data-debug-new-buffer "data-debug")
-(declare-function data-debug-insert-object-slots "data-debug")
+(declare-function data-debug-insert-object-slots "eieio-datadebug")
(defun semanticdb-ref-test (refresh)
"Dump out the list of references for the current buffer.
If REFRESH is non-nil, cause the current table to have it's references
refreshed before dumping the result."
(interactive "p")
- (require 'data-debug)
+ (require 'eieio-datadebug)
;; If we need to refresh... then do so.
(when refresh
(semanticdb-refresh-references semanticdb-current-table))
diff --git a/lisp/cedet/semantic/decorate/include.el b/lisp/cedet/semantic/decorate/include.el
index 5265aa90d0c..cf5c00c5a45 100644
--- a/lisp/cedet/semantic/decorate/include.el
+++ b/lisp/cedet/semantic/decorate/include.el
@@ -36,6 +36,8 @@
(require 'semantic/find))
(defvar semantic-dependency-system-include-path)
+(declare-function ede-get-locator-object "ede/files")
+(declare-function ede-system-include-path "ede/cpp-root")
;;; Code:
@@ -623,7 +625,9 @@ Argument EVENT describes the event that caused this function to be called."
)
(princ "\nInclude Path Summary:\n\n")
- (when ede-object
+ (when (and (boundp 'ede-object)
+ (boundp 'ede-object-project)
+ ede-object)
(princ " This file's project include search is handled by the EDE object:\n")
(princ " Buffer Target: ")
(princ (object-print ede-object))
diff --git a/lisp/cedet/semantic/symref/cscope.el b/lisp/cedet/semantic/symref/cscope.el
index 9d6eda9a5cf..2382d95cce1 100644
--- a/lisp/cedet/semantic/symref/cscope.el
+++ b/lisp/cedet/semantic/symref/cscope.el
@@ -26,6 +26,10 @@
(require 'cedet-cscope)
(require 'semantic/symref)
+(defvar ede-minor-mode)
+(declare-function ede-toplevel "ede/files")
+(declare-function ede-project-root-directory "ede/files")
+
;;; Code:
(defclass semantic-symref-tool-cscope (semantic-symref-tool-baseclass)
(
diff --git a/lisp/cedet/semantic/symref/filter.el b/lisp/cedet/semantic/symref/filter.el
index e366ec4b650..f6f4cb134b1 100644
--- a/lisp/cedet/semantic/symref/filter.el
+++ b/lisp/cedet/semantic/symref/filter.el
@@ -34,6 +34,11 @@
;;; Code:
(require 'semantic)
+(declare-function srecode-active-template-region "srecode/fields")
+(declare-function srecode-delete "srecode/fields")
+(declare-function srecode-field "srecode/fields")
+(declare-function srecode-template-inserted-region "srecode/fields")
+(declare-function srecode-overlaid-activate "srecode/fields")
;;; FILTERS
;;
@@ -123,7 +128,7 @@ Depends on the SRecode Field editing API."
;; I think we're good for this example. Give it a go through
;; our fancy interface from SRecode.
- (require 'srecode-fields)
+ (require 'srecode/fields)
;; Make sure there is nothing active.
(let ((ar (srecode-active-template-region)))
diff --git a/lisp/cedet/semantic/symref/list.el b/lisp/cedet/semantic/symref/list.el
index 74186c754a4..20d911225ab 100644
--- a/lisp/cedet/semantic/symref/list.el
+++ b/lisp/cedet/semantic/symref/list.el
@@ -38,6 +38,7 @@
;;; Code:
+;;;###autoload
(defun semantic-symref ()
"Find references to the current tag.
This command uses the currently configured references tool within the
@@ -60,6 +61,7 @@ Display the references in`semantic-symref-results-mode'"
(setq res (semantic-symref-find-references-by-name (semantic-tag-name ct)))
(semantic-symref-produce-list-on-results res (semantic-tag-name ct))))
+;;;###autoload
(defun semantic-symref-symbol (sym)
"Find references to the symbol SYM.
This command uses the currently configured references tool within the
@@ -276,7 +278,7 @@ BUTTON is the button that was clicked."
)
(switch-to-buffer-other-window buff)
(pulse-momentary-highlight-one-line (point))
- (when (eq last-command-char ? ) (select-window win))
+ (when (eq last-command-event ?\s) (select-window win))
))
@@ -291,7 +293,7 @@ BUTTON is the button that was clicked."
(switch-to-buffer-other-window buff)
(semantic-go-to-tag tag)
(pulse-momentary-highlight-one-line (point))
- (when (eq last-command-char ? ) (select-window win))
+ (when (eq last-command-event ?\s) (select-window win))
)
)
@@ -305,9 +307,9 @@ BUTTON is the button that was clicked."
(win (selected-window))
)
(switch-to-buffer-other-window buff)
- (goto-line line)
+ (with-no-warnings (goto-line line))
(pulse-momentary-highlight-one-line (point))
- (when (eq last-command-char ? ) (select-window win))
+ (when (eq last-command-event ?\s) (select-window win))
)
)
@@ -325,4 +327,10 @@ BUTTON is the button that was clicked."
(provide 'semantic/symref/list)
+;; Local variables:
+;; generated-autoload-file: "../loaddefs.el"
+;; generated-autoload-feature: semantic/loaddefs
+;; generated-autoload-load-name: "semantic/symref/list"
+;; End:
+
;;; semantic/symref/list.el ends here