]> code.delx.au - gnu-emacs-elpa/commit
Fix #597; use SAVE-FILE to visit compiled snippets
authorNoam Postavsky <npostavs@users.sourceforge.net>
Sat, 5 Sep 2015 00:19:52 +0000 (20:19 -0400)
committerNoam Postavsky <npostavs@users.sourceforge.net>
Sat, 5 Sep 2015 19:41:05 +0000 (15:41 -0400)
commit215ad9bcf2e832be31778f026cb4f4469c7301e3
tree31fba075b9341f52d268ee71c9a16efe4ad0e801
parentcc1c758ab7c8b7312fea26f9d8dbce2118ef916b
Fix #597; use SAVE-FILE to visit compiled snippets

Rename the existing FILE field to LOAD-FILE, and add a new SAVE-FILE to
yas--template struct.  Normally they will be the same, but compiled
snippets have only SAVE-FILE because they are loaded by "compiled" code.

* yasnippet.el (yas--template): Remove field file, add load-file and
  save-file.
(yas--parse-template): Update snippet-definition list in docstrings.
(yas-define-snippets): Move LOAD-FILE value to SAVE-FILE when compiling.
(yas--template-get-file): New function.
(yas--visit-snippet-file-1, yas-load-snippet-buffer,
yas-load-snippet-buffer-and-close): Use yas--template-load-file,
yas--template-save-file, or yas--template-get-file, as appropriate.
* doc/snippet-organization.org (The =.yas-compiled-snippet.el= file):
  Remove caveat that is no longer relevant.
doc/snippet-organization.org
yasnippet.el