From: Daniel Elliott <danelliottster@gmail.com>
To: 15137@debbugs.gnu.org
Subject: bug#15137: python mode patch
Date: Mon, 19 Aug 2013 16:25:36 -0500 [thread overview]
Message-ID: <CAD=Wj+a8Sd+DPjiFPC3XAO9aX09mwu2Uym9Rt34zL_gHrnchEw@mail.gmail.com> (raw)
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
next reply other threads:[~2013-08-19 21:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-19 21:25 Daniel Elliott [this message]
2013-08-27 1:54 ` bug#15137: python mode patch 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
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='CAD=Wj+a8Sd+DPjiFPC3XAO9aX09mwu2Uym9Rt34zL_gHrnchEw@mail.gmail.com' \
--to=danelliottster@gmail.com \
--cc=15137@debbugs.gnu.org \
/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.