Minor mode for Emacs that deals with parens pairs and tries to be smart about it.
Smartparens turns 5 years old today and to celebrate we've prepared a new release packed with new features and bug fixes!
You can read more on my blog.
As usual, big thanks to all the contributors who helped on this release!
smartparens-mode
is disabled do not mess with delete-selection-mode
handling (#767) and ```''
in LaTeX)gfm-mode
block insertion (#371)js-mode
config (#701)end
keyword that would spill out of current context (i.e. out of the comment if point is in comment):
to prefix classsp-prefix-save-excursion
preserve indentation.overwrite-mode
(#549),
in argument lists or ;
between statements.sp-backward-delete-symbol
(-word
) which do not put the removed content to kill-ring
(#759)hungry-delete-mode
(#764, #765)sp-convolute-sexp
sp-convolute-sexp
sp-navigate-interactive-always-progress-point
to
improve behaviour of sp-next-sexp
and sp-previous-sexp
(always
move in the direction of navigation).sp-autodelete-wrap
is on unwrap the last region in strict mode as well (#678):)
) in text modes in strict mode (#713)show-smartparens-mode
(#346, #788)sp-skip-closing-pair
(e.g. typing closing delimiter in strict mode) re-align the sexps and clean the whitespace (#778)sp-change-inner
(#115)"""
to '''
) now works after selecting the single quote for rewrapping (#320)typescript-mode
(#748)scala-mode
(#673){--}
pair'
pair to better treat it when it is used as function/symbol suffix (#710)js2-mode
(#696)markdown-mode
setup (#141, #804)org-mode
setupsp--get-stringlike-regexp
should never match anything if there are no string delimiters (previously returned a regexp which would always match anywhere)sp--strict-regexp-quote
returns unmatchable regexp on nilsp-get-thing
skips closing delimiter with skip function (#774)syntax-table
text propertysp-region-ok-p
now works with all smartparens pairs not just syntax-table (#775, #805)turn-off-smartparens-strict-mode
(#790)sp--find-next-stringlike-delimiter
p
syntax flag to recognize prefixes (#812)looking-back
to speed up unsuccessful parsing attempts (#755)delete-selection-pre-hook
when no region is active (#794)sp-navigate-consider-stringlike-sexp
sp-describe-system
to generate information when submitting issues to githubCask
and smartparens-pkg.el
versions.The biggest change coming from 1.9.0 is the transition to lexical binding. This allows us to write better and cleaner code as well as makes some operations faster by eliminating unnecessary variable lookup.
Otherwise there is a healthy mix of bug fixes and new features with some additional work on the infrastructure (testing framework, helpers and so on). Some long-standing issues with strings were fixed (#34), we've done some work on wrapping as well as improved the slurp/barf experience by not including unnecessary spaces (this was a thing carried over from lisp syntax to other languages where it caused lots of annoying issues).
As usual, big thanks to all the contributors who helped on this release!
"
is always string syntax (this broke auto-escape) (#665)eval-after-load
to use symbols instead of strings (#677)sp-kill-hybrid-sexp
(#452)sp-mark-sexp
similar to mark-sexp
but also for user-defined pairs (#686)sp-autoinsert-quote-if-followed-by-closing-pair
obsoletekill-whole-line
with hybrid kills (#169)sp-kill-whole-line
. This always kills everything before and after point but preserves the buffer balance (#674)<
and >
in strict modeclojure-mode
settings (#698)elixir-mode
(#695, #700, #727)fsharp-mode
(#714)javascript-mode
(#716)evil-mode
registers when killing with sp-kill-sexp
(#725)sp-buffer-equals
sp-keymap
to smartparens-mode-map
everywhere to conform to Emacs conventionsecukes
features were removed and migrated to ert
lexical-binding
(#671, #719, #720)Mostly a bug-fix release, we concentrated on old issues with quotes and odd behaviors there and some improvements of slurping and barfing. Fixing issues brought in by the return of auto-escaping is a given :)
As usual, big thanks to all the contributors who helped on this release!
sp-up-sexp
, do not destroy whitespace if inside a string (#616)sp--looking-back
match can no longer extend after the point_
in clojure) (#621)LaTeX
(#670)tuareg-mode
(#631)sp-get-quoted-string-bounds
takes an optional point
parameter of where the test should be runsp-char-is-escaped-p
to test if the char-at-point is escaped or not (according to sp-escape-char
)sp--strict-regexp-opt
now returns ""
on nil
input to be consistent with regexp-opt
sp--merge-prop
and sp--update-pair
had the argument order changedsp--string-empty-p
sp-pair-is-stringlike-p
sp--split-string
sp--reverse-string
sp-zap-syntax
sp-nagivate-use-textmode-stringlike-parser
aliasMakefile
, we use .travis.yml
only. To run tests locally, use cask exec ert-runner
.This release marks the return of autoescaping---better, faster and smarter :). We can now work with multiple quote types and only escape when necessary, the behaviour at the end of string is consistent across quotes (always jump out) and we can also escape single delimiters which weren't paired---for example because an :unless
predicate did not allow it.
Another big feature is the migration of documentation to sphinx and readthedocs. Currently, only the new features are documented there, but the github wiki migration is on the way.
As usual, big thanks to all the contributors who helped on this release!
[a b |c] d<
into [a b "|c] d"<
as that would break the []
structure.""""""
as a proper pair.>
.%w(..)
in ruby, where the ()
is now a string delimiter.sp-rewrap-sexp
.syntax-ppss
and case-fold-search
.ess
via smartparens-ess.el
This release updates the version number in the pkg and Cask files and bumps dependencies to the required versions.
There has been hundreds of other issues fixed and new features added, unfortunatelly it is too much to track. Starting with this release, we will strictly follow semantic versioning and a bi-monthly release schedule, proper with changelog and all. Given how much the project has grown in the last years, an increased level of "bureaucracy" is required.
I have set up a patreon account, feel free to chip in. The plan is to drop some job days and pour the time into this (and other Emacs) project(s). Any support is appreciated.