139 Commits

Author SHA1 Message Date
Noam Postavsky
78fe979b7b Support htmlize.el in Rakefile doc target
Htmlized output can now be produced by

    rake doc[/path/to/htmlize/]

* Rakefile (doc): Add htmlize argument.
* doc/yas-doc-helper.el (yas--generate-html-batch): Tell org to use css
selectors only when exporting htmlized faces.
* doc/stylesheets/manual.css: Add styles for faces used by org export.
2016-04-30 22:36:34 -04:00
Noam Postavsky
5d44a9f15e Revert "Disable region wrapping for trigger key expansion"
This reverts commit f8d1af1f50f42ac1689c583c152c3b15e8774ae4.

Disabling this for trigger key introduced an inconsistency that is more
complicated to implement and document than simply fixing region wrapping
for trigger key expanded snippets.
2016-04-30 20:17:38 -04:00
Noam Postavsky
e37ce9e488 Disable region wrapping for trigger key expansion
It's too awkward to highlight the relevant text while maneuvering point
in front of the trigger key.

* yasnippet.el (yas-expand-from-trigger-key): Let-bind
yas-wrap-around-region to nil if it was t.
* doc/snippet-expansion.org: Document it.
2016-04-30 20:10:01 -04:00
Noam Postavsky
c1b2cb7c5e Improve documentation for new register option
* doc/snippet-expansion.org: Add new section about
yas-wrap-around-region.
* yasnippet.el (yas-wrap-around-region): Improve docstring.
2016-04-30 20:10:01 -04:00
Noam Postavsky
7799aa908b Document .yas-setup.el
* doc/snippet-organization.org: Explain .yas-setup.el.
2016-04-27 17:08:19 -04:00
Barak A. Pearlmutter
c0032e6e61 chmod -x doc/yas-doc-helper.el 2016-04-27 16:51:03 -04:00
Stefan Monnier
42601d2ff8 Apply changes from GNU ELPA
* doc/yas-doc-helper.el:
* yasnippet-debug.el:
* yasnippet-tests.el: Fix up copyright headers.

* yasnippet-tests.el: Fix lexical-binding cookie.
* yasnippet-debug.el: Require cl.

* yasnippet-tests.el: Silence byte-compiler.
(yas-saving-variables, yas-with-snippet-dirs): Move macros before their use.
(yas--barbaz, yas--foobarbaz): Declare.
(yas--phony-c-mode, yas--test-mode, yas--another-test-mode): Move out of
deftest, so the byte-compiler understands they're defined.
2016-01-28 14:36:19 -05:00
Noam Postavsky
7703a55ac4 * doc/snippet-organization.org (.yas-skip): Add info. 2015-09-24 21:12:30 -04:00
Noam Postavsky
215ad9bcf2 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.
2015-09-05 15:41:05 -04:00
Zhiming Wang
0ada0fc944
Add documentation for snippet compilation
Specifically, fill in the section about .yas-compiled-snippet.el, which
was previously labelled as TODO.

* doc/snippet-organization.org (The =.yas-compiled-snippet.el= file):
  Fill in section.
2015-08-04 14:48:14 -07:00
Noam Postavsky
7bce1a6473 Add new function yas-lookup-snippet
* yasnippet.el (yas-lookup-snippet): New function.
(yas--get-snippet-tables, yas--modes-to-activate): Add optional mode
parameter.
* yasnippet-tests.el (snippet-lookup): New test for yas-lookup-snippet.
* doc/snippet-expansion.org (Expanding from emacs-lisp code): Mention
  yas-lookup-snippet.
2015-08-03 10:36:46 -04:00
Noam Postavsky
5ebf347392 Minor doc fixes
* doc/snippet-expansion.org (Expanding from emacs-lisp code): Fix typo.
* doc/snippet-menu.org (Controlling indenting, Prompting method): Remove
  incorrect whitespace.
2015-08-03 10:29:42 -04:00
Alberto Luaces
4692c8169d Fix "invalid function: quote"
On emacs24, Debian, HTML doc generation finishes with this error.
2015-05-15 23:30:37 +02:00
Phil Hudson
0e7ea945ce Replaced 'shadow' with 'override' throughout documentation
It is hoped that this will add clarity.

* yasnippet.el, doc/snippet-organization.org (documentation):
  Replaced 'shadow' with 'override' globally.
2015-04-13 15:08:24 +01:00
Win Treese
07734a1713 Clarify what happens with yas-new-snippet.
Added more detail about how yas-new-snippet behaves, particularly how it guesses a directory to save in.
2015-01-10 10:04:18 -05:00
Jonas Bernoulli
bb6bbad1f7 Add file doc/.nosearch
This keeps `normal-top-level-add-subdirs-to-load-path'
from adding the directory to the `load-path'.
2014-12-08 14:47:20 +01:00
Jonas Bernoulli
70de82164c enforce use of spaces for indentation 2014-09-07 14:20:07 +02:00
Jonas Bernoulli
241465cea2 move eof footer to the actual eof 2014-09-07 14:20:07 +02:00
Noam Postavsky
f98c527a38 Replace text -> yas-text in documentation
* doc/snippet-development.org: replace text -> yas-text
2014-06-17 19:21:22 -04:00
Noam Postavsky
fe288a156c Fix publishing with org 7.9
* doc/yas-doc-helper.el: Only use org-html-publish-to-html when it's
  fbound.
2014-05-11 19:37:12 -04:00
Noam Postavsky
6b04dada67 Document type directive
* doc/snippet-development.org: Add type to directive list.
2014-05-11 19:02:43 -04:00
Noam Postavsky
4c16eaee0e Document uuid directive
* doc/snippet-development.org: Mention uuid in directive list.
* yasnippet.el (yas-define-snippets): Fix docstring grammar.
2014-05-11 12:47:15 -04:00
Noam Postavsky
f1760272e0 Restore backquotes lost in rst -> org translation
* doc/snippet-development.org: Re-add lost `s.
2014-05-11 12:47:15 -04:00
Noam Postavsky
a4e04f954b update doc for org 8.x
Keeping compabitily with 7.9 for now
2014-03-23 19:44:35 -04:00
Noam Postavsky
78c8b5eb80 yas--document-symbol: fix no transform case
was causing YASnippetnippet
2013-12-24 11:49:24 -05:00
Noam Postavsky
df58222fe6 yas--document-symbols: respect level arg, raise to 1 2013-12-24 11:36:16 -05:00
Noam Postavsky
22773c77a0 add a link to the symbol reference in top menu 2013-12-24 11:14:57 -05:00
Noam Postavsky
24d7a67932 fix typo 2013-12-24 11:14:39 -05:00
Noam Postavsky
260ecf9c3a fix a faq title 2013-12-10 22:52:34 -05:00
Noam Postavsky
d89e837d68 add top level menu, minimal styling 2013-12-10 22:50:49 -05:00
Noam Postavsky
7518cb4621 rake doc:upload: check for wrong/incomplete rev 2013-12-06 13:00:40 -05:00
Noam Postavsky
0a9885eb62 markup suffixed variable names, eg SUBEXPth 2013-12-02 23:19:23 -05:00
Joao Tavora
582e3680b6 minor: cosmetic fixes to manual 2013-12-02 19:28:56 +00:00
Joao Tavora
0f8007e67e Simplify: index.org no longer repeats info in the README 2013-12-02 19:28:08 +00:00
Joao Tavora
c61f81f02d Closes #439: add a faq question about redefining keys
Also, don't mention yas-trigger-key anymore in the manual
2013-12-02 19:27:35 +00:00
Joao Tavora
1cf9168831 Merge branch 'unclutter': snippets and textmate importation snippets are now submodules 2013-11-29 21:34:48 +00:00
Noam Postavsky
eda83304af only /italicize/ words completely in upper case
no /YAS/nippet
2013-11-28 23:35:32 -05:00
Noam Postavsky
f86529c96f only crosslink exported symbols 2013-11-28 23:35:32 -05:00
Noam Postavsky
21914cfe32 yas--document-symbol: reindent 2013-11-28 23:35:32 -05:00
Noam Postavsky
46c378d738 format args in docstrings as =code=, not /italic/ 2013-11-28 23:35:28 -05:00
Joao Tavora
4f27187477 refactor: removed extras and snippets tree, both point to submodules 2013-11-28 22:45:40 +00:00
Noam Postavsky
2c237cc311 check function doc before variable doc
This means functions shadow variables with the same name, but at least
that's better than listing functions with the documentation from the
variable! (That happened because the call to yas--document-symbols in
snippet-reference.org was prefering function values to variables, while
the yas--document-symbol was prefering variable doc to function doc).
2013-11-27 21:44:18 -05:00
Noam Postavsky
eaa3141402 fix docstring extraction for "fancy" docs
The docstrings for yas-expand and yas-expand-from-keymap are generated
on the fly, depending on how they are called ("context"). Add a context
argument to the synthesizing functions and pass it nil when extracting
docstrings for the manual.
2013-11-27 21:34:29 -05:00
Noam Postavsky
8d7c9a63a2 retrieve function documentation correctly 2013-11-27 21:04:26 -05:00
Noam Postavsky
fd3fa39444 publish org doc from Rakefile 2013-11-26 23:09:18 -05:00
Noam Postavsky
07b1d3925c move #+STARTUP to org-setup.inc; add #+LINK_HOME
also remove #+AUTHOR since it ends up refering to the generator, not the
actual author.
2013-11-26 23:09:18 -05:00
Noam Postavsky
0aebb41aca move top heading to title
and all the other headings one level up. Except for
snippet-reference.org; yas--document-symbols doesn't quite work right in
that case, fix it later.
2013-11-26 23:09:17 -05:00
Noam Postavsky
dfdb89c61c remove erroneous #+BEGIN/END_QUOTE
pandoc decided to add those for some reason
2013-11-26 23:09:17 -05:00
Noam Postavsky
da9852a43f {snippet-development,faq}.org: fixup pandoc output
- add source blocks
- fix links
- don't duplicate docstrings
- formatting
2013-11-26 23:09:17 -05:00
Noam Postavsky
63873e7d5a snippet-menu.org: links, formatting, obsolete refs 2013-11-26 23:09:17 -05:00