comparison lisp/cedet/semantic/tag.el @ 104446:df08b7ab0ba0

lisp/cedet/semantic/analyze.el: Add local vars for autoloading. (semantic-analyze-current-context): Autoload. lisp/cedet/semantic/ctxt.el: Add local vars for autoloading. Don't eval-when-compile semantic/db (semantic-ctxt-current-mode): Autoload. (semantic-up-context): Require semantic/find. lisp/cedet/semantic/find.el (semantic-current-tag-parent) (semantic-find-tags-by-scope-protection): Autoload. lisp/cedet/semantic/format.el (semantic-format-tag-prototype) (semantic-format-tag-summarize): Autoload. lisp/cedet/semantic/idle.el: Declare external functions. (semantic-idle-work-for-one-buffer, semantic-idle-work-core-handler): Require semantic/db-mode. (semantic-idle-work-core-handler): Synch to upstream. (semantic-idle-scheduler-refresh-tags): Require semantic/decorate/mode. (semantic-idle-summary-find-current-symbol-tag): Require semantic/db-find. (semantic-idle-summary-current-symbol-info-context): Require semantic/analyze. (semantic-idle-summary-maybe-highlight, semantic-idle-tag-highlight): Require pulse. (semantic-idle-completion-list-default): Require semantic/complete. lisp/cedet/semantic/lex-spp.el: Require semantic. (semantic-lex-spp-analyzer-push-tokens-for-symbol): Synch to upstream. (semantic-lex-spp-first-token-arg-list): Use split-string. lisp/cedet/semantic/lex.el: Declare semantic-elapsed-time. Add local vars for autoloading. (semantic-lex-test): Require semantic. (semantic-lex): Autoload. (semantic-flex): Use semantic-lex-keyword-p to avoid compiler warning. lisp/cedet/semantic/sb.el: Require semantic/sort. Declare semanticdb-minor-mode-p. (semantic-sb-fetch-tag-table): Require semantic/db-mode. lisp/cedet/semantic/scope.el: eval-when-compile semantic/find. Declare external functions. (semantic-analyze-scope-nested-tags-default): Require semantic/analyze. (semantic-analyze-show): Require semantic/analyze. (semantic-calculate-scope): Require semantic/db-typecache. lisp/cedet/semantic/sort.el: Add local vars for autoloading. Declare semanticdb-find-tags-external-children-of-type. (semantic-flatten-tags-table, semantic-tag-external-member-parent): Autoload. (semantic-tag-external-member-children-default): Require semantic/db-find. lisp/cedet/semantic/symref.el: Require semantic. Declare data-debug-new-buffer and data-debug-insert-object-slots. (semantic-symref-data-debug-last-result): Require eieio-datadebug. lisp/cedet/semantic/tag-file.el: Declare external functions. (semantic-go-to-tag): Call semanticdb-table-child-p only if semantic/db is loaded. (semantic-dependency-tag-file): Require semantic/dep. lisp/cedet/semantic/tag-ls.el: Require semantic. Add local variables for autoloading. (semantic-tag-prototype-p): Autoload. lisp/cedet/semantic/tag-write.el: Require semantic. lisp/cedet/semantic/tag.el: Update external function declarations and requirements, removing autoloaded functions. Add local vars for autoloading. (semantic-tag-components): Autoload. lisp/cedet/semantic/texi.el: Declare lookup-words. eval-when-compile semantic/find. lisp/cedet/semantic/util.el: Update file header. lisp/cedet/semantic/analyze/complete.el: Add local variables for autoloading. (semantic-analyze-possible-completions, semantic-analyze-type-constants): Autoload.
author Chong Yidong <cyd@stupidchicken.com>
date Thu, 03 Sep 2009 03:58:13 +0000
parents 2bf481006ba4
children 273e528a9f9b
comparison
equal deleted inserted replaced
104445:43eb1ff3a976 104446:df08b7ab0ba0
50 50
51 ;; Keep this only so long as we have obsolete fcns. 51 ;; Keep this only so long as we have obsolete fcns.
52 (require 'semantic/fw) 52 (require 'semantic/fw)
53 (require 'semantic/lex) 53 (require 'semantic/lex)
54 54
55 (declare-function semantic-ctxt-current-mode "semantic/ctxt")
56 (declare-function semantic-analyze-split-name "semantic/analyze/fcn") 55 (declare-function semantic-analyze-split-name "semantic/analyze/fcn")
57 (declare-function semantic-fetch-tags "semantic") 56 (declare-function semantic-fetch-tags "semantic")
58 (declare-function semantic-clear-toplevel-cache "semantic") 57 (declare-function semantic-clear-toplevel-cache "semantic")
59 (declare-function semantic-documentation-for-tag "semantic/doc")
60 (declare-function semantic-format-tag-prototype "semantic/format")
61 (declare-function semantic-format-tag-summarize "semantic/format")
62 (declare-function semantic-format-tag-name "semantic/format")
63 58
64 (defconst semantic-tag-version "2.0pre7" 59 (defconst semantic-tag-version "2.0pre7"
65 "Version string of semantic tags made with this code.") 60 "Version string of semantic tags made with this code.")
66 61
67 (defconst semantic-tag-incompatible-version "1.0" 62 (defconst semantic-tag-incompatible-version "1.0"
215 TAG defaults to the tag at point in current buffer. 210 TAG defaults to the tag at point in current buffer.
216 If TAG has a :mode property return it. 211 If TAG has a :mode property return it.
217 If point is inside TAG bounds, return the major mode active at point. 212 If point is inside TAG bounds, return the major mode active at point.
218 Return the major mode active at beginning of TAG otherwise. 213 Return the major mode active at beginning of TAG otherwise.
219 See also the function `semantic-ctxt-current-mode'." 214 See also the function `semantic-ctxt-current-mode'."
220 (require 'semantic/find)
221 (or tag (setq tag (semantic-current-tag))) 215 (or tag (setq tag (semantic-current-tag)))
222 (or (semantic--tag-get-property tag :mode) 216 (or (semantic--tag-get-property tag :mode)
223 (let ((buffer (semantic-tag-buffer tag)) 217 (let ((buffer (semantic-tag-buffer tag))
224 (start (semantic-tag-start tag)) 218 (start (semantic-tag-start tag))
225 (end (semantic-tag-end tag))) 219 (end (semantic-tag-end tag)))
227 (and buffer (set-buffer buffer)) 221 (and buffer (set-buffer buffer))
228 ;; Unless point is inside TAG bounds, move it to the 222 ;; Unless point is inside TAG bounds, move it to the
229 ;; beginning of TAG. 223 ;; beginning of TAG.
230 (or (and (>= (point) start) (< (point) end)) 224 (or (and (>= (point) start) (< (point) end))
231 (goto-char start)) 225 (goto-char start))
232 (require 'semantic/ctxt)
233 (semantic-ctxt-current-mode))))) 226 (semantic-ctxt-current-mode)))))
234 227
235 (defsubst semantic--tag-attributes-cdr (tag) 228 (defsubst semantic--tag-attributes-cdr (tag)
236 "Return the cons cell whose car is the ATTRIBUTES part of TAG. 229 "Return the cons cell whose car is the ATTRIBUTES part of TAG.
237 That function is for internal use only." 230 That function is for internal use only."
966 (:override 959 (:override
967 (semantic-tag-get-attribute tag :definition)))) 960 (semantic-tag-get-attribute tag :definition))))
968 961
969 ;;; Language Specific Tag access via overload 962 ;;; Language Specific Tag access via overload
970 ;; 963 ;;
964 ;;;###autoload
971 (define-overloadable-function semantic-tag-components (tag) 965 (define-overloadable-function semantic-tag-components (tag)
972 "Return a list of components for TAG. 966 "Return a list of components for TAG.
973 A Component is a part of TAG which itself may be a TAG. 967 A Component is a part of TAG which itself may be a TAG.
974 Examples include the elements of a structure in a 968 Examples include the elements of a structure in a
975 tag of class `type, or the list of arguments to a 969 tag of class `type, or the list of arguments to a
1295 1289
1296 (defun semantic-foreign-tag (&optional tag) 1290 (defun semantic-foreign-tag (&optional tag)
1297 "Return a copy of TAG as a foreign tag, or nil if it can't be done. 1291 "Return a copy of TAG as a foreign tag, or nil if it can't be done.
1298 TAG defaults to the tag at point in current buffer. 1292 TAG defaults to the tag at point in current buffer.
1299 See also `semantic-foreign-tag-p'." 1293 See also `semantic-foreign-tag-p'."
1300 (require 'semantic/doc)
1301 (or tag (setq tag (semantic-current-tag))) 1294 (or tag (setq tag (semantic-current-tag)))
1302 (when (semantic-tag-p tag) 1295 (when (semantic-tag-p tag)
1303 (let ((ftag (semantic-tag-copy tag nil t)) 1296 (let ((ftag (semantic-tag-copy tag nil t))
1304 ;; Do extra work for the doc strings, since this is a 1297 ;; Do extra work for the doc strings, since this is a
1305 ;; common use case. 1298 ;; common use case.
1324 "Insert FOREIGN-TAG into the current buffer. 1317 "Insert FOREIGN-TAG into the current buffer.
1325 The default behavior assumes the current buffer is a language file, 1318 The default behavior assumes the current buffer is a language file,
1326 and attempts to insert a prototype/function call." 1319 and attempts to insert a prototype/function call."
1327 ;; Long term goal: Have a mechanism for a tempo-like template insert 1320 ;; Long term goal: Have a mechanism for a tempo-like template insert
1328 ;; for the given tag. 1321 ;; for the given tag.
1329 (require 'semantic/format)
1330 (insert (semantic-format-tag-prototype foreign-tag))) 1322 (insert (semantic-format-tag-prototype foreign-tag)))
1331 1323
1332 (define-overloadable-function semantic-insert-foreign-tag (foreign-tag) 1324 (define-overloadable-function semantic-insert-foreign-tag (foreign-tag)
1333 "Insert FOREIGN-TAG into the current buffer. 1325 "Insert FOREIGN-TAG into the current buffer.
1334 Signal an error if FOREIGN-TAG is not a valid foreign tag. 1326 Signal an error if FOREIGN-TAG is not a valid foreign tag.
1335 This function is overridable with the symbol `insert-foreign-tag'." 1327 This function is overridable with the symbol `insert-foreign-tag'."
1336 (require 'semantic/format)
1337 (semantic-foreign-tag-check foreign-tag) 1328 (semantic-foreign-tag-check foreign-tag)
1338 (:override) 1329 (:override)
1339 (message (semantic-format-tag-summarize foreign-tag))) 1330 (message (semantic-format-tag-summarize foreign-tag)))
1340 1331
1341 ;;; Support log modes here 1332 ;;; Support log modes here
1342 (define-mode-local-override semantic-insert-foreign-tag 1333 (define-mode-local-override semantic-insert-foreign-tag
1343 log-edit-mode (foreign-tag) 1334 log-edit-mode (foreign-tag)
1344 "Insert foreign tags into log-edit mode." 1335 "Insert foreign tags into log-edit mode."
1345 (require 'semantic/format)
1346 (insert (concat "(" (semantic-format-tag-name foreign-tag) "): "))) 1336 (insert (concat "(" (semantic-format-tag-name foreign-tag) "): ")))
1347 1337
1348 (define-mode-local-override semantic-insert-foreign-tag 1338 (define-mode-local-override semantic-insert-foreign-tag
1349 change-log-mode (foreign-tag) 1339 change-log-mode (foreign-tag)
1350 "Insert foreign tags into log-edit mode." 1340 "Insert foreign tags into log-edit mode."
1351 (require 'semantic/format)
1352 (insert (concat "(" (semantic-format-tag-name foreign-tag) "): "))) 1341 (insert (concat "(" (semantic-format-tag-name foreign-tag) "): ")))
1353 1342
1354 1343
1355 ;;; EDEBUG display support 1344 ;;; EDEBUG display support
1356 ;; 1345 ;;
1574 (semantic-alias-obsolete 'semantic-equivalent-tokens-p 1563 (semantic-alias-obsolete 'semantic-equivalent-tokens-p
1575 'semantic-equivalent-tag-p) 1564 'semantic-equivalent-tag-p)
1576 1565
1577 (provide 'semantic/tag) 1566 (provide 'semantic/tag)
1578 1567
1568 ;; Local variables:
1569 ;; generated-autoload-file: "loaddefs.el"
1570 ;; generated-autoload-feature: semantic/loaddefs
1571 ;; End:
1572
1579 ;;; semantic-tag.el ends here 1573 ;;; semantic-tag.el ends here