-
-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In js2-mode, killing a line right before an expression breaks next line's indentation #696
Comments
As a workaround, I defined the following advice to get it as with the other modes: ;; Fix weird behaviour in js2-mode when we kill an empty line right
;; before an expression.
(defun davazp/reindent-after-sp-kill-hybrid-sexp (&rest args)
(when (eq major-mode 'js2-mode)
(indent-for-tab-command)))
(advice-add 'sp-kill-hybrid-sexp :after #'davazp/reindent-after-sp-kill-hybrid-sexp) |
I looked at the problem, it seems to be in the (unless (memq major-mode sp-no-reindent-after-kill-modes)
... and |
To be honest I don't remember :/ Maybe it was a hack for some earlier version when things were broken. Would you mind removing it from the list and test to see if it works or not? |
Sure 👍 . It seems to work, at least in that simple case, but I will try for the next days to see if it breaks with other code. |
I have used it this week and I cannot find any issue related to it. Maybe somebody else can also have a look? |
I'll look at the |
The probem happens with
js2-version
1.8.5 and smarparents from melpa:smartparens-20170104.410
. I tried with Emacs 25.1 and no extra configuration besides js2-mode and smartparens.To reproduce it:
After
C-k
, I get:The text was updated successfully, but these errors were encountered: