[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:48:28 -0400 |
On Mon, Sep 27, 2021 at 5:34 PM Thibaut Verron <thibaut.verron@gmail.com>
wrote:
> Le lun. 27 sept. 2021 à 23:22, Pierre Rouleau <prouleau001@gmail.com> a
> écrit :
>
> > On Mon, Sep 27, 2021 at 5:14 PM Thibaut Verron <thibaut.verron@gmail.com>
> wrote:
> >>
>
> How are you modifying the syntax table? Directly in the source code of
> the erlang mode, or in your user configuration?
>
> For investigation purpose I modified the erlang.el file directly and then
byte compiled it,
ensuring that my modifications are taken by adding a special variable I can
check.
I modified the code inside the function
`erlang-ensure-syntax-table-is-initialized' which
dynamically modifies the syntax table because the initial variable sets it
to nil.
I commented out the lines that identified ?< and ?> as "." and added after
the following 2 lines:
(modify-syntax-entry ?< "(>" table)
(modify-syntax-entry ?> "(<" table)
After byte-compiling I start a new Emacs instance and open a .erl file
which uses the erlang-mode.
Then I check if the syntax table is what I think it should be by executing
describe-syntax.
--
/Pierre