mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-14 05:23:04 +00:00
* yasnippet.el (yas-key-syntaxes): Improve documentation.
This commit is contained in:
parent
7761deeeb5
commit
faed1062a2
27
yasnippet.el
27
yasnippet.el
@ -391,24 +391,23 @@ the trigger key itself."
|
|||||||
(defvar yas-key-syntaxes (list "w" "w_" "w_." "w_.()" "^ ")
|
(defvar yas-key-syntaxes (list "w" "w_" "w_." "w_.()" "^ ")
|
||||||
"Syntaxes and functions to help look for trigger keys before point.
|
"Syntaxes and functions to help look for trigger keys before point.
|
||||||
|
|
||||||
Its elements can be either strings or functions (see below for
|
Each element in this list specifies how to skip buffer positions
|
||||||
the difference) and are tried in order by the snippet expansion
|
backwards and look for the start of a trigger key.
|
||||||
mechanism until one or more expandable snippets are found.
|
|
||||||
|
|
||||||
Each element is a way to skip buffer positions backwards and look
|
Each element can be either a string or a functino of no
|
||||||
for the start of a trigger key. A string element is simply passed
|
arguments. A string element is simply passed to
|
||||||
to `skip-syntax-backward' whereas a function element is called
|
`skip-syntax-backward' whereas a function element is called with
|
||||||
with no arguments and should also place point before the original
|
no arguments and should also place point before the original
|
||||||
position.
|
position.
|
||||||
|
|
||||||
If no expandable snippets are found but the function returns the
|
The string between the resulting buffer position and the original
|
||||||
symbol `try-again' it will be called again from the previous
|
point.in the is matched against the trigger keys in the active
|
||||||
position and may again reposition point until it returns some
|
snippet tables.
|
||||||
other value.
|
|
||||||
|
|
||||||
The buffer's string starting at the resulting position and ending
|
If no expandable snippets are found, the next element is the list
|
||||||
at the original point is matched against the active snippet
|
is tried, unless a function element returned the symbol `again',
|
||||||
tables.
|
in which case it is called again from the previous position and
|
||||||
|
may once more reposition point.
|
||||||
|
|
||||||
For example, if `yas-key-syntaxes'' value is '(\"w\" \"w_\"),
|
For example, if `yas-key-syntaxes'' value is '(\"w\" \"w_\"),
|
||||||
trigger keys composed exclusively of \"word\"-syntax characters
|
trigger keys composed exclusively of \"word\"-syntax characters
|
||||||
|
Loading…
x
Reference in New Issue
Block a user