unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Kévin Le Gouguec" <kevin.legouguec@gmail.com>
To: edgar@openmail.cc
Cc: help-gnu-emacs@gnu.org
Subject: Re: how to go back to matching parenthesis in python-mode?
Date: Mon, 25 Oct 2021 08:20:39 +0200	[thread overview]
Message-ID: <87sfwp1v7s.fsf@gmail.com> (raw)
In-Reply-To: <ef290cbdf64b61fb55ae98e46256cc87@openmail.cc> (edgar@openmail.cc's message of "Mon, 25 Oct 2021 03:09:40 +0000")

edgar@openmail.cc writes:

> How can I go back to the matching parenthesis? Thank you
>
> GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.27,

Up to version 27.2, the recommended way (explained in the opening
commentary of python.el[1]) is to set forward-sexp-function to nil in
python-mode-hook:

(add-hook 'python-mode-hook
          (lambda () (setq forward-sexp-function nil)))

In 28.1, the new user option python-forward-sexp-function will let you
do away with the hook[2].


[1] https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/progmodes/python.el?h=emacs-27.2#n59
[2] https://git.savannah.gnu.org/cgit/emacs.git/tree/etc/NEWS?h=emacs-28&id=1e8be48738e1324edb9891ff6f7077bd1306cdd7#n2862



  reply	other threads:[~2021-10-25  6:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-25  3:09 how to go back to matching parenthesis in python-mode? edgar
2021-10-25  6:20 ` Kévin Le Gouguec [this message]
2021-10-25 16:11   ` edgar
2021-10-25 17:54     ` Emanuel Berg via Users list for the GNU Emacs text editor
  -- strict thread matches above, loose matches on Subject: below --
2021-10-26  7:44 Anders Munch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sfwp1v7s.fsf@gmail.com \
    --to=kevin.legouguec@gmail.com \
    --cc=edgar@openmail.cc \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).