Fuco1 / smartparens

Minor mode for Emacs that deals with parens pairs and tries to be smart about it.
GNU General Public License v3.0
1.84k stars 194 forks source link

Disable the auto pair in specified mode is not work? #1133

Closed zw963 closed 2 years ago

zw963 commented 2 years ago

I want to disable auto pair the "=" on org-mode completely.

so, i try this:

(sp-local-pair 'org-mode "=" "=" :when nil)

But it work.

Thank you.

titanofold commented 2 years ago

The correct solution is:

(sp-local-pair 'org-mode "=" nil :actions nil)

This is noted in the function documentation.

zw963 commented 2 years ago

Thanks, it works!

Fuco1 commented 1 year ago

Sorry for the horrible API. Maybe I should make some wrappers for these common cases to make it more discoverable.