willghatch/emacs-on-parens

Let forward-sexp-end and backward-sexp jump out of multiple nested pairs

Opened this issue · 2 comments

Suppose we have the following text (let the character before the | be the character the cursor is on):

(((test of text|)) test)

on-parens-forward-sexp-end will not jump out of the doubly nested pairs, while sp-forward-sexp will.

This also happens when jumping backwards with on-parens-backward-sexp.

I did that by design (I want the forward/backward commands to not change my s-exp depth), but I'm happy to have a configuration variable decide which way it behaves. Are there functions aside from those two that you would like to see similarly changed?

I did that by design (I want the forward/backward commands to not change my s-exp depth)

Ah, I was confused because on-parens-forward-sexp-end will jump out of single parens.

(((t|his) is a test) of smartparens)

M-x on-parens-forward-sexp-end RET repeated will eventually jump out of the parens, stopping at the EOL.

I'm happy to have a configuration variable decide which way it behaves.

Thanks that would be much appreciated.

Are there functions aside from those two that you would like to see similarly changed?

I don't know. I can exhaustively compare the on-parens functions with their vanilla counterparts and see if anything is amiss, but I can't do it immediately.