syl20bnr / spacemacs

A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
http://spacemacs.org
GNU General Public License v3.0
23.69k stars 4.89k forks source link

parentheses mismatch #8187

Closed wasphin closed 7 years ago

wasphin commented 7 years ago

In the cmake-mode, {} inside () is very common

({blabla})

in this case, if I mistype a ) just after the blabla, like this:

({blabla)})
        ^

the mistyped ) will keep there and cannot be removed!

Reproduction guide

System Info :computer:

bmag commented 7 years ago

Hey, can you add more info as described in Debugging please? In particular your system info. Also, please tell what are the values for smartparens-related variables in your dotspacemacs (search for variables with "paren" in their name).

wasphin commented 7 years ago

Hi, @bmag, updated the previous post.

the problem exists if I set dotspacemacs-smartparens-strict-mode t.

Fuco1 commented 7 years ago

@was4444 Can you check what this gives: (memq 'autoskip (sp-get-pair "(" :actions)) ? Since at least december 2016 (commit Fuco1/smartparens@a67785906656518ae5af3e39aac722030b59e1da) it should be impossible to add unbalancing delimiters in strict mode---but this is disabled for non-autoskip pairs. But all the basic pairs should have that property, so there's something odd going on.

wasphin commented 7 years ago

@Fuco1 my smartparens is a little old -;

$ ls | grep smart
smartparens-20160614.1248

whatever, (memq 'autoskip (sp-get-pair "(" :actions)) gives me

(autoskip navigate)
Fuco1 commented 7 years ago

Well then you should probably upgrade, this should be fixed on master.

wasphin commented 7 years ago

@Fuco1 Cannot add unbalancing delimiters in strict mode with version:

$ ls | grep smart
smartparens-20170618.744