all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lele Gaifax <lele@metapensiero.it>
To: Noam Postavsky <npostavs@users.sourceforge.net>
Cc: 29305@debbugs.gnu.org
Subject: bug#29305: 26.0.90; Wrong electrified indentation with Python multiline string
Date: Tue, 21 Nov 2017 15:22:06 +0100	[thread overview]
Message-ID: <878tezvhip.fsf@metapensiero.it> (raw)
In-Reply-To: <871skr20yo.fsf@users.sourceforge.net>

Noam Postavsky <npostavs@users.sourceforge.net> writes:

> Well, there is no big mystery I think.  It's simply that
> `python-indent-context' goes to the beginning of line itself:
>
>     (defun python-indent-context ()
>       ...
>       (save-restriction
>         (prog-widen)
>         (let ((ppss (save-excursion
>                       (beginning-of-line)
>                       (syntax-ppss))))

Doh, you are right, I just skimmed through its docstring :-|

> Actually, I forgot to check for an indent context of :inside-docstring
> though.  I'm not sure if there is valid python code which could trigger
> electric indent next to a docstring, but it's probably more correct to
> do this instead:

Will try your latest in my next Emacs sessions.

> Subject: [PATCH v2] Disable eletric indent for python strings (Bug#29305)

ele*ctric

Thank you again,
ciao, lele.
-- 
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
lele@metapensiero.it  |                 -- Fortunato Depero, 1929.





  reply	other threads:[~2017-11-21 14:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-15  9:33 bug#29305: 26.0.90; Wrong electrified indentation with Python multiline string Lele Gaifax
2017-11-19 14:27 ` Noam Postavsky
2017-11-21  9:15   ` Lele Gaifax
2017-11-21 13:52     ` Noam Postavsky
2017-11-21 14:22       ` Lele Gaifax [this message]
2017-12-02 14:54         ` Noam Postavsky

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

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

  git send-email \
    --in-reply-to=878tezvhip.fsf@metapensiero.it \
    --to=lele@metapensiero.it \
    --cc=29305@debbugs.gnu.org \
    --cc=npostavs@users.sourceforge.net \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.