]> code.delx.au - gnu-emacs-elpa/log
gnu-emacs-elpa
8 years agoRelease 0.9.1
Noam Postavsky [Sun, 27 Mar 2016 01:26:50 +0000 (21:26 -0400)]
Release 0.9.1

- add NEWS
- update version numbers
- update snippet submodule

8 years agoyasnippet.el (yas--describe-pretty-table): Cleanup.
Noam Postavsky [Sat, 2 Apr 2016 14:38:05 +0000 (10:38 -0400)]
yasnippet.el (yas--describe-pretty-table): Cleanup.

8 years agoAvoid trailing whitespace in snippet tables
USAMI Kenta [Tue, 29 Mar 2016 15:23:36 +0000 (00:23 +0900)]
Avoid trailing whitespace in snippet tables

* yasnippet.el (yas-describe-tables, yas--describe-pretty-table): Remove
  redundant tail spaces from output.

Copyright-paperwork-exempt: yes

8 years agoAvoid error in case this-command isn't a symbol.
Noam Postavsky [Fri, 26 Feb 2016 21:59:39 +0000 (16:59 -0500)]
Avoid error in case this-command isn't a symbol.

Fixes #664.

* yasnippet.el (yas--skip-and-clear-field-p): Only get
  `delete-selection' property of `this-command' when it's a symbol.

8 years agoReduce `yas-new-snippet-default'
Noam Postavsky [Sun, 31 Jan 2016 17:48:06 +0000 (12:48 -0500)]
Reduce `yas-new-snippet-default'

* yasnippet.el (yas-new-snippet-default): Remove
  "require-final-newline: nil", it's redundant since `snippet-mode' already
  sets that.  Also remove the direct-keybinding, since it's hardly ever
  used, and often the literal "# binding: direct-keybinding" ends up in
  actual snippets.

8 years agoDon't use yas-x-prompt by default
Noam Postavsky [Fri, 29 Jan 2016 18:55:00 +0000 (13:55 -0500)]
Don't use yas-x-prompt by default

It is not a very pleasant method when there are many values, and
`yas-completing-prompt' will usually do a better job, in addition to
respecting customizations to `completing-read-function'.
`yas-dropdown-prompt' remains in first place, since it only takes effect
if the `dropdown' library is loaded, which likely indicates a preference
for it.

* yasnippet.el (yas-prompt-functions): Remove yas-x-prompt from default value.

8 years agoApply changes from GNU ELPA
Stefan Monnier [Thu, 28 Jan 2016 19:30:15 +0000 (14:30 -0500)]
Apply changes from GNU ELPA

* doc/yas-doc-helper.el:
* yasnippet-debug.el:
* yasnippet-tests.el: Fix up copyright headers.

* yasnippet-tests.el: Fix lexical-binding cookie.
* yasnippet-debug.el: Require cl.

* yasnippet-tests.el: Silence byte-compiler.
(yas-saving-variables, yas-with-snippet-dirs): Move macros before their use.
(yas--barbaz, yas--foobarbaz): Declare.
(yas--phony-c-mode, yas--test-mode, yas--another-test-mode): Move out of
deftest, so the byte-compiler understands they're defined.

8 years agoUpdate snippets submodule
Noam Postavsky [Fri, 22 Jan 2016 18:56:26 +0000 (13:56 -0500)]
Update snippets submodule

8 years agoDecide field clearing commands based on delsel
Noam Postavsky [Sun, 10 Jan 2016 23:44:36 +0000 (18:44 -0500)]
Decide field clearing commands based on delsel

* yasnippet.el (yas--skip-and-clear-field-p): Check `delete-selection'
  of `this-command'.

Fix #644, close #645.

8 years agoSlightly improve on fix for #515: Refactor code and add tests
João Távora [Mon, 4 Jan 2016 10:15:31 +0000 (10:15 +0000)]
Slightly improve on fix for #515: Refactor code and add tests

While I agree with the solution for #515 in commit 17fe790 for now,
other approaches might be interesting in the future, like clearing on
other types of insertion, not just self-insertion.

So add some tests and refactor a new function that could be used for
that purpose later on. For now, change no behaviour.

* yasnippet-tests.el (dont-clear-on-partial-deletion-issue-515,
  dont-clear-on-yank-issue-515): New tests. (yas-mock-yank): New
  function.

* yasnippet.el (yas--skip-and-clear-field-p): New function.
  (yas--on-field-overlay-modification): Use it.

8 years agoFix silly mistake in previous commit
Noam Postavsky [Wed, 20 Jan 2016 14:44:28 +0000 (09:44 -0500)]
Fix silly mistake in previous commit

* yasnippet.el (yas--load-snippet-dirs): Put `make-directory' call in
  same branch of the `if' as the `dolist' loop.

8 years agoFix #648; create ~/.emacs.d/snippets automatically
Noam Postavsky [Wed, 20 Jan 2016 14:27:24 +0000 (09:27 -0500)]
Fix #648; create ~/.emacs.d/snippets automatically

* yasnippet.el (yas--load-snippet-dirs): Create
  yas--default-user-snippets-dir, if needed.

8 years agoFix bug reporting examples.
Noam Postavsky [Thu, 14 Jan 2016 18:21:27 +0000 (13:21 -0500)]
Fix bug reporting examples.

- There was a missing "." in the emacs invocation (thanks to Barrie
  Treloar for reporting).

- The example reports had too little plain observation, and too much
  interpretation.

* README.mdown: Add missing "." to bug reporting instructions, improve
  wording of example reports.

Close #646.

8 years agoFix debugging code for newer Emacsen
João Távora [Wed, 6 Jan 2016 10:40:30 +0000 (10:40 +0000)]
Fix debugging code for newer Emacsen

* yasnippet-debug.el (yas-debug-snippet-vars): Check for length of
`buffer-undo-list'. Don't assume all fields have integer
`yas--field-number'.

8 years agoBless Noam Postavsky as the new official maintainer
João Távora [Mon, 4 Jan 2016 09:29:20 +0000 (09:29 +0000)]
Bless Noam Postavsky as the new official maintainer

* yasnippet.el (yas-about): Bless Noam Postavsky as the official maintainer

8 years agoDon't choose ido prompting based on Emacs version
Noam Postavsky [Fri, 11 Dec 2015 02:37:06 +0000 (21:37 -0500)]
Don't choose ido prompting based on Emacs version

* yasnippet.el (yas-ido-prompt): Unconditionally use ido prompting,
  explicitly requireing ido.
(yas-maybe-ido-prompt): New function, call `yas-ido-prompt' if
`ido-mode' is enabled.
(yas-prompt-functions): Replace `yas-ido-prompt' with
`yas-maybe-ido-prompt' in the default value.

8 years agoFix #576; don't override yas-prompt-functions
Noam Postavsky [Fri, 11 Dec 2015 02:36:00 +0000 (21:36 -0500)]
Fix #576; don't override yas-prompt-functions

* yasnippet.el (yas-visit-snippet-file): Don't override
  `yas-prompt-functions'.

8 years agoRespect y-b-l-cond from binding triggered snippets
Noam Postavsky [Sat, 12 Dec 2015 03:54:21 +0000 (22:54 -0500)]
Respect y-b-l-cond from binding triggered snippets

The default value for `yas-buffer-local-condition' was only effective
for `yas-expand-from-trigger-key' command, so it didn't have any effect
when triggering snippets from a key binding (or if using the
`yas-expand' alias).

* yasnippet.el (yas-buffer-local-condition): Check if `this-command' is
  `yas-expand' or `yas-expand-from-keymap' too.

Fixes #305, close #638

8 years agoFix #515; only clear field on self-insert
Noam Postavsky [Sun, 13 Dec 2015 05:38:09 +0000 (00:38 -0500)]
Fix #515; only clear field on self-insert

* yasnippet.el (yas--on-field-overlay-modification): Only clear field if
  `this-command' is `self-insert-command'.  Clean up docstring.

Close #639.

8 years agoImprove test simulatulation of self-insert
Noam Postavsky [Sun, 13 Dec 2015 05:14:44 +0000 (00:14 -0500)]
Improve test simulatulation of self-insert

* yasnippet-tests.el (yas-mock-insert): Use `ert-simulate-command' to
  simulate n self-insert-commands.
(simple-mirror, mirror-with-transformation):
(primary-field-transformation, nested-placeholders-kill-superfield):
(nested-placeholders-use-subfield):
(mirrors-adjacent-to-fields-with-nested-mirrors):
(deep-nested-mirroring-issue-351, example-for-issue-271):
(string-match-with-subregexp-in-mirror-transformations): Call
`yas-mock-insert' directly instead of with `ert-simulate-command'.

8 years agoCleanup yas--on-field-overlay-modification
Noam Postavsky [Sun, 13 Dec 2015 05:30:24 +0000 (00:30 -0500)]
Cleanup yas--on-field-overlay-modification

* yasnippet.el (yas--on-field-overlay-modification): Remove redundant
  `after?' check; use `=' to save marker vs number type checking.

8 years ago* README.mdown: Add link to textmate-to-yas.el.
Noam Postavsky [Sat, 12 Dec 2015 15:47:08 +0000 (10:47 -0500)]
* README.mdown: Add link to textmate-to-yas.el.

8 years ago* README.mdown: update melpa URL.
JJ Asghar [Wed, 28 Jan 2015 22:06:57 +0000 (16:06 -0600)]
* README.mdown: update melpa URL.

Copyright-paperwork-exempt: yes

Close #555.

8 years agoRemove yas--inhibit-overlay-hooks macro.
Noam Postavsky [Thu, 10 Dec 2015 01:17:59 +0000 (20:17 -0500)]
Remove yas--inhibit-overlay-hooks macro.

* yasnippet.el (yas--inhibit-overlay-hooks): Remove.
(yas--commit-snippet, yas--make-move-field-protection-overlays):
(yas-expand-snippet, yas--mirror-update-display):
(yas--field-update-display): Replace `yas--inhibit-overlay-hooks' with
its expansion.

8 years agoyasnippet.el (yas--called-interactively-p): Remove.
Noam Postavsky [Thu, 10 Dec 2015 01:11:31 +0000 (20:11 -0500)]
yasnippet.el (yas--called-interactively-p): Remove.

It's unused since "fix: more idiomatic elisp..." 29 Aug 2013
(13d87aa3c0b0289ed918bab545d2b423974688a5).

8 years agoUse destructive list functions in yas--s-a-p
Noam Postavsky [Wed, 9 Dec 2015 00:03:42 +0000 (19:03 -0500)]
Use destructive list functions in yas--s-a-p

`mapcar' already create a fresh list so there is no need to preserve it.

* yasnippet.el (yas--snippets-at-point): Use `delq' and `delete-dups'
  instead of `remove' and `remove-duplicates`, respectively.

8 years agoFix #587; set `this-command' on fallback.
Noam Postavsky [Tue, 8 Dec 2015 23:19:02 +0000 (18:19 -0500)]
Fix #587; set `this-command' on fallback.

`this-original-command' is supposed to be for the command that
we're *not* executing because of key remapping, therefore it doesn't
make sense to set it to the command we're about to execute.

* yasnippet.el (yas--fallback): Set `this-command'.

8 years agoCloses #632: Use `user-emacs-directory' instead of hardcoded "~/emacs.d"
João Távora [Thu, 26 Nov 2015 13:18:16 +0000 (13:18 +0000)]
Closes #632: Use `user-emacs-directory' instead of hardcoded "~/emacs.d"

* yasnippet.el (yas--default-user-snippets-dir): New defconst.
(yas-snippet-dirs, yas--guess-snippet-directories): Use it.

8 years agoIgnore trailing spaces in snippet definitions
Sharif Nassar [Sun, 8 Nov 2015 18:28:16 +0000 (10:28 -0800)]
Ignore trailing spaces in snippet definitions

Probably nobody wants a snippet `key` with a trailing space. It can
be hard to differentiate from a `key` without trailing space. The
default `<TAB>` behavior of yasnippet will never expand these.

* yasnippet.el (yas--parse-template): Ignore trailing spaces in snippet
  definitions.
* yasnippet-tests.el (deftest ignore-trailing-whitespace): New test for
  new behavior.

Copyright-paperwork-exempt: yes

8 years agoM-x delete-trailing-whitespace
Sharif Nassar [Sun, 8 Nov 2015 18:14:51 +0000 (10:14 -0800)]
M-x delete-trailing-whitespace

* yasnippet.el: delete-trailing-whitespace
* yasnippet-tests.el: delete-trailing-whitespace

Copyright-paperwork-exempt: yes (trivial)

8 years ago* CONTRIBUTING.md: Add note about changelog only messages.
Noam Postavsky [Sat, 7 Nov 2015 13:54:08 +0000 (08:54 -0500)]
* CONTRIBUTING.md: Add note about changelog only messages.

8 years agoFix #607; avoid Emacs bug #21824
Noam Postavsky [Wed, 4 Nov 2015 03:16:17 +0000 (22:16 -0500)]
Fix #607; avoid Emacs bug #21824

See also
- https://github.com/capitaomorte/yasnippet/issues/607
- http://debbugs.gnu.org/cgi/bugreport.cgi?bug=21824

* yasnippet.el (yas--on-field-overlay-modification): Do nothing if
  yas--active-field-overlay is not an overlay.

8 years ago* README.mdown (Use `yas-minor-mode`): Reword.
Noam Postavsky [Sun, 1 Nov 2015 23:10:29 +0000 (18:10 -0500)]
* README.mdown (Use `yas-minor-mode`): Reword.

Close #623.

8 years agoActivate extra and major modes first
Noam Postavsky [Sat, 31 Oct 2015 19:54:33 +0000 (15:54 -0400)]
Activate extra and major modes first

This prevents snippets from a parent mode from overriding those of the
major-mode's (or yas--extra-modes).  Snippets of ancestor modes may
still override snippets of some other ancestor modes, but hopefully this
won't cause much trouble in practice.

See [1] and subsequent comments.

[1]: https://github.com/capitaomorte/yasnippet/issues/619#issuecomment-149127150

* yasnippet.el (yas--modes-to-activate): Reverse result, so that parents
  of yas--extra-modes and major are later in the list.
* yasnippet-tests.el (loading-with-cyclic-parenthood)
(extra-modes-parenthood): Test it.

Close #626.

8 years agoAvoid double snippet loading messages
Noam Postavsky [Sat, 31 Oct 2015 21:10:25 +0000 (17:10 -0400)]
Avoid double snippet loading messages

* yasnippet.el (yas--load-directory-1): Message about loading compiled
  snippets only after successfully doing so.

Close #627.

8 years agoFix #617; ensure point is visible before x prompt
Noam Postavsky [Wed, 21 Oct 2015 22:39:40 +0000 (18:39 -0400)]
Fix #617; ensure point is visible before x prompt

* yasnippet.el (yas-x-prompt): Call redisplay.

8 years agoSimplify string matching.
Noam Postavsky [Mon, 12 Oct 2015 01:23:36 +0000 (21:23 -0400)]
Simplify string matching.

* yasnippet.el (yas--field-parse-create): Use string-match-p to instead
  of save-match-data, anchor regexp with \` (start of string) to instead
  of (eq ... 0)

8 years agoFix #618; save match data in yas--scan-sexps
Noam Postavsky [Mon, 12 Oct 2015 01:18:52 +0000 (21:18 -0400)]
Fix #618; save match data in yas--scan-sexps

* yasnippet.el (yas--scan-sexps): Save match data.

8 years ago* yasnippet.el (yas--scan-sexps): Use ignore-errors.
Noam Postavsky [Mon, 12 Oct 2015 01:17:50 +0000 (21:17 -0400)]
* yasnippet.el (yas--scan-sexps): Use ignore-errors.

8 years agoMerge pull request #621 from npostavs/dfs-extra-modes2
Noam Postavsky [Sun, 11 Oct 2015 18:51:56 +0000 (14:51 -0400)]
Merge pull request #621 from npostavs/dfs-extra-modes2

find parents for extra-modes too (v2)

8 years agoFix #619; find parents for extra-modes too
Noam Postavsky [Sun, 11 Oct 2015 16:55:47 +0000 (12:55 -0400)]
Fix #619; find parents for extra-modes too

* yasnippet.el (yas--modes-to-activate): Call dfs on yas--extra-modes as
  well.

8 years agoBuild a single `explored' list.
Noam Postavsky [Sun, 11 Oct 2015 16:40:17 +0000 (12:40 -0400)]
Build a single `explored' list.

* yasnippet.el (yas--modes-to-activate): Make helper dfs function
  produce the list of modes only by updating a single `explored' list,
  instead of building up the list by value and having to remove
  duplicated after.

8 years agoAdd (failing) yas--modes-to-activate test
Noam Postavsky [Sun, 11 Oct 2015 16:25:20 +0000 (12:25 -0400)]
Add (failing) yas--modes-to-activate test

* yasnippet-tests.el (extra-modes-parenthood): New (failing) test.
(loading-with-cyclic-parenthood): Use equal + sort instead of set
operation + length.

8 years agoUpdate snippets module
George Balatsouras [Sun, 4 Oct 2015 23:57:27 +0000 (02:57 +0300)]
Update snippets module

8 years agoFix invalid yas-key-syntaxes element warning
Noam Postavsky [Mon, 28 Sep 2015 00:16:28 +0000 (20:16 -0400)]
Fix invalid yas-key-syntaxes element warning

* yasnippet.el (yas--templates-for-key-at-point): Fix infinite loop and
  remove redundant "Warning" in the bad element warning.

8 years ago* doc/snippet-organization.org (.yas-skip): Add info.
Noam Postavsky [Fri, 25 Sep 2015 01:12:30 +0000 (21:12 -0400)]
* doc/snippet-organization.org (.yas-skip): Add info.

8 years ago* yasnippet.el (yas--define-snippets-2): Use file-name-NONdirectory.
Noam Postavsky [Sat, 12 Sep 2015 20:30:01 +0000 (16:30 -0400)]
* yasnippet.el (yas--define-snippets-2): Use file-name-NONdirectory.

8 years ago* yasnippet-tests.el (string-suffix-p): Define for older Emacsen.
Noam Postavsky [Sat, 5 Sep 2015 20:20:04 +0000 (16:20 -0400)]
* yasnippet-tests.el (string-suffix-p): Define for older Emacsen.

8 years agoTest visiting compiled snippets
Noam Postavsky [Sat, 5 Sep 2015 19:13:09 +0000 (15:13 -0400)]
Test visiting compiled snippets

* yasnippet-tests.el (visiting-compiled-snippets): New Test.
* yasnippet.el (yas--lookup-snippet-1, yas-lookup-snippet): Split new
  function yas--lookup-snippet-1 from yas-lookup-snippet.

8 years agoAccept documented snippet list formats
Noam Postavsky [Sat, 5 Sep 2015 17:41:12 +0000 (13:41 -0400)]
Accept documented snippet list formats

yas-define-snippets was making assumptions that happended to be true for
its current calls, but could fail if given differently formatted snippet
lists that still meet the docstring description.

* yasnippet.el (yas-define-snippets): Handle incomplete snippet lists.

8 years agoFix #597; use SAVE-FILE to visit compiled snippets
Noam Postavsky [Sat, 5 Sep 2015 00:19:52 +0000 (20:19 -0400)]
Fix #597; use SAVE-FILE to visit compiled snippets

Rename the existing FILE field to LOAD-FILE, and add a new SAVE-FILE to
yas--template struct.  Normally they will be the same, but compiled
snippets have only SAVE-FILE because they are loaded by "compiled" code.

* yasnippet.el (yas--template): Remove field file, add load-file and
  save-file.
(yas--parse-template): Update snippet-definition list in docstrings.
(yas-define-snippets): Move LOAD-FILE value to SAVE-FILE when compiling.
(yas--template-get-file): New function.
(yas--visit-snippet-file-1, yas-load-snippet-buffer,
yas-load-snippet-buffer-and-close): Use yas--template-load-file,
yas--template-save-file, or yas--template-get-file, as appropriate.
* doc/snippet-organization.org (The =.yas-compiled-snippet.el= file):
  Remove caveat that is no longer relevant.

8 years agoReorganize snippet construction from list code
Noam Postavsky [Fri, 4 Sep 2015 22:33:44 +0000 (18:33 -0400)]
Reorganize snippet construction from list code

* yasnippet.el (yas--template): New yas--define-snippets-2 constructor
  with arguments matching yas-define-snippets format.
(yas--define-snippets-1): Use it.
(yas--update-template): Return TEMPLATE argument.

8 years agoCloses #601: updated snippets submodule
João Távora [Tue, 11 Aug 2015 19:22:10 +0000 (20:22 +0100)]
Closes #601: updated snippets submodule

8 years agoMerge pull request #599 from zmwangx/snippet-compilation-doc
João Távora [Tue, 4 Aug 2015 23:51:40 +0000 (00:51 +0100)]
Merge pull request #599 from zmwangx/snippet-compilation-doc

Add documentation for snippet compilation

8 years agoAdd documentation for snippet compilation
Zhiming Wang [Tue, 4 Aug 2015 21:39:36 +0000 (14:39 -0700)]
Add documentation for snippet compilation

Specifically, fill in the section about .yas-compiled-snippet.el, which
was previously labelled as TODO.

* doc/snippet-organization.org (The =.yas-compiled-snippet.el= file):
  Fill in section.

8 years agoSimplify some code
Noam Postavsky [Tue, 4 Aug 2015 18:20:29 +0000 (14:20 -0400)]
Simplify some code

* yasnippet.el (yas-define-snippets): Modify the list instead of
  reconstructing it.
  (yas-load-snippet-buffer-and-close): Replace listp and second with
  cdr-safe.  Use string-prefix-p rather than string-match-p.

8 years agoMerge pull request #596 from npostavs/lookup-snippet
João Távora [Mon, 3 Aug 2015 18:24:27 +0000 (19:24 +0100)]
Merge pull request #596 from npostavs/lookup-snippet

Add yas-lookup-snippet

8 years agoAdd new function yas-lookup-snippet
Noam Postavsky [Mon, 3 Aug 2015 14:36:46 +0000 (10:36 -0400)]
Add new function yas-lookup-snippet

* yasnippet.el (yas-lookup-snippet): New function.
(yas--get-snippet-tables, yas--modes-to-activate): Add optional mode
parameter.
* yasnippet-tests.el (snippet-lookup): New test for yas-lookup-snippet.
* doc/snippet-expansion.org (Expanding from emacs-lisp code): Mention
  yas-lookup-snippet.

8 years agoMinor doc fixes
Noam Postavsky [Mon, 3 Aug 2015 14:29:42 +0000 (10:29 -0400)]
Minor doc fixes

* doc/snippet-expansion.org (Expanding from emacs-lisp code): Fix typo.
* doc/snippet-menu.org (Controlling indenting, Prompting method): Remove
  incorrect whitespace.

8 years agoMerge pull request #578 from aluaces/patch-1
Noam Postavsky [Mon, 18 May 2015 17:12:18 +0000 (13:12 -0400)]
Merge pull request #578 from aluaces/patch-1

Fix "invalid function: quote"

9 years agoFix "invalid function: quote"
Alberto Luaces [Fri, 15 May 2015 21:30:37 +0000 (23:30 +0200)]
Fix "invalid function: quote"

On emacs24, Debian, HTML doc generation finishes with this error.

9 years agoCloses #549: Adjust `load' verbosity to `yas-verbosity'
João Távora [Wed, 15 Apr 2015 09:43:03 +0000 (10:43 +0100)]
Closes #549: Adjust `load' verbosity to `yas-verbosity'

* yasnippet.el (yas--load-yas-setup-file): Be verbose on `load'
according to `yas-verbosity'

9 years agoMerge pull request #571 from PhilHudson/master
João Távora [Mon, 13 Apr 2015 21:03:58 +0000 (22:03 +0100)]
Merge pull request #571 from PhilHudson/master

Replaced 'shadow' with 'override' throughout documentation

9 years agoReplaced 'shadow' with 'override' throughout documentation
Phil Hudson [Mon, 13 Apr 2015 14:08:24 +0000 (15:08 +0100)]
Replaced 'shadow' with 'override' throughout documentation

It is hoped that this will add clarity.

* yasnippet.el, doc/snippet-organization.org (documentation):
  Replaced 'shadow' with 'override' globally.

9 years agoUpdate README.mdown
João Távora [Sun, 5 Apr 2015 22:34:01 +0000 (23:34 +0100)]
Update README.mdown

* README.mdown (Intro): There hasn't been a downloadable demo
in a long time.

9 years agoMerge pull request #569 from npostavs/doc-obsolete
João Távora [Sun, 5 Apr 2015 22:26:37 +0000 (23:26 +0100)]
Merge pull request #569 from npostavs/doc-obsolete

README fixes, mark yas-initialize as obsolete

9 years agoyasnippet.el (yas-initialize): Mark obsolete
Noam Postavsky [Sun, 5 Apr 2015 22:05:07 +0000 (18:05 -0400)]
yasnippet.el (yas-initialize): Mark obsolete

9 years agoREADME.mdown (per-buffer): Remove needless lambda
Noam Postavsky [Sun, 5 Apr 2015 21:59:18 +0000 (17:59 -0400)]
README.mdown (per-buffer): Remove needless lambda

9 years agoREADME.mdown (el-get): Remove obsolete information
Noam Postavsky [Sun, 5 Apr 2015 21:57:46 +0000 (17:57 -0400)]
README.mdown (el-get): Remove obsolete information

9 years ago`yas-minor-mode' assertion broke a test. Good. Fix it.
João Távora [Mon, 23 Mar 2015 10:21:12 +0000 (10:21 +0000)]
`yas-minor-mode' assertion broke a test. Good. Fix it.

* yasnippet-tests.el
(be-careful-when-escaping-in-yas-selected-text-2): Add
`yas-minor-mode'.

9 years agoAdd useful development assertion
João Távora [Mon, 23 Mar 2015 10:10:56 +0000 (10:10 +0000)]
Add useful development assertion

When debugging snippets after M-x toggle-debug-on-error, errors in the
`post-command-hook' might cause `yas--post-command-handler' to be
removed. That's OK, always check that it's there before attempting any
`yas-expand-snippet' calls, since it is essential to check snippet
movement.

* yasnippet.el (yas-expand-snippet): Assert `yas-minor-mode' and
`yas--post-command-handler' active.

9 years agoCloses #562: Deleting inner numberless snippet causes error
João Távora [Mon, 23 Mar 2015 09:50:54 +0000 (09:50 +0000)]
Closes #562: Deleting inner numberless snippet causes error

* yasnippet.el (yas--field-probably-deleted-p): Protect against
nil `yas--field-number'.

* yasnippet-tests.el (delete-numberless-inner-snippet-issue-562): New test

9 years agoGetting rid of low-level assumptions in yasnippet
Stefan Monnier [Fri, 20 Mar 2015 10:34:33 +0000 (10:34 +0000)]
Getting rid of low-level assumptions in yasnippet

The main thrust is to get rid of the use of the `cl-struct-slots'
property which doesn't exist in Emacs-25 any more.

* yasnippet.el: Update copyright
(yas--template): Change constructor name from
`yas--make-blank-template' to `yas--make-template'
(yas--populate-template): Remove.
(yas--define-snippets-1): Use `yas--make-template'
(yas--define-snippets-1): Use `setf's
(yas-define-menu, yas--define-menu-1, yas-tryout-snippet): Use
`yas--make-template'

9 years agoMerge pull request #568 from npostavs/contrib
João Távora [Thu, 19 Mar 2015 11:30:25 +0000 (11:30 +0000)]
Merge pull request #568 from npostavs/contrib

Add a CONTRIBUTING.md file

9 years agoAdd a CONTRIBUTING.md file
Noam Postavsky [Wed, 18 Mar 2015 19:59:28 +0000 (15:59 -0400)]
Add a CONTRIBUTING.md file

Collect some conventions about contributing to Yasnippet (which have
been scattered amongst various issues/pull request) into a single file.

* CONTRIBUTING.md: New File.

9 years agoImplements #566: Remove dead major modes code
Vasilij Schneidermann [Wed, 18 Mar 2015 10:48:44 +0000 (11:48 +0100)]
Implements #566: Remove dead major modes code

* yasnippet.el (yas--known-modes, yas--real-mode?): Removed

9 years agoMerge pull request #559 from mineo/patch-1
João Távora [Thu, 12 Feb 2015 10:40:33 +0000 (10:40 +0000)]
Merge pull request #559 from mineo/patch-1

* yasnippet.el (yas-expand-snippet): improve docstring

9 years agoyas-expand-snippet: Clarify EXPAND-ENV
Wieland Hoffmann [Thu, 12 Feb 2015 01:25:56 +0000 (02:25 +0100)]
yas-expand-snippet: Clarify EXPAND-ENV

9 years agoMerge pull request #552 from treese/master
João Távora [Sat, 10 Jan 2015 15:56:45 +0000 (15:56 +0000)]
Merge pull request #552 from treese/master

Clarify what happens with yas-new-snippet.

Added more detail about how yas-new-snippet behaves,
particularly how it guesses a directory to save in.

* doc/snippet-development.org (Quickly finding snippets):
  enhance section.

9 years agoClarify what happens with yas-new-snippet.
Win Treese [Sat, 10 Jan 2015 15:04:18 +0000 (10:04 -0500)]
Clarify what happens with yas-new-snippet.

Added more detail about how yas-new-snippet behaves, particularly how it guesses a directory to save in.

9 years agoCloses #546: backport `yas-initialize' and provide `yas/initialize'
João Távora [Tue, 23 Dec 2014 11:02:44 +0000 (11:02 +0000)]
Closes #546: backport `yas-initialize' and provide `yas/initialize'

* yasnippet.el (yas-initialize): Renamed from `yas--initialize'.
(yas--backported-syms): Add `yas-initialize'

9 years agoMerge pull request #542 from tarsius/nosearch
João Távora [Tue, 9 Dec 2014 12:08:19 +0000 (12:08 +0000)]
Merge pull request #542 from tarsius/nosearch

Add file doc/.nosearch

9 years agoAdd file doc/.nosearch
Jonas Bernoulli [Mon, 8 Dec 2014 13:47:20 +0000 (14:47 +0100)]
Add file doc/.nosearch

This keeps `normal-top-level-add-subdirs-to-load-path'
from adding the directory to the `load-path'.

9 years agoUpdate README.mdown
João Távora [Sun, 23 Nov 2014 12:23:15 +0000 (12:23 +0000)]
Update README.mdown

Fix misspellings

9 years agoClean up previous change
João Távora [Mon, 17 Nov 2014 11:27:30 +0000 (11:27 +0000)]
Clean up previous change

* yasnippet.el: Update comment.
(yas--protection-violation): Removed.
(yas--on-protection-overlay-modification): Simplified.
(yas--post-command-handler): No longer reference
`yas--protection-violation'

9 years agoCloses #537: Be lenient to extensions operating on snippet fields
João Távora [Tue, 4 Nov 2014 08:27:34 +0000 (08:27 +0000)]
Closes #537: Be lenient to extensions operating on snippet fields

* yasnippet.el (yas--on-protection-overlay-modification): Commit the
snippets being destroyed instead of signalling a protection violation.

9 years agoCloses #536: Fix navigation to zero-length fields at snippet end
João Távora [Sun, 2 Nov 2014 23:53:11 +0000 (23:53 +0000)]
Closes #536: Fix navigation to zero-length fields at snippet end

* yasnippet.el (yas--field-probably-deleted-p): A deleted field
was probably modified before, so enforce that condition.

9 years agoUpdate snippets submodule
Noam Postavsky [Fri, 17 Oct 2014 14:36:08 +0000 (10:36 -0400)]
Update snippets submodule

9 years agoUpdate README.mdown
João Távora [Sat, 11 Oct 2014 21:27:48 +0000 (22:27 +0100)]
Update README.mdown

9 years agoTweak README.mdown to simplify bug reporting paragraph
João Távora [Sat, 11 Oct 2014 13:57:49 +0000 (14:57 +0100)]
Tweak README.mdown to simplify bug reporting paragraph

9 years agoCloses #527: Unbreak case where yas-fallback-behaviour is a list
João Távora [Thu, 9 Oct 2014 06:16:36 +0000 (07:16 +0100)]
Closes #527: Unbreak case where yas-fallback-behaviour is a list

* yasnippet.el (yas--fallback): Extract interesting values from
`yas-fallback-behaviour' before rebinding.

9 years agoCloses #525, closes #526: Prevent some keybinding fallback loops
João Távora [Tue, 7 Oct 2014 13:57:23 +0000 (14:57 +0100)]
Closes #525, closes #526: Prevent some keybinding fallback loops

* yasnippet.el (yas--keybinding-beyond-yasnippet): Add docstring.
(yas--fallback): Also let-bind `yas-minor-mode' to nil when
falling back.

9 years agoMerge pull request #524 from npostavs/fallback-loop
João Távora [Sun, 5 Oct 2014 08:24:34 +0000 (09:24 +0100)]
Merge pull request #524 from npostavs/fallback-loop

Signal an error on recursive yas--fallback calls

9 years agoSignal an error on recursive yas--fallback calls
Noam Postavsky [Sun, 5 Oct 2014 00:52:58 +0000 (20:52 -0400)]
Signal an error on recursive yas--fallback calls

* yasnippet.el (yas--fallback): let-bind yas-fallback-behavior to
  'yas--fallback before actually doing the fallback. Signal an error if
  it's 'yas--fallback (indicating we're in an infinte loop).

9 years agoMerge pull request #519 from syohex/use-cl-macro
João Távora [Mon, 29 Sep 2014 09:40:07 +0000 (10:40 +0100)]
Merge pull request #519 from syohex/use-cl-macro

9 years agoUse cl-incf instead of cl
Syohei YOSHIDA [Mon, 29 Sep 2014 03:25:01 +0000 (12:25 +0900)]
Use cl-incf instead of cl

* yasnippet.el (yas--snippet-next-id, yas--real-line-beginning):
Use `cl-incf'.

9 years agoMerge pull request #518 from rnkn/master
João Távora [Mon, 22 Sep 2014 21:02:00 +0000 (22:02 +0100)]
Merge pull request #518 from rnkn/master

Compatibility with custom-unlispify-remove-prefixes

9 years agoCompatibility with custom-unlispify-remove-prefixes
Paul Rankin [Sat, 20 Sep 2014 14:53:29 +0000 (00:53 +1000)]
Compatibility with custom-unlispify-remove-prefixes

9 years agoUpdate snippets submodule
João Távora [Thu, 11 Sep 2014 10:12:19 +0000 (11:12 +0100)]
Update snippets submodule

9 years agoMerge pull request #514 from tarsius/master
João Távora [Tue, 9 Sep 2014 19:50:56 +0000 (20:50 +0100)]
Merge pull request #514 from tarsius/master

Cosmetic fixes and quiet byte-compiler