File: edit.el.html

In Semantic 1.x, changes were handled in a simplistic manner, where tags that changed were reparsed one at a time. Any other form of edit were managed through a full reparse.

This code attempts to minimize the number of times a full reparse needs to occur. While overlays and tags will continue to be recycled in the simple case, new cases where tags are inserted
or old tags removed from the original list are handled.


; NOTES FOR IMPROVEMENT

Work done by the incremental parser could be improved by the following:

1. Tags created could have as a property an overlay marking a region
   of themselves that can be edited w/out affecting the definition of
   that tag.

2. Tags with positioned children could have a property of an
   overlay marking the region in themselves that contain the
   children. This could be used to better improve splicing near
   the beginning and end of the child lists.


; BUGS IN INCREMENTAL PARSER

1. Changes in the whitespace between tags could extend a
   following tag. These will be marked as merely unmatched
   syntax instead.

2. Incremental parsing while a new function is being typed in
   sometimes gets a chance only when lists are incomplete,
   preventing correct context identification.

Defined variables (10)

semantic-after-partial-cache-change-hookNormal hook run after the buffer cache has been updated.
semantic-change-functionsAbnormal hook run when semantic detects a change in a buffer.
semantic-edits-delete-change-functionsAbnormal hook run before a change overlay is deleted.
semantic-edits-incremental-reparse-failed-hookHook run after the incremental parser fails.
semantic-edits-move-change-hookAbnormal hook run after a change overlay is moved.
semantic-edits-new-change-functionsAbnormal hook run when a new change is found.
semantic-edits-reparse-change-functionsAbnormal hook run after a change results in a reparse.
semantic-edits-verbose-flagNon-nil means the incremental parser is verbose.
semantic-no-reparse-needed-change-hookHooks run when a user edit is detected as not needing a reparse.
semantic-reparse-needed-change-hookHooks run when a user edit is detected as needing a reparse.

Defined functions (19)

semantic-change-function(START END LENGTH)
semantic-changes-in-region(START END &optional BUFFER)
semantic-edits-change-between-tags(CHANGE)
semantic-edits-change-function-handle-changes(START END LENGTH)
semantic-edits-change-in-one-tag-p(CHANGE HITS)
semantic-edits-change-leaf-tag(CHANGE)
semantic-edits-change-over-tags(CHANGE)
semantic-edits-flush-change(CHANGE)
semantic-edits-flush-changes()
semantic-edits-incremental-fail()
semantic-edits-incremental-parser()
semantic-edits-incremental-parser-1()
semantic-edits-oe(CHANGE)
semantic-edits-os(CHANGE)
semantic-edits-splice-insert(NEWTAGS PARENT CACHELIST)
semantic-edits-splice-remove(OLDTAGS PARENT CACHELIST)
semantic-edits-splice-replace(OLDTAG NEWTAG)
semantic-parse-changes-default()
semantic-parse-changes-failed(&rest ARGS)

Defined faces (0)