Document $> and fix escaping

* doc/snippet-development.org: New "Indentation markers" section.
* yasnippet-tests.el (indentation-markers): New test.
* yasnippet.el (yas--indent-markers): New variable.
(yas--indent): Use it instead of searching for $> directly.
(yas--indent-parse-create): New function, records occurences of $> into
`yas--indent-markers'.
(yas--snippet-parse-create): Call it.
This commit is contained in:
Noam Postavsky
2016-05-08 15:32:20 -04:00
parent 146b161112
commit e9406f5126
3 changed files with 42 additions and 4 deletions

View File

@@ -422,3 +422,9 @@ the exit marker.
By the way, =C-d= will only clear the field if you cursor is at the
beginning of the field /and/ it hasn't been changed yet. Otherwise, it
performs the normal Emacs =delete-char= command.
** Indentation markers
If [[sym:yas-indent-line][=yas-indent-line=]] is *not* set to '=auto=, it's still possible to
indent specific lines by adding an indentation marker, =$>=, somewhere
on the line.