Permalink
Commits on Aug 19, 2017
  1. Add yas-also-indent-empty-lines to allow old indent behavior

    * yasnippet.el (yas-also-auto-indent-first-line): New option.
    (yas--indent-region): Also indent empty lines if it's set.
    * yasnippet-tests.el (yas-also-indent-empty-lines): New test.
    npostavs committed Aug 17, 2017
Commits on Aug 8, 2017
  1. Don't keep region active when expanding from keymap

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

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

    * Rakefile (.elc): Set byte-compile-force-lexical-warnings when
    compiling.
    (: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.
    npostavs committed Jul 19, 2017
  3. Fix some compilation warnings

    * 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
    variable/parameters.
    (yas--letenv): Use `cl-progv'.
    (yas--mirror-update-display): Remove unused SNIPPET parameter, update
    caller.
    monnier committed with npostavs Jul 18, 2017
  4. Avoid to indent snippets having setup `(yas-indent-line 'fixed)'

    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'.
    PierreTechoueyres committed with npostavs Jul 22, 2017
Commits on Jul 18, 2017
  1. Update NEWS, version number to 0.12, and snippets submodule

    * 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
    0.12.0.
    npostavs committed Jul 18, 2017
Commits on Jul 16, 2017
  1. Update CONTRIBUTING.md information

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

    * 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.
    npostavs committed Jun 2, 2017
  3. Handle dead snippets better

    * 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.
    npostavs committed May 17, 2017
  4. Make yas-debug-process-command-line easier to debug

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

    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
    message.
    (yas--post-command-handler): Allow the debugger to run.
    npostavs committed Dec 4, 2016
Commits on Jul 1, 2017
  1. Fixup yasnippet-debug.el

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

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

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

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

    * 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
    it.
    (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.
    npostavs committed Jun 2, 2017
Commits on May 19, 2017
  1. Restore syntax-propertize-function before indenting mirrors

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

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

    * yasnippet.el (yas--indent-parse-create): Let-bind
    `parse-sexp-lookup-properties' to nil.
    npostavs committed May 10, 2017
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

    * 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.
    npostavs committed Apr 13, 2017
Commits on Apr 17, 2017
  1. Fix condition timestamps in key filter functions

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

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

    * 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.
    npostavs committed Apr 4, 2017
  2. Make `yas-about' more informative

    * 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.
    npostavs committed Apr 8, 2017
Commits on Mar 26, 2017
  1. Correctly wrap auto-fill-function when it's toggled on later

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

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

    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'.
    (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.
    npostavs committed Mar 23, 2017
Commits on Mar 23, 2017
  1. Only update live snippets

    * 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.
    npostavs committed Mar 23, 2017
  2. Restore syntax-propertize-function before indenting snippet

    * yasnippet.el (yas--snippet-parse-create): Some modes require correct
    syntax-propertizing to indent properly.
    npostavs committed Mar 23, 2017