mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-13 13:13:03 +00:00
* Added a new section "Field-level undo functionality" to correct
issue 33. * Added functions `yas/field-undo-before-hook', `yas/field-undo-after-hook', `yas/field-undo-group-text-change' and variables `yas/field-undo-history', `yas/field-undo-forbidden-commands' to implement field-level undo. * Modified `yas/cleanup-snippet' to record the actual snippet end in the snippet before cleaning up the main overlay. * New hooks `yas/field-undo-before-hook' and `yas/field-undo-after-hook' added to `pre-command-hook' and `post-command-hook', respectively. * Slightly changed the commentary of the "Snippet register and unregister routines section" * Modified step 12 to call `yas/undo-expand-snippet' without the `(point-min)' argument, which led to incorrect undo behaviour. * Added a new step in `yas/expand-snippet' describing the local restore and save of undo infomation in a new slot of the `yas/snippet' structure. This is step 14, previous 14 was moved to 15. * Modified `yas/undo-expand-snippet' to kill text up to the the correct snippet end, which was not being calculated correctly. It is now a slot of the snippet itself and no longer a parameter. * Added functions `yas/current-field-text', `yas/replace-fields-with-value', `yas/remove-recent-undo-from-history' to refactor some code used twice or more. * Modified `yas/check-cleanup-snippet' to detect trigger cleanup if point exits any primary snippet field, of any group. Previously cleanup would only be triggered on exiting all groups. This is a follow-up to issue 28. * Added two slot to the `yas/snippet' structure to allow for field-level undo and correct small bug in the previous fix of issue 28. * Modified `yas/cleanup-snippet' to call `yas/after-exit-snippet-hook' as a follow-up to feedback on issue 28. * (Accidentaly :) changed (but corrected!) indentation of most existing functions. This was done by a buffer global indent-region. * (Accidentaly :) ran `checkdoc' but then gave up, it's uncessary. Didn't change much stuff though.
This commit is contained in:
parent
b8e187b5b6
commit
cca2df173d
1415
yasnippet.el
1415
yasnippet.el
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user