comparison lisp/cedet/semantic/tag.el @ 104470:6ccad1511df1

Minor whitespace changes and `require' fixes.
author Chong Yidong <cyd@stupidchicken.com>
date Sun, 06 Sep 2009 21:22:05 +0000
parents 273e528a9f9b
children 25e047f7f6a2
comparison
equal deleted inserted replaced
104469:ce081012a7d6 104470:6ccad1511df1
331 (defsubst semantic-tag-type-members (tag) 331 (defsubst semantic-tag-type-members (tag)
332 "Return the members of the type that TAG describes. 332 "Return the members of the type that TAG describes.
333 That is the value of the `:members' attribute." 333 That is the value of the `:members' attribute."
334 (semantic-tag-get-attribute tag :members)) 334 (semantic-tag-get-attribute tag :members))
335 335
336 (defsubst semantic-tag-type (tag)
337 "Return the value of the `:type' attribute of TAG.
338 For a function it would be the data type of the return value.
339 For a variable, it is the storage type of that variable.
340 For a data type, the type is the style of datatype, such as
341 struct or union."
342 (semantic-tag-get-attribute tag :type))
343
336 (defun semantic-tag-with-position-p (tag) 344 (defun semantic-tag-with-position-p (tag)
337 "Return non-nil if TAG has positional information." 345 "Return non-nil if TAG has positional information."
338 (and (semantic-tag-p tag) 346 (and (semantic-tag-p tag)
339 (let ((o (semantic-tag-overlay tag))) 347 (let ((o (semantic-tag-overlay tag)))
340 (or (and (semantic-overlay-p o) 348 (or (and (semantic-overlay-p o)
353 (not (semantic-tag-overlay tag2))) 361 (not (semantic-tag-overlay tag2)))
354 (and (semantic-tag-overlay tag1) 362 (and (semantic-tag-overlay tag1)
355 (semantic-tag-overlay tag2) 363 (semantic-tag-overlay tag2)
356 (equal (semantic-tag-bounds tag1) 364 (equal (semantic-tag-bounds tag1)
357 (semantic-tag-bounds tag2)))))) 365 (semantic-tag-bounds tag2))))))
358
359 (defsubst semantic-tag-type (tag)
360 "Return the value of the `:type' attribute of TAG.
361 For a function it would be the data type of the return value.
362 For a variable, it is the storage type of that variable.
363 For a data type, the type is the style of datatype, such as
364 struct or union."
365 (semantic-tag-get-attribute tag :type))
366 366
367 (defun semantic-tag-similar-p (tag1 tag2 &rest ignorable-attributes) 367 (defun semantic-tag-similar-p (tag1 tag2 &rest ignorable-attributes)
368 "Test to see if TAG1 and TAG2 are similar. 368 "Test to see if TAG1 and TAG2 are similar.
369 Two tags are similar if their name, datatype, and various attributes 369 Two tags are similar if their name, datatype, and various attributes
370 are the same. 370 are the same.
750 ;;; Standard Tag Access 750 ;;; Standard Tag Access
751 ;; 751 ;;
752 752
753 ;;; Common 753 ;;; Common
754 ;; 754 ;;
755
756 (defsubst semantic-tag-modifiers (tag) 755 (defsubst semantic-tag-modifiers (tag)
757 "Return the value of the `:typemodifiers' attribute of TAG." 756 "Return the value of the `:typemodifiers' attribute of TAG."
758 (semantic-tag-get-attribute tag :typemodifiers)) 757 (semantic-tag-get-attribute tag :typemodifiers))
759 758
760 (defun semantic-tag-docstring (tag &optional buffer) 759 (defun semantic-tag-docstring (tag &optional buffer)
812 "Find the superclass NAME in the list of SUPERS. 811 "Find the superclass NAME in the list of SUPERS.
813 If a simple search doesn't do it, try splitting up the names 812 If a simple search doesn't do it, try splitting up the names
814 in SUPERS." 813 in SUPERS."
815 (let ((stag nil)) 814 (let ((stag nil))
816 (setq stag (semantic-find-first-tag-by-name name supers)) 815 (setq stag (semantic-find-first-tag-by-name name supers))
816
817 (when (not stag) 817 (when (not stag)
818 (require 'semantic/analyze/fcn) 818 (require 'semantic/analyze/fcn)
819 (dolist (S supers) 819 (dolist (S supers)
820 (let* ((sname (semantic-tag-name S)) 820 (let* ((sname (semantic-tag-name S))
821 (splitparts (semantic-analyze-split-name sname)) 821 (splitparts (semantic-analyze-split-name sname))
1110 ;;; Tags and Overlays 1110 ;;; Tags and Overlays
1111 ;; 1111 ;;
1112 ;; Overlays are used so that we can quickly identify tags from 1112 ;; Overlays are used so that we can quickly identify tags from
1113 ;; buffer positions and regions using built in Emacs commands. 1113 ;; buffer positions and regions using built in Emacs commands.
1114 ;; 1114 ;;
1115
1116 (defsubst semantic--tag-unlink-list-from-buffer (tags) 1115 (defsubst semantic--tag-unlink-list-from-buffer (tags)
1117 "Convert TAGS from using an overlay to using an overlay proxy. 1116 "Convert TAGS from using an overlay to using an overlay proxy.
1118 This function is for internal use only." 1117 This function is for internal use only."
1119 (mapcar 'semantic--tag-unlink-from-buffer tags)) 1118 (mapcar 'semantic--tag-unlink-from-buffer tags))
1120 1119