Commits on Aug 8, 2017
  1. Don't keep region active when expanding from keymap

    npostavs committed Aug 8, 2017
    * yasnippet.el (yas-expand-snippet): Only keep region active if we are
    going to field $0 and it has some text.
Commits on Jul 23, 2017
  1. Release 0.12.1

    npostavs committed Jul 23, 2017
    * NEWS: Changes for 0.12.1.
    * yasnippet.el (yas--version): Bump version number.
  2. Add compile_all target, fix all compilation warnings

    npostavs committed Jul 19, 2017
    * Rakefile (.elc): Set byte-compile-force-lexical-warnings when
    (:compile_all): New target that compiles yasnippet-debug.el and
    yasnippet-tests.el too.
    * .travis.yml (script): Use it instead of `compile'.  Update cl-lib to
    0.6.1.  Don't error on warnings for Emacs 24.3 on yasnippet-tests.el.
    * yasnippet-debug.el: Don't use `yas--loaddir' if it's not
    bound (e.g., when compiling).  Require `color' and `edebug' at
    toplevel.  Check if `subr-x' defines `when-let'.
    (yas-debug-snippet-vars): Remove, it was unused and broken.
    * yasnippet-tests.el (yas-with-snippet-dirs, (yas-should-expand)
    (yas--collect-menu-items, yas-should-not-expand, yas-mock-insert)
    (yas-mock-yank, yas--key-binding, yas-make-file-or-dirs)
    (yas-variables, yas-call-with-saving-variables)
    (yas-call-with-snippet-dirs, special-mode, string-suffix-p): Move to
    top section.
    (yas-tests--ran-exit-hook): Rename from yas--ran-exit-hook, and move
    to top-level.
    * yasnippet.el (yas--letenv): Evaluate the FORMs of ENV.
  3. Fix some compilation warnings

    monnier authored and npostavs committed Jul 18, 2017
    * yasnippet-debug.el (yas--condition-cache-timestamp): Move it before first use.
    (yas-debug-live-marker, yas-debug-live-range, yas-debug-snippet-vars)
    (yas-debug-process-command-line): Remove or mark unused
    (yas--letenv): Use `cl-progv'.
    (yas--mirror-update-display): Remove unused SNIPPET parameter, update
  4. Avoid to indent snippets having setup `(yas-indent-line 'fixed)'

    PierreTechoueyres authored and npostavs committed Jul 22, 2017
    Avoid `yas--auto-fill' call to `yas--update-mirrors' without setting
    the snippet environment.
    * yasnippet.el (yas--auto-fill): Reinstate snippet environment before
    calling `yas--update-mirrors'.
Commits on Jul 18, 2017
  1. Update NEWS, version number to 0.12, and snippets submodule

    npostavs committed Jul 18, 2017
    * NEWS: Update for 0.12 changes.
    * snippets/: Update to latest.
    * yasnippet-debug.el:
    * yasnippet-tests.el:
    * yasnippet.el: Update copright years.  Update version number to
Commits on Jul 16, 2017
  1. Update information

    npostavs committed Apr 23, 2017
    * README.mdown: Note that bugs can be submitted to main Emacs list.
    * Fix double spacing, remove carriage returns.
    Tighten up commit message example.
  2. Optionally add undo list to debug info

    npostavs committed Jun 2, 2017
    * yasnippet-debug.el (yas-debug-undo): New variable.
    (yas-toggle-debug-undo): New command.
    (yas-debug-snippets): Print undo list if `yas-debug-undo' is non-nil.
  3. Handle dead snippets better

    npostavs committed May 17, 2017
    * yasnippet-debug.el (yas-debug-live-marker)
    (yas-debug-ov-fom-start, yas-debug-ov-fom-end)
    (yas-debug-live-range, yas--debug-format-fom-concise): Don't assume
    snippet has markers, it could have been converted to integer position.
  4. Make yas-debug-process-command-line easier to debug

    npostavs committed May 11, 2017
    * yasnippet-debug.el (yas-debug-process-command-line): Allow giving
    options programatically
  5. Provide command line interface from yasnippet-debug.el

    npostavs committed Dec 4, 2016
    yasnippet-debug.el can now be used to quickly test and debug a snippet
    in a file.
    * Rakefile (itests): New target, runs tests interactively.
    * yasnippet-debug.el: Set lexical binding.
    (when-let): Backwards compabtility definition.
    (yas-debug-live-indicators, yas-debug-live-colors)
    (yas-debug-recently-live-indicators, yas-debug-get-live-indicator)
    (yas-debug-live-marker, yas-debug-ov-fom-start, yas-debug-ov-fom-end)
    (yas-debug-live-range, yas-debug-with-tracebuf, yas-debug-snippet)
    (yas-debug-target-buffer, yas-debug-target-snippets)
    (yas-debug-snippets, yas-debug-process-command-line): New functions
    and variables.
    (yas-debug-test): Remove.
    * yasnippet.el (yas--snippet-revive): List snippet identifier in debug
    (yas--post-command-handler): Allow the debugger to run.
Commits on Jul 1, 2017
  1. Fixup yasnippet-debug.el

    npostavs committed Dec 4, 2016
    * yasnippet-debug.el: Replace cl with cl-lib, replace
    yas--snippets-at-point with yas-active-snippets.
Commits on Jun 24, 2017
  1. Allow customizing overlay priority

    npostavs committed Jun 24, 2017
    * yasnippet.el (yas-overlay-priority): New custom option.
    (yas--make-control-overlay, yas--make-move-active-field-overlay): Use
Commits on Jun 7, 2017
  1. Make sure tests don't rely on running order

    npostavs committed Jun 7, 2017
    * yasnippet-tests.el (undo-indentation)
    (undo-indentation-multiline): Call `yas-reload-all'.
Commits on Jun 6, 2017
  1. Fix undo information recording for multiline snippets

    npostavs committed Jun 6, 2017
    * yasnippet.el (yas--get-indent-undo-pos): Renamed from
    (yas-expand-snippet): Bind it to line beginning of snippet expansion
    * yasnippet-tests.el (undo-indentation, undo-indentation-multiline):
    New tests for this and previous fix.
Commits on Jun 2, 2017
  1. Handle undo of snippet 1st line indent properly

    npostavs committed Jun 2, 2017
    * yasnippet.el (yas--first-indent-undo)
    (yas--return-first-indent-undo): New variables.
    (yas-expand-snippet): Use them to collect the exact undo info from
    indenting the first snippet line, rather than trying to reconstruct
    (yas--indent-region): Put undo info from indenting snippet's first
    line into `yas--first-indent-undo' if `yas--return-first-indent-undo'
    is non-nil.
Commits on May 19, 2017
  1. Restore syntax-propertize-function before indenting mirrors

    npostavs committed May 19, 2017
    * yasnippet.el (yas--snippet-parse-create): End binding of
    syntax-propertize-function once snippet field parsing is finished.
Commits on May 17, 2017
  1. Don't delete snippets more than once.

    npostavs committed May 17, 2017
    * yasnippet.el (yas--on-field-overlay-modification): Don't commit
    snippet again if the the triggering overlay has already been deleted.
Commits on May 12, 2017
  1. Fix field parsing in modes that use the `syntax-table' property

    npostavs committed May 10, 2017
    * yasnippet.el (yas--indent-parse-create): Let-bind
    `parse-sexp-lookup-properties' to nil.
Commits on May 11, 2017
Commits on Apr 21, 2017
Commits on Apr 18, 2017
  1. Don't leave unreadable objects in the undo list

    npostavs committed Apr 13, 2017
    * yasnippet.el (yas--commit-snippet): Remove overlay object after
    deleting it.
    (yas--markers-to-points): Drop marker object.
    (yas--points-to-markers): Create a new marker object.
Commits on Apr 17, 2017
  1. Fix condition timestamps in key filter functions

    npostavs committed Apr 17, 2017
    * yasnippet.el (yas--maybe-expand-key-filter):
    (yas--maybe-expand-from-keymap-filter): Let-bind
    `yas--condition-cache-timestamp' to the current time.
Commits on Apr 10, 2017
  1. Fix ${0:soon-to-be-deleted} with no other fields

    npostavs committed Apr 5, 2017
    * yasnippet.el (yas-expand-snippet): Unset `deactivate-mark'.
Commits on Apr 8, 2017
  1. Fix problems with auto-fill-mode interaction

    npostavs committed Apr 4, 2017
    * yasnippet-tests.el (auto-fill-with-multiparagraph): New test.
    * yasnippet.el (yas--auto-fill): Don't snapshot markers outside of
    current paragraph.
    (yas--goto-saved-location, yas--snapshot-marker-location): Count
    newlines as whitespace (even if mode marks them as non-whitespace
    syntax, e.g., comment end).
    (yas--snapshot-overlay-location, yas--restore-overlay-location): Don't
    snapshot overlay position which is outside of BEG .. END.
  2. Make `yas-about' more informative

    npostavs committed Apr 8, 2017
    * yasnippet.el (yas--loaddir): New constant.
    (yas-installed-snippets-dir): Use it to compute value.
    (yas-about): Get version from git or `package' if available.
Commits on Mar 26, 2017
  1. Correctly wrap auto-fill-function when it's toggled on later

    npostavs committed Mar 26, 2017
    * yasnippet.el (yas--auto-fill-wrapper): New function, extracted from
    (yas-minor-mode): Call it, and it to `auto-fill-mode-hook'.
  2. Update snippets submodule

    npostavs committed Mar 26, 2017
  3. Fix interaction with c auto-fill

    npostavs committed Mar 23, 2017
    Save and restore all snippet marker and overlays in the current
    paragraph around auto-fill calls.  Extend the marker/overlay snapshot
    and restore mechanisms to work in multiline regions.
    * yasnippet.el (yas-minor-mode): Install our auto-fill function around
    the default one.
    (yas--original-auto-fill-function): New variable.
    (yas--auto-fill): New function, saves snippet markers & overlays,
    calls original auto-fill-function, then restores markers and overlays.
    (yas--snapshot-marker-location): Take new optional parameters BEG END,
    allow for newlines in whitespace sequences (even if newline doesn't
    have whitespace syntax).
    (yas--snapshot-overlay-location): New function, takes BEG END,
    produced non-line based location snapshots.
    (yas--snapshot-overlay-line-location): Renamed from old
    `yas--snapshot-overlay-location' function.
    (yas--restore-overlay-line-location): Renamed from old
    `yas--restore-overlay-location' function, narrow to line before calling
    (yas--goto-saved-location): Use whole narrowed buffer instead of
    assuming current line.
    (yas--restore-overlay-location): New function, assume whole narrowed
    buffer may be used.
    (yas--prepare-snippets-for-move, yas--finish-moving-snippets):
    (yas--indent-region): Adjust callers.
Commits on Mar 23, 2017
  1. Only update live snippets

    npostavs committed Mar 23, 2017
    * yasnippet.el (yas--snippet-live-p): New function.
    (yas--on-field-overlay-modification): Use it to avoid updating a dead
    snippet, give a warning instead.
  2. Restore syntax-propertize-function before indenting snippet

    npostavs committed Mar 23, 2017
    * yasnippet.el (yas--snippet-parse-create): Some modes require correct
    syntax-propertizing to indent properly.
Commits on Mar 12, 2017
  1. Ensure inhibit-modification-hooks is nil while modifying buffer

    npostavs committed Mar 12, 2017
    * yasnippet.el (yas--on-field-overlay-modification): Bind
    inhibit-modification-hooks to nil so that other packages' hooks can
    run, yas--inhibit-overlay-hooks so that we won't run recursively.