Subject: bug#19080: 24.4; wish: enable show-paren-mode to highlight matching same-level keywords

From: Lars Ingebrigtsen <[email-masked]>
Date: Thu, 12 May 2022 03:44:43 +0200

Josh Berdine <[email-masked]> writes:

> emacs -Q
> M-x load-file
> ~/.opam/4.02.1/share/tuareg/tuareg.el
> M-x tuareg-mode
> M-x show-paren-mode
> let f () =
>   let x = 0 in
>   ()
> C-u 17 C-b
>
> This starts a fresh emacs, loads the tuareg mode, enables
> show-paren-mode, enters some ocaml code, and puts the point on a 'let'
> keyword.
>
> In this situation, it would be helpful if the 'let' and corresponding
> 'in' were highlighted in 'show-paren-match-face'.  And similarly for
> "fun", "if", "match", and "try".

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

I think this is rather beyond the scope of show-paren-mode (which is a
pretty simple mode that just blinks parentheses, and not much more).  A
new different mode that relies on language semantics to identify these
things would be nice, but I don't think there's anything actionable to
be done here, so I'm closing this bug report.

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