[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master eaeb6ff 051/177: more links to docstrings, don't repeat do
From: |
João Távora |
Subject: |
[elpa] master eaeb6ff 051/177: more links to docstrings, don't repeat docstrings |
Date: |
Sat, 28 Mar 2015 15:40:46 +0000 |
branch: master
commit eaeb6ff7a93d5ed1442cc7d6ea8b78f7fd20a520
Author: Noam Postavsky <address@hidden>
Commit: Noam Postavsky <address@hidden>
more links to docstrings, don't repeat docstrings
---
doc/snippet-expansion.org | 48 +++++++-------------------------------------
1 files changed, 8 insertions(+), 40 deletions(-)
diff --git a/doc/snippet-expansion.org b/doc/snippet-expansion.org
index 53e6ad5..349b352 100644
--- a/doc/snippet-expansion.org
+++ b/doc/snippet-expansion.org
@@ -72,10 +72,10 @@ However, you can change this behavior by customizing the
*** Insert at point
-The command =M-x yas-insert-snippet= lets you insert snippets at point
-/for you current major mode/. It prompts you for the snippet key first,
-and then for a snippet template if more than one template exists for the
-same key.
+The command [[#yas-insert-snippet][=yas-insert-snippet=]] lets you insert
snippets at point
+/for your current major mode/. It prompts you for the snippet key
+first, and then for a snippet template if more than one template
+exists for the same key.
The list presented contains the snippets that can be inserted at point,
according to the condition system. If you want to see all applicable
@@ -181,42 +181,7 @@ snippets is just boring. So has a buffer local variable
=(not (python-in-string/comment))= in =python-mode-hook=.
Then, what if you really want some particular snippet to expand even
-inside a comment? This is also possible! But let's stop telling the
-story and look at the rules:
-
-- If [[sym:yas-buffer-local-condition][=yas-buffer-local-condition=]]
evaluate to nil, no snippets will be
- considered for expansion.
-
-- If it evaluates to the a /cons cell/ where the =car= is the symbol
- =require-snippet-condition= and the =cdr= is a symbol (let's call it
- =requirement=), then:
-
- - Snippets having no =# condition:= directive won't be considered;
-
- - Snippets with conditions that evaluate to nil (or produce an
- error) won't be considered;
-
- - If the snippet has a condition that evaluates to non-nil (let's
- call it =result=):
-
- - If =requirement= is =t=, the snippet is ready to be expanded;
-
- - If =requirement= is =eq= to =result=, the snippet is ready to
- be expanded;
-
- - Otherwise the snippet won't be considered.
-
-- If it evaluates to the symbol =always=, all snippets are considered
- for expansion, regardless of any conditions.
-
-- If it evaluate to =t= or some other non-nil value:
-
- - If the snippet has no condition, or has a condition that evaluate
- to non-nil, it is ready to be expanded.
-
- - Otherwise, it won't be considered.
-
-In the mentioned scenario, set
[[sym:yas-buffer-local-condition][=yas-buffer-local-condition=]] like this
+inside a comment? Set
[[sym:yas-buffer-local-condition][=yas-buffer-local-condition=]] like this
#+BEGIN_SRC emacs-lisp
(add-hook 'python-mode-hook
@@ -232,6 +197,9 @@ in comment to be evaluated to the symbol
=force-in-comment=. Then it can
be expanded as you expected, while other snippets like =if= still can't
expanded in comment.
+For the full set of possible conditions, see the documentation for
+[[sym:yas-buffer-local-condition][=yas-buffer-local-condition=]].
+
*** Multiples snippet with the same key
The rules outlined [[Eligible%20snippets][above]] can return more than
- [elpa] master d451fef 041/177: rename manual.org to index.org, (continued)
- [elpa] master d451fef 041/177: rename manual.org to index.org, João Távora, 2015/03/28
- [elpa] master 5acc976 043/177: split symbol reference into separate file, João Távora, 2015/03/28
- [elpa] master fd8423c 045/177: fix links, João Távora, 2015/03/28
- [elpa] master 7b82424 046/177: move index.org subsection into snippet-expansion.org, João Távora, 2015/03/28
- [elpa] master 3002594 037/177: Merge pull request #430 from npostavs/org-doc, João Távora, 2015/03/28
- [elpa] master 875ef77 044/177: move index.org subsection into snippet-organization.org, João Távora, 2015/03/28
- [elpa] master 2f7bb6c 048/177: move images to the section they describe, João Távora, 2015/03/28
- [elpa] master 8f1fa08 049/177: replace obsolete refs, João Távora, 2015/03/28
- [elpa] master 08a44b4 050/177: add code examples for snippet-expansion.rst, João Távora, 2015/03/28
- [elpa] master dfdb89c 054/177: remove erroneous #+BEGIN/END_QUOTE, João Távora, 2015/03/28
- [elpa] master eaeb6ff 051/177: more links to docstrings, don't repeat docstrings,
João Távora <=
- [elpa] master 07b1d39 056/177: move #+STARTUP to org-setup.inc; add #+LINK_HOME, João Távora, 2015/03/28
- [elpa] master fd3fa39 057/177: publish org doc from Rakefile, João Távora, 2015/03/28
- [elpa] master 2c237cc 060/177: check function doc before variable doc, João Távora, 2015/03/28
- [elpa] master eaa3141 059/177: fix docstring extraction for "fancy" docs, João Távora, 2015/03/28
- [elpa] master 8d7c9a6 058/177: retrieve function documentation correctly, João Távora, 2015/03/28
- [elpa] master 63873e7 052/177: snippet-menu.org: links, formatting, obsolete refs, João Távora, 2015/03/28
- [elpa] master e46d9c7 047/177: link to docstring ref; fix other links, formatting, João Távora, 2015/03/28
- [elpa] master 860858d 061/177: Merge pull request #436 from npostavs/autodoc-1, 2, João Távora, 2015/03/28
- [elpa] master f6cace0 042/177: convert old rst manuals to org mode, João Távora, 2015/03/28
- [elpa] master 21914cf 064/177: yas--document-symbol: reindent, João Távora, 2015/03/28