Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

does not dedent regions, lp:1072869, again

  
`py-fix-start' fixed
  • Loading branch information...
commit 696649ae75a57c1141df62147e47188ed308cc58 1 parent a03a86e
@andreas-roehler andreas-roehler authored
Showing with 4 additions and 3 deletions.
  1. +4 −2 python-mode.el
  2. +0 −1  test/python-mode-tests.sh
View
6 python-mode.el
@@ -10088,15 +10088,17 @@ Inserts an incentive true form \"if 1:\\n.\" "
(defun py-fix-start (start end)
"Internal use by py-execute... functions.
Avoid empty lines at the beginning. "
+ ;; (switch-to-buffer (current-buffer))
(python-mode)
(goto-char start)
(let ((beg (copy-marker start)))
(while (empty-line-p)
(delete-region (line-beginning-position) (1+ (line-end-position))))
(back-to-indentation)
- (py-down-statement)
+ (unless (py-beginning-of-statement-p)
+ (py-down-statement))
(while (not (eq (current-indentation) 0))
- (py-shift-left (current-indentation) start end))
+ (py-shift-left py-indent-offset start end))
(setq py-line-number-offset (count-lines 1 start))
beg))
View
1  test/python-mode-tests.sh
@@ -308,7 +308,6 @@ $EMACS -Q --batch --eval "(message (emacs-version))" --eval "(when (featurep 'py
-eval "(assert (commandp 'py-forward-into-nomenclature) nil \"py-forward-into-nomenclature not detected as command\")" \
-eval "(assert (commandp 'py-backward-into-nomenclature) nil \"py-backward-into-nomenclature not detected as command\")" \
-eval "(assert (commandp 'match-paren) nil \"match-paren not detected as command\")" \
--eval "(assert (commandp 'py-toggle-execute-keep-temporary-file-p) nil \"py-toggle-execute-keep-temporary-file-p not detected as command\")" \
-eval "(assert (commandp 'py-guess-default-python) nil \"py-guess-default-python not detected as command\")" \
-eval "(assert (commandp 'py-set-ipython-completion-command-string) nil \"py-set-ipython-completion-command-string not detected as command\")" \
-eval "(assert (commandp 'py-shell-dedicated) nil \"py-shell-dedicated not detected as command\")" \
Please sign in to comment.
Something went wrong with that request. Please try again.