forget to commit for 0.5.6?

This commit is contained in:
Zhang Chiyuan
2008-08-08 05:04:42 +00:00
parent de67b5802f
commit 36184e0bc7
3 changed files with 80 additions and 5 deletions

View File

@@ -6,6 +6,26 @@ ChangeLog
:Contact: pluskid@gmail.com
:Date: 2008-03-22
0.5.6 / 2008-08-07
==================
* Added a buffer local variable ``yas/dont-activate`` to turn off
``yas/minor-mode`` in some major modes. See `Issue 29
<http://code.google.com/p/yasnippet/issues/detail?id=29>`_.
* Make the environment of elisp evaluation more friendly to
``(current-column)``.
* Fixed the regular expression bug in python-mode snippets.
* Use filename or full key extension for snippet name if no ``name``
property is defined.
0.5.5 / 2008-05-29
==================
* Tweak ``yas/extra-mode-hooks`` so that it can be more easily
customized.
* Add an entry in FAQ about why ``TAB`` key doesn't work in some
modes.
0.5.4 / 2008-05-15
==================

View File

@@ -17,3 +17,45 @@ the snippet file.
Note some editors will automatically add a newline for you. In Emacs,
if you set ``require-final-newline`` to ``t``, it will add the final
newline for you automatically.
Why TAB key doesn't expand a snippet?
=====================================
First check the mode line to see if there's ``yas``. If no, then try
``M-x yas/minor-mode-on`` to manually turn on ``yas/minor-mode`` and
try to expand the snippet again. If it works, then, you can add the
following code to your ``.emacs`` *before* loading YASnippet:
.. sourcecode:: lisp
(setq yas/extra-mode-hooks '(the-major-mode))
where ``the-major-mode`` is the major mode in which ``yas/minor-mode``
isn't enabled by default.
If ``yas/minor-mode`` is on but the snippet still not expanded. Then
try to see what command is bound to the ``TAB`` key: press ``C-h k``
and then press ``TAB``. Emacs will show you the result.
You'll see a buffer prompted by Emacs saying that ``TAB runs the
command ...``. Alternatively, you might see ``<tab> runs the command
...``, note the difference between ``TAB`` and ``<tab>`` where the
latter has priority. If you see ``<tab>`` bound to a command other
than ``yas/expand``, (e.g. in ``org-mode``) you can try the following
code to work around:
.. sourcecode:: lisp
(add-hook 'org-mode-hook
'(lambda ()
(make-variable-buffer-local 'yas/trigger-key)
(setq yas/trigger-key [tab])))
replace ``org-mode-hook`` with the major mode hook you are dealing
with (``C-h m`` to see what major mode you are in).
If it says ``TAB`` but YASnippet still doesn't work, check your
configuration and you may also ask for help on the `discussion group
<http://groups.google.com/group/smart-snippet>`_. Don't forget to
attach the information on what command is bound to TAB as well as the
mode information (Can be obtained by ``C-h m``).