bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#71777: 29.4; sexp-at-point in latex-mode when sexp contains ";"


From: Gabriele Nicolardi
Subject: bug#71777: 29.4; sexp-at-point in latex-mode when sexp contains ";"
Date: Wed, 26 Jun 2024 22:40:17 +0200
User-agent: Mozilla Thunderbird

Il 26/06/24 22:25, Stefan Monnier ha scritto:
Note that "test if a parenthesis in LaTeX (latex-mode) starts a balanced
_expression_" is a kind of weird request, because it will only return nil
if there's a missing close-paren but not if there are too many
close-parens, i.e. it only detects one half of the imbalances.


        Stefan
For my purposes it is enough.

I need to write a function to interactively resize mathematical parentheses based on their content, such as "\left( ... \right)". So far, I have successfully used `sexp-at-point`, but this function does not recognize balanced expressions that contain ";" and only works with "(" and "[" but not with < etc..

The `forward-sexp` function does not necessarily give an error if the parenthesis does not start a balanced _expression_. E.g.

$( x + y ]$

here "(" does not start a balanced _expression_ but `forward-sexp` does not return an error.

Gabriele

reply via email to

[Prev in Thread] Current Thread [Next in Thread]