In mathematical notation, parenthesis and brackets have overloaded meaning, and when it comes to represent intervals, the parenthesis/brackets don't have to match. For example,

(1, 2]

means an interval with left open and right closed. But unfortunately, in math mode in latex mode, this becomes fairly annoying that whenever notation likes this is used, emacs highlights it as error.

For example,

enter image description here

But outside of math mode, it's really not normal if any mismatches happen. I am wondering if you guys got a way to fix it?

enabled minor modes:

Enabled minor modes: Async-Bytecomp-Package Auto-Composition Auto-Compression
Auto-Encryption Auto-Fill Auto-Revert Company Diff-Auto-Refine Electric-Indent
File-Name-Shadow Flyspell Font-Lock Global-Eldoc Global-Font-Lock Global-Git-Commit
Global-Hi-Lock Global-Undo-Tree Hi-Lock Latex-Preview-Pane Line-Number Linum
Magit-Auto-Revert Magit-File Menu-Bar Mouse-Wheel Origami Override-Global Projectile
Pyvenv Rainbow-Delimiters Save-Place Shell-Dirtrack Show-Smartparens
Show-Smartparens-Global Tex-Pdf Tool-Bar Tooltip Transient-Mark Undo-Tree Yas
  • When starting from fundamental-mode, activating math-mode, that shouldn't happen. Commented Dec 6, 2017 at 6:35
  • @AndreasRöhler are you saying it shouldn't complain? but it does here.
    – Jason Hu
    Commented Dec 6, 2017 at 15:25
  • @AndreasRöhler i updated with my minor modes. i did try to play with smartparen but it does not seem related.
    – Jason Hu
    Commented Dec 6, 2017 at 15:27
  • Sorry, my comment missed the point and it was to late for a delete. Probably worth a bug report. Commented Dec 6, 2017 at 16:41
  • @AndreasRöhler i am not even sure which party should fix this. should it be the latex mode or emacs?
    – Jason Hu
    Commented Dec 6, 2017 at 16:44

2 Answers 2


AFAIU the error message is sent by blink-matching-open. Calls a var holding blink-matching-check-function, which points to blink-matching-check-mismatch. Finally appears function syntax-after and the char-table.

Please consider reporting it at [email protected].

For the moment customizing var blink-matching-paren to nil avoids the error message - at some cost.

As for the face: M-x customize-face RET show-paren-mismatch RET might mitigate the distraction.

Finally M-x customize-variable RET show-paren-mode RET to off avoids the highlighting.

  • hmm... it seems caused by something else. I set that variable to nil, then reopen the file again. but i can still see those highlights.
    – Jason Hu
    Commented Dec 6, 2017 at 17:21
  • @HuStmpHrrr Customizing should affect error message - edited the answer. Commented Dec 6, 2017 at 18:22

I encountered the same problem and found the culprit to be rainbow-delimeters, which is listed in the OP's list of minor modes.

A workaround is to disable rainbow-delimeters in LaTeX mode. In Doom Emacs, this can be accomplished by adding the following to your config.el:

(after! tex
  (remove-hook 'TeX-update-style-hook #'rainbow-delimiters-mode))
  • I am using Doom Emacs and this worked for me. Thanks!
    – Matholic
    Commented Dec 7, 2021 at 5:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.