;;; semantic/tag-ls.el --- Language Specific override functions for tags
-;;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2007, 2008
-;;; Free Software Foundation, Inc.
+;; Copyright (C) 1999-2004, 2006-2012 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;;; Commentary:
;;
-;; There are some features of tags that are too langauge dependent to
+;; There are some features of tags that are too language dependent to
;; put in the core `semantic-tag' functionality. For instance, the
;; protection of a tag (as specified by UML) could be almost anything.
;; In Java, it is a type specifier. In C, there is a label. This
-;; informatin can be derived, and thus should not be stored in the tag
+;; information can be derived, and thus should not be stored in the tag
;; itself. These are the functions that languages can use to derive
;; the information.
(define-overloadable-function semantic-tag-calculate-parent (tag)
"Attempt to calculate the parent of TAG.
-The default behavior (if not overriden with `tag-calculate-parent')
+The default behavior (if not overridden with `tag-calculate-parent')
is to search a buffer found with TAG, and if externally defined,
search locally, then semanticdb for that tag (when enabled.)")
(defun semantic-tag-calculate-parent-default (tag)
"Attempt to calculate the parent of TAG."
(when (semantic-tag-in-buffer-p tag)
- (save-excursion
- (set-buffer (semantic-tag-buffer tag))
+ (with-current-buffer (semantic-tag-buffer tag)
(save-excursion
(goto-char (semantic-tag-start tag))
(semantic-current-tag-parent))
(:override))
(make-obsolete-overload 'semantic-nonterminal-protection
- 'semantic-tag-protection)
+ 'semantic-tag-protection "23.2")
(defun semantic-tag-protection-default (tag &optional parent)
"Return the protection of TAG as a child of PARENT default action.
prot))
(defun semantic-tag-protected-p (tag protection &optional parent)
- "Non-nil if TAG is is protected.
+ "Non-nil if TAG is protected.
PROTECTION is a symbol which can be returned by the method
`semantic-tag-protection'.
PARENT is the parent data type which contains TAG.
For these PROTECTIONs, true is returned if TAG is:
@table @asis
@item nil
- Always true
+ Always true.
@item private
True if nil.
@item protected
is to return true if `abstract' is in the type modifiers.")
(make-obsolete-overload 'semantic-nonterminal-abstract
- 'semantic-tag-abstract-p)
+ 'semantic-tag-abstract-p "23.2")
(defun semantic-tag-abstract-p-default (tag &optional parent)
"Return non-nil if TAG is abstract as a child of PARENT default action.
is to return true if `leaf' is in the type modifiers.")
(make-obsolete-overload 'semantic-nonterminal-leaf
- 'semantic-tag-leaf-p)
+ 'semantic-tag-leaf-p "23.2")
(defun semantic-tag-leaf-p-default (tag &optional parent)
"Return non-nil if TAG is leaf as a child of PARENT default action.
;;;###autoload
(define-overloadable-function semantic-tag-prototype-p (tag)
"Return non nil if TAG is a prototype.
-For some laguages, such as C, a prototype is a declaration of
+For some languages, such as C, a prototype is a declaration of
something without an implementation."
)
(define-overloadable-function semantic-tag-full-name (tag &optional stream-or-buffer)
"Return the fully qualified name of TAG in the package hierarchy.
-STREAM-OR-BUFFER can be anything convertable by `semantic-something-to-stream',
+STREAM-OR-BUFFER can be anything convertible by `semantic-something-to-stream',
but must be a toplevel semantic tag stream that contains TAG.
A Package Hierarchy is defined in UML by the way classes and methods
are organized on disk. Some language use this concept such that a
(:override-with-args (tag stream))))
(make-obsolete-overload 'semantic-nonterminal-full-name
- 'semantic-tag-full-name)
+ 'semantic-tag-full-name "23.2")
(defun semantic-tag-full-name-default (tag stream)
"Default method for `semantic-tag-full-name'.
Return the name of TAG found in the toplevel STREAM."
(semantic-tag-name tag))
-;;; Compatibility aliases.
-;;
-(semantic-alias-obsolete 'semantic-nonterminal-protection
- 'semantic-tag-protection)
-(semantic-alias-obsolete 'semantic-nonterminal-protection-default
- 'semantic-tag-protection-default)
-(semantic-alias-obsolete 'semantic-nonterminal-abstract
- 'semantic-tag-abstract-p)
-(semantic-alias-obsolete 'semantic-nonterminal-abstract-default
- 'semantic-tag-abstract-p-default)
-(semantic-alias-obsolete 'semantic-nonterminal-leaf
- 'semantic-tag-leaf-p)
-(semantic-alias-obsolete 'semantic-nonterminal-leaf-default
- 'semantic-tag-leaf-p-default)
-(semantic-alias-obsolete 'semantic-nonterminal-static-default
- 'semantic-tag-static-p-default)
-(semantic-alias-obsolete 'semantic-nonterminal-full-name
- 'semantic-tag-full-name)
-(semantic-alias-obsolete 'semantic-nonterminal-full-name-default
- 'semantic-tag-full-name-default)
-
-;; TEMPORARY within betas of CEDET 1.0
-(semantic-alias-obsolete 'semantic-tag-static 'semantic-tag-static-p)
-(semantic-alias-obsolete 'semantic-tag-leaf 'semantic-tag-leaf-p)
-(semantic-alias-obsolete 'semantic-tag-abstract 'semantic-tag-abstract-p)
-
(provide 'semantic/tag-ls)
;; Local variables:
;; generated-autoload-file: "loaddefs.el"
-;; generated-autoload-feature: semantic/loaddefs
;; generated-autoload-load-name: "semantic/tag-ls"
;; End: