mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-13 21:13:04 +00:00
Fix docs for new org mode
* Rakefile: Comment to remind me how to run it. * doc/snippet-expansion.org: * doc/snippet-menu.org: It seems org 9.x got a bit stricter about link formatting. Cross-file links *must* use the 'file:' prefix. * doc/yas-doc-helper.el (yas--document-symbol): Org 9.x also got a bit more strict about empty lines between a node and its property list. Make sure not to put a blank line between variable nodes and the property list.
This commit is contained in:
parent
3d7cafccf8
commit
0afc638e16
4
Rakefile
4
Rakefile
@ -50,6 +50,10 @@ task :release => [:package, 'doc:archive'] do
|
|||||||
raise "Not implemented for github yet!"
|
raise "Not implemented for github yet!"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# rake doc[../htmlize]
|
||||||
|
#
|
||||||
|
# To do this interactively, load doc/yas-doc-helper, open one of the
|
||||||
|
# org files, and do `C-c C-e P'.
|
||||||
desc "Generate document"
|
desc "Generate document"
|
||||||
task :doc, [:htmlize] do |t, args|
|
task :doc, [:htmlize] do |t, args|
|
||||||
load_path = '-L .'
|
load_path = '-L .'
|
||||||
|
@ -77,7 +77,7 @@ obsolete.
|
|||||||
|
|
||||||
** Insert at point
|
** Insert at point
|
||||||
|
|
||||||
The command [[#yas-insert-snippet][=yas-insert-snippet=]] lets you insert snippets at point
|
The command [[sym:yas-insert-snippet][=yas-insert-snippet=]] lets you insert snippets at point
|
||||||
/for your current major mode/. It prompts you for the snippet key
|
/for your current major mode/. It prompts you for the snippet key
|
||||||
first, and then for a snippet template if more than one template
|
first, and then for a snippet template if more than one template
|
||||||
exists for the same key.
|
exists for the same key.
|
||||||
@ -94,7 +94,7 @@ The prompting methods used are again controlled by
|
|||||||
It's often useful to inject already written text in the middle of a
|
It's often useful to inject already written text in the middle of a
|
||||||
snippet. The variable [[sym:yas-wrap-around-region][=yas-wrap-around-region=]] when to t substitute
|
snippet. The variable [[sym:yas-wrap-around-region][=yas-wrap-around-region=]] when to t substitute
|
||||||
the region contents into the =$0= placeholder of a snippet expanded by
|
the region contents into the =$0= placeholder of a snippet expanded by
|
||||||
[[#yas-insert-snippet][=yas-insert-snippet=]]. Setting it to a character value (e.g. =?0=)
|
[[sym:yas-insert-snippet][=yas-insert-snippet=]]. Setting it to a character value (e.g. =?0=)
|
||||||
will insert the contents of corresponding register.
|
will insert the contents of corresponding register.
|
||||||
|
|
||||||
Older (versions 0.9.1 and below) of Yasnippet, supported a setting of
|
Older (versions 0.9.1 and below) of Yasnippet, supported a setting of
|
||||||
@ -169,7 +169,7 @@ In particular, the following things matter:
|
|||||||
|
|
||||||
- Buffer-local list of extra modes
|
- Buffer-local list of extra modes
|
||||||
|
|
||||||
Use [[#yas-activate-extra-mode][=yas-activate-extra-mode=]] to
|
Use [[sym:yas-activate-extra-mode][=yas-activate-extra-mode=]] to
|
||||||
consider snippet tables whose name does not correspond to a major
|
consider snippet tables whose name does not correspond to a major
|
||||||
mode. Typically, you call this from a minor mode hook, for example:
|
mode. Typically, you call this from a minor mode hook, for example:
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ In this menu, you can find
|
|||||||
Invoking "Load snippets..." from the menu invokes [[sym:yas-load-directory][=yas-load-directory=]]
|
Invoking "Load snippets..." from the menu invokes [[sym:yas-load-directory][=yas-load-directory=]]
|
||||||
and prompts you for a snippet directory hierarchy to load.
|
and prompts you for a snippet directory hierarchy to load.
|
||||||
|
|
||||||
Also useful is the "Reload everything" item to invoke [[#yas-reload-all][=yas-reload-all=]]
|
Also useful is the "Reload everything" item to invoke [[sym:yas-reload-all][=yas-reload-all=]]
|
||||||
which uncondionally reloads all the snippets directories defined in
|
which uncondionally reloads all the snippets directories defined in
|
||||||
[[sym:yas-snippet-dirs][=yas-snippet-dirs=]] and rebuilds the menus.
|
[[sym:yas-snippet-dirs][=yas-snippet-dirs=]] and rebuilds the menus.
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@
|
|||||||
|
|
||||||
If you place an empty plain text file =.yas-make-groups= inside one
|
If you place an empty plain text file =.yas-make-groups= inside one
|
||||||
of the mode directories, the names of these sub-directories are
|
of the mode directories, the names of these sub-directories are
|
||||||
considered groups of snippets and [[snippet-menu.org][the menu]] is organized much more
|
considered groups of snippets and [[file:snippet-menu.org][the menu]] is organized much more
|
||||||
cleanly:
|
cleanly:
|
||||||
|
|
||||||
[[./images/menu-groups.png]]
|
[[./images/menu-groups.png]]
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
(mapcar #'symbol-name (help-function-arglist symbol t))))
|
(mapcar #'symbol-name (help-function-arglist symbol t))))
|
||||||
(heading (cond ((fboundp symbol)
|
(heading (cond ((fboundp symbol)
|
||||||
(format
|
(format
|
||||||
"%s =%s= (%s)" stars symbol
|
"%s =%s= (%s)\n" stars symbol
|
||||||
(mapconcat (lambda (a)
|
(mapconcat (lambda (a)
|
||||||
(format (if (string-prefix-p "&" a)
|
(format (if (string-prefix-p "&" a)
|
||||||
"/%s/" "=%s=") a))
|
"/%s/" "=%s=") a))
|
||||||
@ -91,7 +91,7 @@
|
|||||||
(format "=%s=" name))))
|
(format "=%s=" name))))
|
||||||
body t))
|
body t))
|
||||||
;; output the paragraph
|
;; output the paragraph
|
||||||
(concat heading "\n" after-heading "\n" body)))
|
(concat heading after-heading "\n" body)))
|
||||||
|
|
||||||
(defun yas--document-symbols (level &rest names-and-predicates)
|
(defun yas--document-symbols (level &rest names-and-predicates)
|
||||||
(let ((sym-lists (make-vector (length names-and-predicates) nil))
|
(let ((sym-lists (make-vector (length names-and-predicates) nil))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user