diff options
| author | Chong Yidong | 2009-08-31 00:45:41 +0000 |
|---|---|---|
| committer | Chong Yidong | 2009-08-31 00:45:41 +0000 |
| commit | 691a065ecb6920eb73f2a72229b8c803202a00b6 (patch) | |
| tree | bc828c8002ac6d2f65c93d144038687b1d045bec | |
| parent | afa85dfef0d74a70c383cdcd7ed7dc10f4e50025 (diff) | |
| download | emacs-691a065ecb6920eb73f2a72229b8c803202a00b6.tar.gz emacs-691a065ecb6920eb73f2a72229b8c803202a00b6.zip | |
cedet/semantic/db-debug.el: Don't require semantic/db-mode, since
semanticdb-current-database and semanticdb-current-table are now in
semantic/db.el.
cedet/semantic/db-ebrowse.el: Don't require semantic/db-mode, since
semanticdb-current-database and semanticdb-current-table are now in
semantic/db.el.
cedet/semantic/db-el.el: Require semantic/lex-spp.
Require semantic/db instead of semantic/db-search.
cedet/semantic/db-file.el: Declare inversion-test and
data-debug-insert-thing.
(semanticdb-load-database): Load inversion only if necessary.
cedet/semantic/db-find.el: Autoload semanticdb-find-default-throttle.
Defvar data-debug-thing-alist, and ede-current-project.
Declare data-debug-insert-stuff-list, data-debug-insert-tag-list,
semantic-scope-reset-cache, and semanticdb-typecache-notify-reset.
Require semantic/tag-file, and semantic/sort.
(semantic-reset): Require semantic/scope.
(semanticdb-partial-synchronize): Require semantic/db-typecache.
(semanticdb-find-table-for-include) Move up to avoid compiler warning.
cedet/semantic/db-global.el: Declare data-debug-new-buffer and
data-debug-insert-thing.
(semanticdb-project-database-global) Move up to avoid compiler warning.
cedet/semantic/db-javascript.el: Fix provide statement.
Require semantic/db-find instead of semantic/db-search.
cedet/semantic/db-mode.el: Declare semantic-lex-spp-set-dynamic-table.
(semanticdb-current-database, semanticdb-current-table): Move into
semantic/db.el
cedet/semantic/db-ref.el: Require eieio, semantic/db, and semantic/util.
Declare data-debug-new-buffer and data-debug-insert-object-slots.
Defvar semantic-case-fold. Require semantic/find when compiling.
cedet/semantic/db-typecache.el: Require semantic/tag-ls,
semantic/analyze/fcn, and semantic/scope. Declare
data-debug-insert-thing and data-debug-new-buffer.
cedet/semantic/db.el (semanticdb-search-results-table): Move class
definition here from semantic/db-search.el.
(semanticdb-current-database, semanticdb-current-table) Move variable
definitions here from semantic/db-mode.el.
| -rw-r--r-- | lisp/cedet/semantic/db-debug.el | 1 | ||||
| -rw-r--r-- | lisp/cedet/semantic/db-ebrowse.el | 1 | ||||
| -rw-r--r-- | lisp/cedet/semantic/db-el.el | 7 | ||||
| -rw-r--r-- | lisp/cedet/semantic/db-file.el | 47 | ||||
| -rw-r--r-- | lisp/cedet/semantic/db-find.el | 31 | ||||
| -rw-r--r-- | lisp/cedet/semantic/db-global.el | 20 | ||||
| -rw-r--r-- | lisp/cedet/semantic/db-javascript.el | 10 | ||||
| -rw-r--r-- | lisp/cedet/semantic/db-mode.el | 16 | ||||
| -rw-r--r-- | lisp/cedet/semantic/db-ref.el | 20 | ||||
| -rw-r--r-- | lisp/cedet/semantic/db-typecache.el | 6 | ||||
| -rw-r--r-- | lisp/cedet/semantic/db.el | 22 |
11 files changed, 127 insertions, 54 deletions
diff --git a/lisp/cedet/semantic/db-debug.el b/lisp/cedet/semantic/db-debug.el index 52ae605f6a0..cf188af8323 100644 --- a/lisp/cedet/semantic/db-debug.el +++ b/lisp/cedet/semantic/db-debug.el | |||
| @@ -26,7 +26,6 @@ | |||
| 26 | 26 | ||
| 27 | (require 'data-debug) | 27 | (require 'data-debug) |
| 28 | (require 'semantic/db) | 28 | (require 'semantic/db) |
| 29 | (require 'semantic/db-mode) | ||
| 30 | (require 'semantic/format) | 29 | (require 'semantic/format) |
| 31 | 30 | ||
| 32 | ;;; Code: | 31 | ;;; Code: |
diff --git a/lisp/cedet/semantic/db-ebrowse.el b/lisp/cedet/semantic/db-ebrowse.el index 96f8285e508..bccd6748a20 100644 --- a/lisp/cedet/semantic/db-ebrowse.el +++ b/lisp/cedet/semantic/db-ebrowse.el | |||
| @@ -56,7 +56,6 @@ | |||
| 56 | (require 'eieio-opt) | 56 | (require 'eieio-opt) |
| 57 | ) | 57 | ) |
| 58 | (require 'semantic/db-file) | 58 | (require 'semantic/db-file) |
| 59 | (require 'semantic/db-mode) | ||
| 60 | (require 'semantic/find) | 59 | (require 'semantic/find) |
| 61 | (require 'semantic/sort) | 60 | (require 'semantic/sort) |
| 62 | (require 'data-debug) | 61 | (require 'data-debug) |
diff --git a/lisp/cedet/semantic/db-el.el b/lisp/cedet/semantic/db-el.el index 3db6c15570e..e1459f259cc 100644 --- a/lisp/cedet/semantic/db-el.el +++ b/lisp/cedet/semantic/db-el.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; db-el.el --- Semantic database extensions for Emacs Lisp | 1 | ;;; semantic/db-el.el --- Semantic database extensions for Emacs Lisp |
| 2 | 2 | ||
| 3 | ;;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 | 3 | ;;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 |
| 4 | ;;; Free Software Foundation, Inc. | 4 | ;;; Free Software Foundation, Inc. |
| @@ -31,7 +31,8 @@ | |||
| 31 | ;; to also work in Emacs Lisp with no compromises. | 31 | ;; to also work in Emacs Lisp with no compromises. |
| 32 | ;; | 32 | ;; |
| 33 | 33 | ||
| 34 | (require 'semantic/db-search) | 34 | (require 'semantic/db) |
| 35 | |||
| 35 | (eval-when-compile | 36 | (eval-when-compile |
| 36 | ;; For generic function searching. | 37 | ;; For generic function searching. |
| 37 | (require 'eieio) | 38 | (require 'eieio) |
| @@ -340,4 +341,4 @@ Return a list of tags." | |||
| 340 | 341 | ||
| 341 | (provide 'semantic/db-el) | 342 | (provide 'semantic/db-el) |
| 342 | 343 | ||
| 343 | ;;; semanticdb-el.el ends here | 344 | ;;; semantic/db-el.el ends here |
diff --git a/lisp/cedet/semantic/db-file.el b/lisp/cedet/semantic/db-file.el index a16f9bbf14a..12cadc43c61 100644 --- a/lisp/cedet/semantic/db-file.el +++ b/lisp/cedet/semantic/db-file.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; db-file.el --- Save a semanticdb to a cache file. | 1 | ;;; semantic/db-file.el --- Save a semanticdb to a cache file. |
| 2 | 2 | ||
| 3 | ;;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009 | 3 | ;;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009 |
| 4 | ;;; Free Software Foundation, Inc. | 4 | ;;; Free Software Foundation, Inc. |
| @@ -147,9 +147,11 @@ If DIRECTORY doesn't exist, create a new one." | |||
| 147 | db)) | 147 | db)) |
| 148 | 148 | ||
| 149 | ;;; File IO | 149 | ;;; File IO |
| 150 | |||
| 151 | (declare-function inversion-test "inversion") | ||
| 152 | |||
| 150 | (defun semanticdb-load-database (filename) | 153 | (defun semanticdb-load-database (filename) |
| 151 | "Load the database FILENAME." | 154 | "Load the database FILENAME." |
| 152 | (require 'inversion) | ||
| 153 | (condition-case foo | 155 | (condition-case foo |
| 154 | (let* ((r (eieio-persistent-read filename)) | 156 | (let* ((r (eieio-persistent-read filename)) |
| 155 | (c (semanticdb-get-database-tables r)) | 157 | (c (semanticdb-get-database-tables r)) |
| @@ -160,23 +162,26 @@ If DIRECTORY doesn't exist, create a new one." | |||
| 160 | (while c | 162 | (while c |
| 161 | (oset (car c) parent-db r) | 163 | (oset (car c) parent-db r) |
| 162 | (setq c (cdr c))) | 164 | (setq c (cdr c))) |
| 163 | (if (not (inversion-test 'semanticdb-file fv)) | 165 | (unless (and (equal semanticdb-file-version fv) |
| 164 | (when (inversion-test 'semantic-tag tv) | 166 | (equal semantic-tag-version tv)) |
| 165 | ;; Incompatible version. Flush tables. | 167 | ;; Try not to load inversion unless we need it: |
| 166 | (semanticdb-flush-database-tables r) | 168 | (require 'inversion) |
| 167 | ;; Reset the version to new version. | 169 | (if (not (inversion-test 'semanticdb-file fv)) |
| 168 | (oset r semantic-tag-version semantic-tag-version) | 170 | (when (inversion-test 'semantic-tag tv) |
| 169 | ;; Warn user | 171 | ;; Incompatible version. Flush tables. |
| 170 | (message "Semanticdb file is old. Starting over for %s" | 172 | (semanticdb-flush-database-tables r) |
| 171 | filename) | 173 | ;; Reset the version to new version. |
| 172 | ) | 174 | (oset r semantic-tag-version semantic-tag-version) |
| 173 | ;; Version is not ok. Flush whole system | 175 | ;; Warn user |
| 174 | (message "semanticdb file is old. Starting over for %s" | 176 | (message "Semanticdb file is old. Starting over for %s" |
| 175 | filename) | 177 | filename)) |
| 176 | ;; This database is so old, we need to replace it. | 178 | ;; Version is not ok. Flush whole system |
| 177 | ;; We also need to delete it from the instance tracker. | 179 | (message "semanticdb file is old. Starting over for %s" |
| 178 | (delete-instance r) | 180 | filename) |
| 179 | (setq r nil)) | 181 | ;; This database is so old, we need to replace it. |
| 182 | ;; We also need to delete it from the instance tracker. | ||
| 183 | (delete-instance r) | ||
| 184 | (setq r nil))) | ||
| 180 | r) | 185 | r) |
| 181 | (error (message "Cache Error: [%s] %s, Restart" | 186 | (error (message "Cache Error: [%s] %s, Restart" |
| 182 | filename foo) | 187 | filename foo) |
| @@ -262,6 +267,8 @@ Live files are either buffers in Emacs, or files existing on the filesystem." | |||
| 262 | This variable is set to nil after the first error is encountered | 267 | This variable is set to nil after the first error is encountered |
| 263 | to prevent overload.") | 268 | to prevent overload.") |
| 264 | 269 | ||
| 270 | (declare-function data-debug-insert-thing "data-debug") | ||
| 271 | |||
| 265 | (defmethod object-write ((obj semanticdb-table)) | 272 | (defmethod object-write ((obj semanticdb-table)) |
| 266 | "When writing a table, we have to make sure we deoverlay it first. | 273 | "When writing a table, we have to make sure we deoverlay it first. |
| 267 | Restore the overlays after writting. | 274 | Restore the overlays after writting. |
| @@ -435,4 +442,4 @@ Optional NOERROR prevents errors from being displayed." | |||
| 435 | 442 | ||
| 436 | (provide 'semantic/db-file) | 443 | (provide 'semantic/db-file) |
| 437 | 444 | ||
| 438 | ;;; semanticdb-file.el ends here | 445 | ;;; semantic/db-file.el ends here |
diff --git a/lisp/cedet/semantic/db-find.el b/lisp/cedet/semantic/db-find.el index 681b7d2066c..d81d5c1cadd 100644 --- a/lisp/cedet/semantic/db-find.el +++ b/lisp/cedet/semantic/db-find.el | |||
| @@ -121,7 +121,20 @@ | |||
| 121 | (require 'eieio) | 121 | (require 'eieio) |
| 122 | ) | 122 | ) |
| 123 | 123 | ||
| 124 | (require 'semantic/find) | ||
| 125 | |||
| 126 | (require 'semantic/tag-file) | ||
| 127 | (require 'semantic/sort) | ||
| 128 | |||
| 124 | ;;; Code: | 129 | ;;; Code: |
| 130 | |||
| 131 | (defvar data-debug-thing-alist) | ||
| 132 | (declare-function data-debug-insert-stuff-list "data-debug") | ||
| 133 | (declare-function data-debug-insert-tag-list "data-debug") | ||
| 134 | (declare-function semantic-scope-reset-cache "semantic/scope") | ||
| 135 | (declare-function semanticdb-typecache-notify-reset "semantic/db-typecache") | ||
| 136 | (declare-function ede-current-project "ede") | ||
| 137 | |||
| 125 | (defvar semanticdb-find-throttle-custom-list | 138 | (defvar semanticdb-find-throttle-custom-list |
| 126 | '(repeat (radio (const 'local) | 139 | '(repeat (radio (const 'local) |
| 127 | (const 'project) | 140 | (const 'project) |
| @@ -132,6 +145,7 @@ | |||
| 132 | "Customization values for semanticdb find throttle. | 145 | "Customization values for semanticdb find throttle. |
| 133 | See `semanticdb-find-throttle' for details.") | 146 | See `semanticdb-find-throttle' for details.") |
| 134 | 147 | ||
| 148 | ;;;###autoload | ||
| 135 | (defcustom semanticdb-find-default-throttle | 149 | (defcustom semanticdb-find-default-throttle |
| 136 | '(local project unloaded system recursive) | 150 | '(local project unloaded system recursive) |
| 137 | "The default throttle for `semanticdb-find' routines. | 151 | "The default throttle for `semanticdb-find' routines. |
| @@ -188,6 +202,7 @@ This class will cache data derived during various searches.") | |||
| 188 | 202 | ||
| 189 | (defmethod semantic-reset ((idx semanticdb-find-search-index)) | 203 | (defmethod semantic-reset ((idx semanticdb-find-search-index)) |
| 190 | "Reset the object IDX." | 204 | "Reset the object IDX." |
| 205 | (require 'semantic/scope) | ||
| 191 | ;; Clear the include path. | 206 | ;; Clear the include path. |
| 192 | (oset idx include-path nil) | 207 | (oset idx include-path nil) |
| 193 | (when (oref idx type-cache) | 208 | (when (oref idx type-cache) |
| @@ -233,6 +248,7 @@ This class will cache data derived during various searches.") | |||
| 233 | (let ((tab-idx (semanticdb-get-table-index tab))) | 248 | (let ((tab-idx (semanticdb-get-table-index tab))) |
| 234 | ;; Not a full reset? | 249 | ;; Not a full reset? |
| 235 | (when (oref tab-idx type-cache) | 250 | (when (oref tab-idx type-cache) |
| 251 | (require 'db-typecache) | ||
| 236 | (semanticdb-typecache-notify-reset | 252 | (semanticdb-typecache-notify-reset |
| 237 | (oref tab-idx type-cache))) | 253 | (oref tab-idx type-cache))) |
| 238 | ))) | 254 | ))) |
| @@ -300,6 +316,13 @@ Default action as described in `semanticdb-find-translate-path'." | |||
| 300 | (semanticdb-find-translate-path-brutish-default path) | 316 | (semanticdb-find-translate-path-brutish-default path) |
| 301 | (semanticdb-find-translate-path-includes-default path)))) | 317 | (semanticdb-find-translate-path-includes-default path)))) |
| 302 | 318 | ||
| 319 | (define-overloadable-function semanticdb-find-table-for-include (includetag &optional table) | ||
| 320 | "For a single INCLUDETAG found in TABLE, find a `semanticdb-table' object | ||
| 321 | INCLUDETAG is a semantic TAG of class 'include. | ||
| 322 | TABLE is a semanticdb table that identifies where INCLUDETAG came from. | ||
| 323 | TABLE is optional if INCLUDETAG has an overlay of :filename attribute." | ||
| 324 | ) | ||
| 325 | |||
| 303 | (defun semanticdb-find-translate-path-brutish-default (path) | 326 | (defun semanticdb-find-translate-path-brutish-default (path) |
| 304 | "Translate PATH into a list of semantic tables. | 327 | "Translate PATH into a list of semantic tables. |
| 305 | Default action as described in `semanticdb-find-translate-path'." | 328 | Default action as described in `semanticdb-find-translate-path'." |
| @@ -582,13 +605,6 @@ isn't in memory yet." | |||
| 582 | "Load an unloaded file in FILENAME using the default semanticdb loader." | 605 | "Load an unloaded file in FILENAME using the default semanticdb loader." |
| 583 | (semanticdb-file-table-object filename)) | 606 | (semanticdb-file-table-object filename)) |
| 584 | 607 | ||
| 585 | (define-overloadable-function semanticdb-find-table-for-include (includetag &optional table) | ||
| 586 | "For a single INCLUDETAG found in TABLE, find a `semanticdb-table' object | ||
| 587 | INCLUDETAG is a semantic TAG of class 'include. | ||
| 588 | TABLE is a semanticdb table that identifies where INCLUDETAG came from. | ||
| 589 | TABLE is optional if INCLUDETAG has an overlay of :filename attribute." | ||
| 590 | ) | ||
| 591 | |||
| 592 | (defun semanticdb-find-table-for-include-default (includetag &optional table) | 608 | (defun semanticdb-find-table-for-include-default (includetag &optional table) |
| 593 | "Default implementation of `semanticdb-find-table-for-include'. | 609 | "Default implementation of `semanticdb-find-table-for-include'. |
| 594 | Uses `semanticdb-current-database-list' as the search path. | 610 | Uses `semanticdb-current-database-list' as the search path. |
| @@ -1079,7 +1095,6 @@ Returns result." | |||
| 1079 | (semanticdb-find-log-move-to-end))) | 1095 | (semanticdb-find-log-move-to-end))) |
| 1080 | 1096 | ||
| 1081 | ;;; Semanticdb find API functions | 1097 | ;;; Semanticdb find API functions |
| 1082 | ;; | ||
| 1083 | ;; These are the routines actually used to perform searches. | 1098 | ;; These are the routines actually used to perform searches. |
| 1084 | ;; | 1099 | ;; |
| 1085 | (defun semanticdb-find-tags-collector (function &optional path find-file-match | 1100 | (defun semanticdb-find-tags-collector (function &optional path find-file-match |
diff --git a/lisp/cedet/semantic/db-global.el b/lisp/cedet/semantic/db-global.el index 1677f574cea..373b0df8963 100644 --- a/lisp/cedet/semantic/db-global.el +++ b/lisp/cedet/semantic/db-global.el | |||
| @@ -29,7 +29,7 @@ | |||
| 29 | ;; | 29 | ;; |
| 30 | 30 | ||
| 31 | (require 'cedet-global) | 31 | (require 'cedet-global) |
| 32 | (require 'semantic/db-search) | 32 | (require 'semantic/db-find) |
| 33 | (require 'semantic/symref/global) | 33 | (require 'semantic/symref/global) |
| 34 | 34 | ||
| 35 | (eval-when-compile | 35 | (eval-when-compile |
| @@ -37,7 +37,13 @@ | |||
| 37 | (require 'eieio) | 37 | (require 'eieio) |
| 38 | (require 'eieio-opt) | 38 | (require 'eieio-opt) |
| 39 | ) | 39 | ) |
| 40 | |||
| 40 | ;;; Code: | 41 | ;;; Code: |
| 42 | |||
| 43 | (declare-function data-debug-new-buffer "data-debug") | ||
| 44 | (declare-function data-debug-insert-thing result "data-debug") | ||
| 45 | |||
| 46 | |||
| 41 | (defun semanticdb-enable-gnu-global-databases (mode) | 47 | (defun semanticdb-enable-gnu-global-databases (mode) |
| 42 | "Enable the use of the GNU Global SemanticDB back end for all files of MODE. | 48 | "Enable the use of the GNU Global SemanticDB back end for all files of MODE. |
| 43 | This will add an instance of a GNU Global database to each buffer | 49 | This will add an instance of a GNU Global database to each buffer |
| @@ -67,6 +73,12 @@ in a GNU Global supported hierarchy." | |||
| 67 | MODE is the major mode to support." | 73 | MODE is the major mode to support." |
| 68 | (semanticdb-enable-gnu-global-in-buffer t)) | 74 | (semanticdb-enable-gnu-global-in-buffer t)) |
| 69 | 75 | ||
| 76 | (defclass semanticdb-project-database-global | ||
| 77 | ;; @todo - convert to one DB per directory. | ||
| 78 | (semanticdb-project-database eieio-instance-tracker) | ||
| 79 | () | ||
| 80 | "Database representing a GNU Global tags file.") | ||
| 81 | |||
| 70 | (defun semanticdb-enable-gnu-global-in-buffer (&optional dont-err-if-not-available) | 82 | (defun semanticdb-enable-gnu-global-in-buffer (&optional dont-err-if-not-available) |
| 71 | "Enable a GNU Global database in the current buffer. | 83 | "Enable a GNU Global database in the current buffer. |
| 72 | Argument DONT-ERR-IF-NOT-AVAILABLE will throw an error if GNU Global | 84 | Argument DONT-ERR-IF-NOT-AVAILABLE will throw an error if GNU Global |
| @@ -94,12 +106,6 @@ is not available for this directory." | |||
| 94 | ) | 106 | ) |
| 95 | "A table for returning search results from GNU Global.") | 107 | "A table for returning search results from GNU Global.") |
| 96 | 108 | ||
| 97 | (defclass semanticdb-project-database-global | ||
| 98 | ;; @todo - convert to one DB per directory. | ||
| 99 | (semanticdb-project-database eieio-instance-tracker) | ||
| 100 | () | ||
| 101 | "Database representing a GNU Global tags file.") | ||
| 102 | |||
| 103 | (defmethod semanticdb-equivalent-mode ((table semanticdb-table-global) &optional buffer) | 109 | (defmethod semanticdb-equivalent-mode ((table semanticdb-table-global) &optional buffer) |
| 104 | "Return t, pretend that this table's mode is equivalent to BUFFER. | 110 | "Return t, pretend that this table's mode is equivalent to BUFFER. |
| 105 | Equivalent modes are specified by by `semantic-equivalent-major-modes' | 111 | Equivalent modes are specified by by `semantic-equivalent-major-modes' |
diff --git a/lisp/cedet/semantic/db-javascript.el b/lisp/cedet/semantic/db-javascript.el index dca2c38d4a6..02c089e6ee9 100644 --- a/lisp/cedet/semantic/db-javascript.el +++ b/lisp/cedet/semantic/db-javascript.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; db-javascript.el --- Semantic database extensions for javascript | 1 | ;;; semantic/db-javascript.el --- Semantic database extensions for javascript |
| 2 | 2 | ||
| 3 | ;;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 | 3 | ;;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 |
| 4 | ;;; Free Software Foundation, Inc. | 4 | ;;; Free Software Foundation, Inc. |
| @@ -29,7 +29,9 @@ | |||
| 29 | ;; the list of tags. | 29 | ;; the list of tags. |
| 30 | ;; | 30 | ;; |
| 31 | 31 | ||
| 32 | (require 'semantic/db-search) | 32 | (require 'semantic/db) |
| 33 | (require 'semantic/db-find) | ||
| 34 | |||
| 33 | (eval-when-compile | 35 | (eval-when-compile |
| 34 | ;; For generic function searching. | 36 | ;; For generic function searching. |
| 35 | (require 'eieio) | 37 | (require 'eieio) |
| @@ -305,6 +307,6 @@ Return a list of tags." | |||
| 305 | ;; function encodeURIComponent (uriComponent){} | 307 | ;; function encodeURIComponent (uriComponent){} |
| 306 | 308 | ||
| 307 | 309 | ||
| 308 | (provide 'semantic/db-el) | 310 | (provide 'semantic/db-javascript) |
| 309 | 311 | ||
| 310 | ;;; semanticdb-el.el ends here | 312 | ;;; semantic/db-javascript.el ends here |
diff --git a/lisp/cedet/semantic/db-mode.el b/lisp/cedet/semantic/db-mode.el index f1baf920ff8..b34fd0b99a5 100644 --- a/lisp/cedet/semantic/db-mode.el +++ b/lisp/cedet/semantic/db-mode.el | |||
| @@ -25,13 +25,17 @@ | |||
| 25 | 25 | ||
| 26 | (require 'semantic/db) | 26 | (require 'semantic/db) |
| 27 | ;;; Code: | 27 | ;;; Code: |
| 28 | (defvar semanticdb-current-database nil | ||
| 29 | "For a given buffer, this is the currently active database.") | ||
| 30 | (make-variable-buffer-local 'semanticdb-current-database) | ||
| 31 | 28 | ||
| 32 | (defvar semanticdb-current-table nil | 29 | ;; Moved into semantic/db.el: |
| 33 | "For a given buffer, this is the currently active database table.") | 30 | ;; (defvar semanticdb-current-database nil |
| 34 | (make-variable-buffer-local 'semanticdb-current-table) | 31 | ;; "For a given buffer, this is the currently active database.") |
| 32 | ;; (make-variable-buffer-local 'semanticdb-current-database) | ||
| 33 | |||
| 34 | ;; (defvar semanticdb-current-table nil | ||
| 35 | ;; "For a given buffer, this is the currently active database table.") | ||
| 36 | ;; (make-variable-buffer-local 'semanticdb-current-table) | ||
| 37 | |||
| 38 | (declare-function semantic-lex-spp-set-dynamic-table "semantic/lex-spp") | ||
| 35 | 39 | ||
| 36 | (defcustom semanticdb-global-mode nil | 40 | (defcustom semanticdb-global-mode nil |
| 37 | "*If non-nil enable the use of `semanticdb-minor-mode'." | 41 | "*If non-nil enable the use of `semanticdb-minor-mode'." |
diff --git a/lisp/cedet/semantic/db-ref.el b/lisp/cedet/semantic/db-ref.el index 62faf9933c2..45f87edbc6e 100644 --- a/lisp/cedet/semantic/db-ref.el +++ b/lisp/cedet/semantic/db-ref.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; db-ref.el --- Handle cross-db file references | 1 | ;;; semantic/db-ref.el --- Handle cross-db file references |
| 2 | 2 | ||
| 3 | ;;; Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc. | 3 | ;;; Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc. |
| 4 | 4 | ||
| @@ -36,6 +36,16 @@ | |||
| 36 | 36 | ||
| 37 | 37 | ||
| 38 | ;;; Code: | 38 | ;;; Code: |
| 39 | (require 'eieio) | ||
| 40 | (require 'semantic/db) | ||
| 41 | (require 'semantic/util) | ||
| 42 | |||
| 43 | (defvar semanticdb-find-default-throttle) | ||
| 44 | |||
| 45 | ;; For the semantic-find-tags-by-name-regexp macro. | ||
| 46 | (eval-when-compile (require 'semantic/find)) | ||
| 47 | (defvar semantic-case-fold) | ||
| 48 | |||
| 39 | (defmethod semanticdb-add-reference ((dbt semanticdb-abstract-table) | 49 | (defmethod semanticdb-add-reference ((dbt semanticdb-abstract-table) |
| 40 | include-tag) | 50 | include-tag) |
| 41 | "Add a reference for the database table DBT based on INCLUDE-TAG. | 51 | "Add a reference for the database table DBT based on INCLUDE-TAG. |
| @@ -137,11 +147,17 @@ DBT, the second argument is DBT." | |||
| 137 | (i-include :initarg :i-include)) | 147 | (i-include :initarg :i-include)) |
| 138 | "Simple class to allow ADEBUG to show a nice list.") | 148 | "Simple class to allow ADEBUG to show a nice list.") |
| 139 | 149 | ||
| 150 | (defvar semanticdb-current-table) | ||
| 151 | (declare-function data-debug-new-buffer "data-debug") | ||
| 152 | (declare-function data-debug-insert-object-slots "data-debug") | ||
| 153 | |||
| 140 | (defun semanticdb-ref-test (refresh) | 154 | (defun semanticdb-ref-test (refresh) |
| 141 | "Dump out the list of references for the current buffer. | 155 | "Dump out the list of references for the current buffer. |
| 142 | If REFRESH is non-nil, cause the current table to have it's references | 156 | If REFRESH is non-nil, cause the current table to have it's references |
| 143 | refreshed before dumping the result." | 157 | refreshed before dumping the result." |
| 144 | (interactive "p") | 158 | (interactive "p") |
| 159 | (require 'data-debug) | ||
| 160 | (require 'semantic/db) | ||
| 145 | ;; If we need to refresh... then do so. | 161 | ;; If we need to refresh... then do so. |
| 146 | (when refresh | 162 | (when refresh |
| 147 | (semanticdb-refresh-references semanticdb-current-table)) | 163 | (semanticdb-refresh-references semanticdb-current-table)) |
| @@ -158,4 +174,4 @@ refreshed before dumping the result." | |||
| 158 | ) | 174 | ) |
| 159 | 175 | ||
| 160 | (provide 'semantic/db-ref) | 176 | (provide 'semantic/db-ref) |
| 161 | ;;; semanticdb-ref.el ends here | 177 | ;;; semantic/db-ref.el ends here |
diff --git a/lisp/cedet/semantic/db-typecache.el b/lisp/cedet/semantic/db-typecache.el index 689e6d903f0..a0827ee0feb 100644 --- a/lisp/cedet/semantic/db-typecache.el +++ b/lisp/cedet/semantic/db-typecache.el | |||
| @@ -30,6 +30,12 @@ | |||
| 30 | 30 | ||
| 31 | (require 'semantic/db) | 31 | (require 'semantic/db) |
| 32 | (require 'semantic/db-find) | 32 | (require 'semantic/db-find) |
| 33 | (require 'semantic/tag-ls) | ||
| 34 | (require 'semantic/analyze/fcn) | ||
| 35 | (require 'semantic/scope) | ||
| 36 | |||
| 37 | (declare-function data-debug-insert-thing "data-debug") | ||
| 38 | (declare-function data-debug-new-buffer "data-debug") | ||
| 33 | 39 | ||
| 34 | ;;; Code: | 40 | ;;; Code: |
| 35 | 41 | ||
diff --git a/lisp/cedet/semantic/db.el b/lisp/cedet/semantic/db.el index 807b7b3cfb0..ea8bcc91957 100644 --- a/lisp/cedet/semantic/db.el +++ b/lisp/cedet/semantic/db.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; db.el --- Semantic tag database manager | 1 | ;;; semantic/db.el --- Semantic tag database manager |
| 2 | 2 | ||
| 3 | ;;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, | 3 | ;;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, |
| 4 | ;;; 2008, 2009 Free Software Foundation, Inc. | 4 | ;;; 2008, 2009 Free Software Foundation, Inc. |
| @@ -59,6 +59,13 @@ mechanism.") | |||
| 59 | This can be changed to try out new types of search indicies.") | 59 | This can be changed to try out new types of search indicies.") |
| 60 | (make-variable-buffer-local 'semanticdb-default-find=index-class) | 60 | (make-variable-buffer-local 'semanticdb-default-find=index-class) |
| 61 | 61 | ||
| 62 | (defvar semanticdb-current-database nil | ||
| 63 | "For a given buffer, this is the currently active database.") | ||
| 64 | (make-variable-buffer-local 'semanticdb-current-database) | ||
| 65 | |||
| 66 | (defvar semanticdb-current-table nil | ||
| 67 | "For a given buffer, this is the currently active database table.") | ||
| 68 | (make-variable-buffer-local 'semanticdb-current-table) | ||
| 62 | 69 | ||
| 63 | ;;; ABSTRACT CLASSES | 70 | ;;; ABSTRACT CLASSES |
| 64 | ;; | 71 | ;; |
| @@ -151,6 +158,17 @@ Adds the number of tags in this file to the object print name." | |||
| 151 | ) | 158 | ) |
| 152 | strings))) | 159 | strings))) |
| 153 | 160 | ||
| 161 | (defclass semanticdb-search-results-table (semanticdb-abstract-table) | ||
| 162 | ( ) | ||
| 163 | "Table used for search results when there is no file or table association. | ||
| 164 | Examples include search results from external sources such as from | ||
| 165 | Emacs' own symbol table, or from external libraries.") | ||
| 166 | |||
| 167 | (defmethod semanticdb-refresh-table ((obj semanticdb-search-results-table) &optional force) | ||
| 168 | "If the tag list associated with OBJ is loaded, refresh it. | ||
| 169 | This will call `semantic-fetch-tags' if that file is in memory." | ||
| 170 | nil) | ||
| 171 | |||
| 154 | ;;; Index Cache | 172 | ;;; Index Cache |
| 155 | ;; | 173 | ;; |
| 156 | (defclass semanticdb-abstract-search-index () | 174 | (defclass semanticdb-abstract-search-index () |
| @@ -986,4 +1004,4 @@ If file does not have tags available, then load the file, and create them." | |||
| 986 | 1004 | ||
| 987 | (provide 'semantic/db) | 1005 | (provide 'semantic/db) |
| 988 | 1006 | ||
| 989 | ;;; semanticdb.el ends here | 1007 | ;;; semantic/db.el ends here |