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

[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: Thibaut Verron
Subject: Re: How to make `forward-sexp` handle other balanced character-pairs such as < and > or << and >> in erlang-mode or others?
Date: Tue, 28 Sep 2021 05:45:00 +0200

On Mon, 27 Sep 2021, 23:48 Pierre Rouleau, <prouleau001@gmail.com> wrote:

>
>
> 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.
>

That's a good approach, investigation purposes or not. If you want to
accelerate the feedback cycle, you don't even need to byte compile, just
delete the elc file (or tell emacs to always prefer a newer el over an elc,
there is a variable for that) and load the mode normally.


> I commented out the lines that identified ?< and ?> as "." and added after
> the following 2 lines:
>
> (modify-syntax-entry ?< "(>" table)
> (modify-syntax-entry ?> "(<" table)
>

There is a typo there, the second one should be )<.

Best wishes,
Thibaut


reply via email to

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