[Top][All Lists]

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

Re: How to make `forward-sexp` handle other balanced character-pairs suc

From: Pierre Rouleau
Subject: Re: How to make `forward-sexp` handle other balanced character-pairs such as < and > or << and >> in erlang-mode or others?
Date: Mon, 27 Sep 2021 17:22:16 -0400

On Mon, Sep 27, 2021 at 5:14 PM Thibaut Verron <>

> Hi,
> Adding the characters to the syntax table is the canonical answer.
> Maybe erlang-mode sets forward-sexp-function? This is typically done
> to enhance the sexp movement beyond simple parentheses, for instance
> for modes using SMIE.
> If you (setq forward-sexp-function nil), does forward-sexp do what you
> want?
In erlang-mode forward-sexp-function is already nil and forward-sexp does
deal with ?< and ?> as a matching pair then.
I tried to modify the syntax table but that did not work either.
At the moment I'm trying to write a function that I will provide as the
forward-sexp-function to do the job.

Really I would think would have been to modify the syntax table to get
scan-sexps to
do the job.  Perhaps something inside erlang.el /erlang-mode gets in the
but I have not fully studied its code

reply via email to

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