From 4f0c2cb993c7121f8649a217e0a2bc8f1afe7676 Mon Sep 17 00:00:00 2001 From: Zhang Chiyuan Date: Thu, 10 Apr 2008 05:46:13 +0000 Subject: [PATCH] update changelog and document --- doc/changelog.rst | 18 +++++++++++++++++- doc/define_snippet.rst | 16 ++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/doc/changelog.rst b/doc/changelog.rst index 174fbcc..b498311 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -6,12 +6,28 @@ ChangeLog :Contact: pluskid@gmail.com :Date: 2008-03-22 +0.5.0 / 2008-04-10 +================== + +* Integrate with hippie-expand. Just add ``yas/hippie-try-expand`` to + ``hippie-expand-try-functions-list``. +* If you set ``yas/fall-back-behavior`` to ``'return-nil``, YASnippet + will return nil when it can't find a snippet to expand. +* Defect fix: the condition of a snippet was evaluated twice in + earlier version. +* Deleting snippet (using ``C-w`` or ``C-k``) won't cause serious + problem now. +* Several complex snippet for python-mode from Yasser included in the + distribution. + 0.4.5 / 2008-04-07 ================== * Merge the latest dropdown-list.el. * Add snippets for f90-mode from Li Zhu. -* Bug fix: l-safe-expr-p: Lisp nesting exceeds ``max-lisp-eval-depth`` error when several (more than two) snippets overlaps. Thanks sunwaybupt@newsmth for reporting this bug. +* Bug fix: l-safe-expr-p: Lisp nesting exceeds ``max-lisp-eval-depth`` + error when several (more than two) snippets overlaps. Thanks + sunwaybupt@newsmth for reporting this bug. 0.4.4 / 2008-03-24 ================== diff --git a/doc/define_snippet.rst b/doc/define_snippet.rst index 0b734dd..edb9ee1 100644 --- a/doc/define_snippet.rst +++ b/doc/define_snippet.rst @@ -510,6 +510,22 @@ called. Usually this works very well -- when there's a snippet, expand it, otherwise, call whatever command originally bind to the trigger key. +However, you can change this behavior by customizing the +``yas/fallback-behavior`` variable. If you set this variable to +``'return-nil``, it will return ``nil`` instead of trying to call the +*original* command when no snippet is found. This is useful when you +would like YASnippet to work with other extensions, +e.g. ``hippie-expand``. I'm also glad to tell you that integration +with ``hippie-expand`` is already included in YASnippet. + +Integration with ``hippie-expand`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +To integrate with ``hippie-expand``, just put +``yas/hippie-try-expand`` in +``hippie-expand-try-functions-list``. Personally I would like to put +in front of the list, but it can be put anywhere you prefer. + Other way to select a snippet -----------------------------