Smartparens 1.10.0
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!
Changes since 1.9.0
Bug fixes
- Fix a bug when testing if a char is escaped picked up any escaped sequence not just the one at point (#669)
- Do not assume
"
is always string syntax (this broke auto-escape) (#665) - Recognize multi-line comments as context when not on first-line (to allow parsing sexps in comments) (#653)
- Fix
eval-after-load
to use symbols instead of strings (#677) - Fix killing of whitespace with
sp-kill-hybrid-sexp
(#452) - Do not extend selection over invalid regions (#687)
- Fix hanging on backward-delete in comint buffers when at the end of last prompt (#694)
- If a pair has prefix syntax and is allowed in current context, do not consider it a prefix (#664)
- Only insert spaces when slurping or barfing if not doing so would result in merging of two neighboring expressions (#632, #578)
ruby-mode
- Fix ruby pre- and post-handlers to process tabs properly (#638)
Features
- When killing a region in strict mode, check the resulting balance state of the buffer and refuse to kill unbalanced regions (#230)
- After wrapping, the wrapped region is enclosed between point and mark (between this patch mark was left in undefined position)
- New command
sp-mark-sexp
similar tomark-sexp
but also for user-defined pairs (#686) - When inserting string quote marks in unbalanced buffer, decide whether to escape or not based on the buffer state (#34)
- This makes the option
sp-autoinsert-quote-if-followed-by-closing-pair
obsolete
- This makes the option
- Respect
kill-whole-line
with hybrid kills (#169) - Add
sp-kill-whole-line
. This always kills everything before and after point but preserves the buffer balance (#674) - In strict mode, do not insert closing delimiters which would imbalance the buffer (#421)
- When re-wrapping inside strings you can use unescaped string marks to re-wrap sexps and they are automatically escaped (#667)
- Add a command to navigate sexps forward and backward staying at the same depth (#623)
- Add a trigger for wrapping (#663)
rust-mode
- Support
<
and>
in strict mode
clojure-mode
- Add autoload for
clojure-mode
settings (#698)
elixir-mode
fsharp-mode
- Add support for
fsharp-mode
(#714)
javascript-mode
- Add support for
javascript-mode
(#716)
evil-mode
- Add support for
evil-mode
registers when killing withsp-kill-sexp
(#725)
API
- Add a test helper
sp-buffer-equals