From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Thibaut Verron Newsgroups: gmane.emacs.help 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 Message-ID: References: Reply-To: thibaut.verron@gmail.com Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1833"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs To: Pierre Rouleau Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 28 05:47:13 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mV45I-0000GB-UD for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 28 Sep 2021 05:47:12 +0200 Original-Received: from localhost ([::1]:46936 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mV45H-0000Zf-QJ for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 27 Sep 2021 23:47:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42288) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mV43P-0000X5-4R for help-gnu-emacs@gnu.org; Mon, 27 Sep 2021 23:45:15 -0400 Original-Received: from mail-yb1-xb2c.google.com ([2607:f8b0:4864:20::b2c]:43616) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mV43N-0008Ks-J2 for help-gnu-emacs@gnu.org; Mon, 27 Sep 2021 23:45:14 -0400 Original-Received: by mail-yb1-xb2c.google.com with SMTP id r1so28699608ybo.10 for ; Mon, 27 Sep 2021 20:45:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=LAhJHkraMTev4WDLTI/xbp9zLI6KDHj0yRUymFh2nBM=; b=ZLimJsyDJRgyR+nVZaEg+doYtVKXNzIgBTbF4QQzyiiAIorraz6uES1iTWPmotPEy/ kz4pLkwfqW69WUL/fkETjakmSglavnUgAPtYWj9inYJeSuY0nFg6uyRVnP2w5I5ZbzjE rdiL4rjN6V/jNK5fnoiotdoC2ovUyOaYF8cGTd14Cn21pdhfi/HETxFs/k45BoJK/EE9 81RgUhCCgwsg69TIHiIJX3ufFEhDwuuAz/4vbAgRNQ9BR54jWTLBOj78+bbwe8KZFFHP WUBUffDR/UwDbO63cduq5P8ZM3b2NoCUeCghvRgw8SuLjFYetA0iXBtMAcvaMKUbCcPI tq+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=LAhJHkraMTev4WDLTI/xbp9zLI6KDHj0yRUymFh2nBM=; b=y42D2SmGXkhFdTvmYf+pzT9kmuudCFjcbtLLXIZlj0gTixtSDRn4BFUdYstRRbtY5U VtqcNxbU8PiZVcoisGlEFf1K1abWkDQeJyxwe11WNh1tz8PbGsBUoxkpBhhcO2XgNg35 foamLm28ekmFYdfP9/RBCdnh4DoDFFqMgbhS6oxR4g69VPuAE7gDi2ZsMoTOk0XTLMfC w8DRzMQpffXTejxsDyAjoXzJPe4D71hFBMnufdg84WbsLj/CsWtf/lYgzM1JW8JPJffI QmQL+5HyvfD8sk7+rthUmqj6+L7YLPFUiotFH2sTiIdikOEbqScClnzr/ZlWe5+52YDO qy6A== X-Gm-Message-State: AOAM530SnpEst2XFI7+xAzjyDMov1a+8vdXHYa9+rnA6GQBVx7J1Gq0a Tzv4VuGjVN4m2u693y5GtCLX+FkzceshJkyig3g= X-Google-Smtp-Source: ABdhPJxZgpSJ0neNYn4jSyoc01YXThqjvO/GmlJ1YY0+j2FqLZd3OH6seiQi3omUsogqa31YMlJ7KtfMBNZa0tEnFaI= X-Received: by 2002:a25:2789:: with SMTP id n131mr4018926ybn.440.1632800712288; Mon, 27 Sep 2021 20:45:12 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::b2c; envelope-from=thibaut.verron@gmail.com; helo=mail-yb1-xb2c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:133321 Archived-At: On Mon, 27 Sep 2021, 23:48 Pierre Rouleau, wrote: > > > On Mon, Sep 27, 2021 at 5:34 PM Thibaut Verron > wrote: > >> Le lun. 27 sept. 2021 =C3=A0 23:22, Pierre Rouleau a >> =C3=A9crit : >> >> > 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 the= n > 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 afte= r > 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