Subject: bug#42867: 28.0.50; Wring pair-mode in m4 and similar modes

From: Lars Ingebrigtsen <[email-masked]>
Date: Fri, 16 Oct 2020 17:24:25 +0200

Ergus <[email-masked]> writes:

> Using emacs to edit an m4 file I see that there is an issue recognizing
> the corresponding pairs in some cases like when using "case".
>
> For example:
>
> ```
> [
> case $word in
> 	i?86)
>             something ;;
>         bla)
>             bla ;;
>  esac
> ]
> ```

The problem is that "bla)" has a closing-paren character, and the
Emacs's sexp machinery doesn't seem to take into account what the
closing paren character is in these circumstances -- just that there's a
closing paren?

You see this all over the place in Emacs, but fortunately not many
languages use closing-parens like that.

Does anybody know whether there's any convenient way to fix the problem
here in m4-mode?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no