Roger Serwy <roger.se...@gmail.com> added the comment:

(I need to write an extension to auto-apply strip-trailing-whitespace on save.)

Terry, I agree that the comment needs improvement. The self.editwin reference 
to the window needs to be available so that .get_saved() doesn't fail. In 
retrospect, the original patch obscured this point.

Attached is issue10365_rev3.patch, meant to be used against the latest code. It 
refactors the shell detection as part of the conditional as well as clarifies 
the comments.

The "Code for use outside IDLE" is part of a test at the end of the file which 
uses a duck-typed "EditorWindow" object. This object has flist=None which 
allows this extra code to run.

----------
Added file: http://bugs.python.org/file25735/issue10365_rev3.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10365>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to