comparison lisp/cedet/semantic/edit.el @ 106840:5df8e547a422

Fix typos in docstrings.
author Juanma Barranquero <lekktu@gmail.com>
date Thu, 14 Jan 2010 19:59:31 +0100
parents 1d1d5d9bd884
children 376148b31b5e
comparison
equal deleted inserted replaced
106839:7d4dcdf87b91 106840:5df8e547a422
79 Each hook function must take three arguments, identical to the 79 Each hook function must take three arguments, identical to the
80 common hook `after-change-functions'.") 80 common hook `after-change-functions'.")
81 81
82 (defvar semantic-reparse-needed-change-hook nil 82 (defvar semantic-reparse-needed-change-hook nil
83 "Hooks run when a user edit is detected as needing a reparse. 83 "Hooks run when a user edit is detected as needing a reparse.
84 For language specific hooks, make sure you define this as a local 84 For language specific hooks, make sure you define this as a local hook.
85 hook. 85 Not used yet; part of the next generation reparse mechanism.")
86 Not used yet; part of the next generation reparse mechanism")
87 86
88 (defvar semantic-no-reparse-needed-change-hook nil 87 (defvar semantic-no-reparse-needed-change-hook nil
89 "Hooks run when a user edit is detected as not needing a reparse. 88 "Hooks run when a user edit is detected as not needing a reparse.
90 If the hook returns non-nil, then declare that a reparse is needed. 89 If the hook returns non-nil, then declare that a reparse is needed.
91 For language specific hooks, make sure you define this as a local 90 For language specific hooks, make sure you define this as a local hook.
92 hook.
93 Not used yet; part of the next generation reparse mechanism.") 91 Not used yet; part of the next generation reparse mechanism.")
94 92
95 (defvar semantic-edits-new-change-hooks nil 93 (defvar semantic-edits-new-change-hooks nil
96 "Abnormal hook run when a new change is found. 94 "Abnormal hook run when a new change is found.
97 Functions must take one argument representing an overlay on that change.") 95 Functions must take one argument representing an overlay on that change.")
305 ;; We are completely encompassed in a tag. 303 ;; We are completely encompassed in a tag.
306 (if (setq list-to-search 304 (if (setq list-to-search
307 (semantic-tag-components (car tags))) 305 (semantic-tag-components (car tags)))
308 ;; Ok, we are completely encompassed within the first tag 306 ;; Ok, we are completely encompassed within the first tag
309 ;; entry, AND that tag has children. This means that change 307 ;; entry, AND that tag has children. This means that change
310 ;; occured outside of all children, but inside some tag 308 ;; occurred outside of all children, but inside some tag
311 ;; with children. 309 ;; with children.
312 (if (or (not (semantic-tag-with-position-p (car list-to-search))) 310 (if (or (not (semantic-tag-with-position-p (car list-to-search)))
313 (> start (semantic-tag-end 311 (> start (semantic-tag-end
314 (nth (1- (length list-to-search)) 312 (nth (1- (length list-to-search))
315 list-to-search))) 313 list-to-search)))
749 ;; See how this change lays out. 747 ;; See how this change lays out.
750 (cond 748 (cond
751 749
752 ;;;; Whitespace change 750 ;;;; Whitespace change
753 ((and (not tags) (not newf-tags)) 751 ((and (not tags) (not newf-tags))
754 ;; A change that occured outside of any existing tags 752 ;; A change that occurred outside of any existing tags
755 ;; and there are no new tags to replace it. 753 ;; and there are no new tags to replace it.
756 (when semantic-edits-verbose-flag 754 (when semantic-edits-verbose-flag
757 (message "White space changes")) 755 (message "White space changes"))
758 nil 756 nil
759 ) 757 )
760 758
761 ;;;; New tags in old whitespace area. 759 ;;;; New tags in old whitespace area.
762 ((and (not tags) newf-tags) 760 ((and (not tags) newf-tags)
763 ;; A change occured outside existing tags which added 761 ;; A change occurred outside existing tags which added
764 ;; a new tag. We need to splice these tags back 762 ;; a new tag. We need to splice these tags back
765 ;; into the cache at the right place. 763 ;; into the cache at the right place.
766 (semantic-edits-splice-insert newf-tags parent-tag cache-list) 764 (semantic-edits-splice-insert newf-tags parent-tag cache-list)
767 765
768 (setq changed-tags 766 (setq changed-tags
773 (semantic-format-tag-name (car newf-tags)))) 771 (semantic-format-tag-name (car newf-tags))))
774 ) 772 )
775 773
776 ;;;; Old tags removed 774 ;;;; Old tags removed
777 ((and tags (not newf-tags)) 775 ((and tags (not newf-tags))
778 ;; A change occured where pre-existing tags were 776 ;; A change occurred where pre-existing tags were
779 ;; deleted! Remove the tag from the cache. 777 ;; deleted! Remove the tag from the cache.
780 (semantic-edits-splice-remove tags parent-tag cache-list) 778 (semantic-edits-splice-remove tags parent-tag cache-list)
781 779
782 (setq changed-tags 780 (setq changed-tags
783 (append tags changed-tags)) 781 (append tags changed-tags))