doomemacs / doomemacs/core

smartparens: typing /*! in C/C++ ends up broken

Open
#5,759 0 comments 0 reactions 0 assignees View on GitHub
core is:bug re:smartparens
Dominant language
Emacs Lisp
Stars
22.7k
Forks
3.1k
Avg merge
10h 46m
Merged PRs (30d)
4

Description

### What did you expect to happen?

See either: `/*!` or `/*!*/`

### What actually happened?

Every time, my buffer contains: `/*!*/*/`

Which is kind of annoying, and malformed.

### Describe your attempts to resolve the issue

This (original credit to @special) seems to work around it:

```
;; Stop /*! comments being broken by smartparens
(after! cc-mode
(sp-local-pair '(c-mode c++-mode) "/*!" "*/" :actions :rem))
```

I guess the original source of this might be from the bit in modules/config/default/config.el added in d748fe0cd2f48d307d4b105b82e3ee32c6fa8db1.

### Steps to reproduce

* Open a C/C++ buffer
* Type: `/*!` (the start of a comment in several styles I use frequently)
* Observe "what actually happened", instead of "what did you expect to happen", and cry a little as I fix it up by hand.

### System Information

https://pastebin.com/rziHWV7g

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.