* snippet.el (snippet--field-overlay): Make buffer-local and permanent-local.
(snippet--field-protection-overlays): New variable.
(snippet--move-to-field): Also move protection overlays.
(snippet--field-overlay-changed): Don't do anything if undo in
progress or snippet being exited.
(snippet--field-protection-violated): new function.
(snippet--protection-overlay-face): New debug-only face.
(snippet-exit): Rename from `snippet-exit-snippet'
(snippet--exiting-p): New function
(snippet--activate-snippet): Create protection overlays.
(snippet--cleanup): New function.
(snippet--post-command-hook): Use `snippet--exiting-p' and
`snippet--cleanup'.
(snippet--debug-snippet): Consider that `snippet--field-overlay'
is now buffer-local.
(with-static-snippet, with-dynamic-snippet)
(snippet--activate-snippet): Update use of `snippet--make-object'.
(snippet--make-object): Don't take `prev' arg.
* snippet.el (snippet--object-<): New function.
(snippet--make-object): Replace `cl-assert' with ordinary error.
(snippet--open-object, snippet--with-current-object): Remove #'
prefix from lambda.
(snippet-next-field): Exiting is moving to the exit field.
(snippet--activate-snippet): Create exit field here if not created
yet.
(snippet--debug-snippet): Use `snippet--object-<'.
* snippet.el (with-static-snippet): Dummy param in lambda to
`snippet--make-and-insert-field'.
(with-dynamic-snippet): Use `snippet--make-and-insert-field' and
`snippet-make-and-insert-mirror'
(snippet--make-and-insert-field): Call function with field.
* snippet-tests.el (cl-lib): require it
(snippet--fixtures): Renamed from
`snippet--test-snippets-alist'. Add dynamic versions to all tests.
(snippet--get-fixture): Use `snippet--fixtures'
* snippet.el (with-dynamic-snippet): Relax syntax restrictions.
(&mirror): Update edebug spec.
(snippet--call-with-inserting-object): Don't try to set the start
of an object to its previous object's end, if that object hasn't
got an end yet.
(snippet--call-with-inserting-object): Fix previous bugfix.
* snippet.el (define-static-snippet): Fix bug.
(snippet--activate-snippet): Must use `cl-copy-list'
(snippet--describe-object): Changed to generic function.
(snippet--describe-exit, snippet--describe-mirror)
(snippet--describe-field): Part of the generic.
(snippet--debug-snippet): Uses `snippet--describe-object'
* snippet-tests.el (snippet--test-snippets-alist): Add static and
dynamic version of snippet to fixture.
(snippet--insert-test-snippet): Aware of dynamic snippets.
(sprintf-variation): Reintegrated deleted `snippet--test-sprintf-snippet'
(snippet--test-sprintf-snippet): Deleted.
(snippet-tests): Provide it.
* snippet.el: Better documentation.
(with-static-snippet): Renamed from `snippet--define-body'.
(define-dynamic-snippet): Renamed from `define-snippet'.
(with-dynamic-snippet): New macro.
* snippet-tests.el (macro-test): Dummy test for
`snippet-defmacro'.
* snippet.el (eieio): require 'eieio
(snippet--define-body, snippet--make-and-insert-mirror)
(snippet--make-and-insert-exit): Use `make-instance'
(snippet--field-overlay-changed): Use `snippet--object-start'
(snippet--field-skip-p): Use `snippet--object-parent'
(snippet--object, snippet--field, snippet--mirror)
(snippet--exit): Use `defclass'
(snippet-defmacro): New broken macro.
(&mirror, &field): New edebug specs.
* also snippet--close-object is apparently not needed
* don't call the mirror transforms when field-text is null, just
return empty string. also zero-length fields considered to have a
null field-text, not the empty string.
* correctly place markers when inserting objects