[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Python mode for emacs?
From: |
Mark H. David |
Subject: |
Re: Python mode for emacs? |
Date: |
Sat, 23 May 2020 17:45:49 -0700 |
User-agent: |
Cyrus-JMAP/3.3.0-dev0-488-g9249dd4-fm-20200522.001-g9249dd48 |
Wow, apropos... Thanks!
----- Original message -----
From: "Kévin Le Gouguec" <address@hidden>
To: "Mark H. David" <address@hidden>
Cc: Emacs Development <address@hidden>
Subject: Re: Python mode for emacs?
Date: Saturday, May 23, 2020 6:58 AM
"Mark H. David" <address@hidden> writes:
> Like I
> want to know if there's a way to go forward/backword over
> parenthesized expressions. In Python mode currently, if you do C-M-B
> at the end of the following, it goes back to the beginning of the
> 'if', rather than to the matching (.
>
> if verbose:
> print("blah blah")
I think you'll find this recent bug report of interest:
https://debbugs.gnu.org/41361
tl;dr the current way to change the default behaviour is to add this to
your init file:
(add-hook 'python-mode-hook
(lambda () (setq-local forward-sexp-function nil)))
(See also "Movement"-related comments in python.el.)
The discussion in the bug report is still ongoing, so don't hesitate to
weigh in, e.g. if you think that the default behaviour should be
changed.