After adding 'c-ts-mode' and 'c++-ts-mode' to the variable 'sp-c-modes' of
the package 'smartparens', it works now.

Thanks! Eli!

norris <shading.young@gmail.com> 于2023年4月22日周六 10:59写道:
> I cannot reproduce this with the latest emacs-29 branch.

I just tried with the latest emacs-29 branch, and found that the c-mode 
and c-ts-mode are the same when starting from "emacs -Q".
After RET in both c-mode and c-ts-mode, I got:
```
if (a) {
|}
```
So, extra line might be a feature of a minor mode instead of major c-mode
or c-ts-mode where I was wrong. Then I found that this is a feature of the 
package 'smartparens' . I'm trying to find why it does not work in c-ts-mode.