unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#15137: python mode patch
@ 2013-08-19 21:25 Daniel Elliott
  2013-08-27  1:54 ` Stefan Monnier
  2013-09-02 14:16 ` fgallina
  0 siblings, 2 replies; 6+ messages in thread
From: Daniel Elliott @ 2013-08-19 21:25 UTC (permalink / raw)
  To: 15137

Hello,

I'm submitting a patch that has been tremendously helpful to me.
Please consider this for addition into the next release of the world's
most excellent editor.

2013-08-19  Dan Elliott  <danelliottster@gmail.com>

        * progmodes/python.el (python-shell-send-region): added fix
suggested by Barry Warsaw for python-mode.el to fix unexpected
indentation error w\
hen sending region to interpreter



=== modified file 'lisp/progmodes/python.el'
*** lisp/progmodes/python.el    2013-08-16 05:15:51 +0000
--- lisp/progmodes/python.el    2013-08-19 21:14:34 +0000
*************** Returns the output.  See `python-shell-s
*** 2128,2134 ****
        ;; When sending a region, add blank lines for non sent code so
        ;; backtraces remain correct.
        (make-string (1- line-num) ?\n))
!     (buffer-substring start end))
     nil t))

  (defun python-shell-send-buffer (&optional arg)
--- 2128,2137 ----
        ;; When sending a region, add blank lines for non sent code so
        ;; backtraces remain correct.
        (make-string (1- line-num) ?\n))
!     ;; wrap with a conditional to avoid errors about python
unexpected indentation
!     "if True:\n"
!     (buffer-substring start end)
!     "\n")
     nil t))

  (defun python-shell-send-buffer (&optional arg)

Thank you for all of your hard work.

- dan





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-09-09 14:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-19 21:25 bug#15137: python mode patch Daniel Elliott
2013-08-27  1:54 ` Stefan Monnier
2013-08-31 12:44   ` fabian
2013-09-01  7:25     ` Andreas Röhler
2013-09-09 14:15     ` Daniel Elliott
2013-09-02 14:16 ` fgallina

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).