bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#15137: python mode patch


From: Andreas Röhler
Subject: bug#15137: python mode patch
Date: Sun, 01 Sep 2013 09:25:13 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130801 Thunderbird/17.0.8

Am 31.08.2013 14:44, schrieb fabian@anue.biz:

monnier@iro.umontreal.ca writes:

!     (buffer-substring start end))
[...]
!     ;; wrap with a conditional to avoid errors about python unexpected 
indentation
!     "if True:\n"
!     (buffer-substring start end)
!     "\n")

That looks pretty good, thank you.
Fabián, could you take a look?


The idea is good but the patch needs bit more of work -- this approach
will work when an indented region is sent but won't when sending a
region which starts with no indentation at all.

Right. Current python-mode.el shifts region-or-whatever-delivered left until it 
starts at column 0.

Also backtraces numbers
will be wrong for a -1 offset.


Correct. BTW there is still the Emacs count-lines bug: at BOL it counts one 
less than from secoond column.


I'll push something for this soon.


Regards,
Fabián.










reply via email to

[Prev in Thread] Current Thread [Next in Thread]