[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Behaviour of electric-pair-mode for single quotes
From: |
Noam Postavsky |
Subject: |
Re: Behaviour of electric-pair-mode for single quotes |
Date: |
Mon, 30 Dec 2019 12:59:32 -0500 |
On Mon, 30 Dec 2019 at 12:47, Pankaj Jangid <address@hidden> wrote:
> But in python-mode, there is a strange behaviour. Steps:
>
> 1. ./src/emacs -Q
> 2. open a temporary python file (or switch mode)
> 3. Following is the behaviour with keystrokes
>
> Key Strokes Output
> ' '' <point before 2nd tick>
> '' ''' <point before 3rd tick>
> ''' '''''' <point before 4th tick>
> '''' ''''''' <point before 5th tick>
>
> Is this the expected behaviour?
I think it's intentional, remember that python supports triple quotes
as a string delimiter. See longstring in
https://docs.python.org/3/reference/lexical_analysis.html#literals