0

I don't want to turn off entire smartparens or similar mode

((([cursor])) 

When I type ) at cursor location I expect it to be

((())) 

but it becomes

((()) 

How to find out which mode is causing it?

1 Answer 1

0

According to the description, it looks like elec-pair behavior with user option electric-pair-skip-self set to t.

Firstly, check if electric-pair-mode is enabled. Simply calling M-x electric-pair-mode --which toggles the mode-- should be enough for a quick test.

If the mode is enabled, setting electric-pair-skip-self to nil or #'electric-pair-default-skip-self (default value) will change the behavior to either never omitting a paren or omitting it in accordance with another user option: electric-pair-preserve-balance (start with the default value of t, it should work fine).

1
  • Thank you. but it's not turned on. I guess some other mode is doing it.. Commented Aug 24, 2023 at 10:04

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.