-;;; sort.el --- Utilities for sorting and re-arranging tag tables.
+;;; semantic/sort.el --- Utilities for sorting and re-arranging tag tables.
-;;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007,
-;;; 2008, 2009 Free Software Foundation, Inc.
+;;; Copyright (C) 1999-2005, 2007-2015 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: syntax
;; purposes. Re-organization may be alphabetical, or even a complete
;; reorganization of parents and children.
;;
-;; Originally written in semantic-util.el
+;; Originally written in semantic/util.el
;;
-(require 'assoc)
(require 'semantic)
-(require 'semantic/db)
(eval-when-compile
(require 'semantic/find))
"Sort TAGS by name, then type in increasing order with side effects.
Return the sorted list."
(sort tags (lambda (a b) (semantic-tag-lessp-name-then-type b a))))
-
-
-(semantic-alias-obsolete 'semantic-sort-tokens-by-name-increasing
- 'semantic-sort-tags-by-name-increasing)
-(semantic-alias-obsolete 'semantic-sort-tokens-by-name-decreasing
- 'semantic-sort-tags-by-name-decreasing)
-(semantic-alias-obsolete 'semantic-sort-tokens-by-type-increasing
- 'semantic-sort-tags-by-type-increasing)
-(semantic-alias-obsolete 'semantic-sort-tokens-by-type-decreasing
- 'semantic-sort-tags-by-type-decreasing)
-(semantic-alias-obsolete 'semantic-sort-tokens-by-name-increasing-ci
- 'semantic-sort-tags-by-name-increasing-ci)
-(semantic-alias-obsolete 'semantic-sort-tokens-by-name-decreasing-ci
- 'semantic-sort-tags-by-name-decreasing-ci)
-(semantic-alias-obsolete 'semantic-sort-tokens-by-type-increasing-ci
- 'semantic-sort-tags-by-type-increasing-ci)
-(semantic-alias-obsolete 'semantic-sort-tokens-by-type-decreasing-ci
- 'semantic-sort-tags-by-type-decreasing-ci)
-
\f
;;; Unique
;;
(mapc (lambda (tag)
(let ((components (semantic-tag-components tag)))
(if (and components
- ;; unpositined tags can be hazardous to
+ ;; unpositioned tags can be hazardous to
;; completion. Do we need any type of tag
;; here? - EL
(semantic-tag-with-position-p (car components)))
)
(defun semantic-tag-external-member-parent-default (tag)
- "Return the name of TAGs parent only if TAG is not defined in it's parent."
+ "Return the name of TAGs parent only if TAG is not defined in its parent."
;; Use only the extra spec because a type has a parent which
;; means something completely different.
(let ((tp (semantic-tag-get-attribute tag :parent)))
(when (stringp tp)
- tp)
- ))
-
-(semantic-alias-obsolete 'semantic-nonterminal-external-member-parent
- 'semantic-tag-external-member-parent)
+ tp)))
(define-overloadable-function semantic-tag-external-member-p (parent tag)
"Return non-nil if PARENT is the parent of TAG.
TAG is an external member of PARENT when it is somehow tagged
-as having PARENT as it's parent.
+as having PARENT as its parent.
PARENT and TAG must both be semantic tags.
The default behavior, if not overridden with
;; means something completely different.
(let ((tp (semantic-tag-external-member-parent tag)))
(and (stringp tp)
- (string= (semantic-tag-name parent) tp))
- ))
-
-(semantic-alias-obsolete 'semantic-nonterminal-external-member-p
- 'semantic-tag-external-member-p)
+ (string= (semantic-tag-name parent) tp))))
(define-overloadable-function semantic-tag-external-member-children (tag &optional usedb)
"Return the list of children which are not *in* TAG.
(semanticdb-minor-mode-p)
(require 'semantic/db-find))
(let ((m (semanticdb-find-tags-external-children-of-type
- (semantic-tag-name tag))))
+ (semantic-tag-name tag) tag)))
(if m (apply #'append (mapcar #'cdr m))))
(semantic--find-tags-by-function
`(lambda (tok)
(semanticdb-find-tags-by-name (semantic-tag-name tag)))))
(semanticdb-strip-find-results m 'name))
;; Presumably, if the tag is faux, it is not local.
- nil
- ))
-
-(semantic-alias-obsolete 'semantic-nonterminal-external-member-children
- 'semantic-tag-external-member-children)
+ nil))
(provide 'semantic/sort)
;; Local variables:
;; generated-autoload-file: "loaddefs.el"
-;; generated-autoload-feature: semantic/loaddefs
;; generated-autoload-load-name: "semantic/sort"
;; End:
-;;; semantic-sort.el ends here
+;;; semantic/sort.el ends here